From 2aada0f308c97f70c216b611a6b2d266261cadab Mon Sep 17 00:00:00 2001 From: David Cermak Date: Thu, 12 Oct 2023 12:49:41 +0200 Subject: [PATCH] fix(modem): Fix DUAL_MODE regression from cb6e03ac In the recent DTE refactoring (cb6e03ac) we install terminal callbacks in the constructor, but the change missed initializing modem_state in DTE constructors which take two terminals as arguments to work in DUAL mode. --- components/esp_modem/src/esp_modem_dte.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/components/esp_modem/src/esp_modem_dte.cpp b/components/esp_modem/src/esp_modem_dte.cpp index 64bd510a31..89cf64af05 100644 --- a/components/esp_modem/src/esp_modem_dte.cpp +++ b/components/esp_modem/src/esp_modem_dte.cpp @@ -33,7 +33,7 @@ DTE::DTE(std::unique_ptr terminal): DTE::DTE(const esp_modem_dte_config *config, std::unique_ptr t, std::unique_ptr s): buffer(config->dte_buffer_size), cmux_term(nullptr), primary_term(std::move(t)), secondary_term(std::move(s)), - mode(modem_mode::UNDEF) + mode(modem_mode::DUAL_MODE) { set_command_callbacks(); } @@ -41,7 +41,7 @@ DTE::DTE(const esp_modem_dte_config *config, std::unique_ptr t, std::u DTE::DTE(std::unique_ptr t, std::unique_ptr s): buffer(dte_default_buffer_size), cmux_term(nullptr), primary_term(std::move(t)), secondary_term(std::move(s)), - mode(modem_mode::UNDEF) + mode(modem_mode::DUAL_MODE) { set_command_callbacks(); }