Skip to content

Commit 2aada0f

Browse files
committed
fix(modem): Fix DUAL_MODE regression from cb6e03a
In the recent DTE refactoring (cb6e03a) 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.
1 parent 93dd567 commit 2aada0f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

components/esp_modem/src/esp_modem_dte.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,15 +33,15 @@ DTE::DTE(std::unique_ptr<Terminal> terminal):
3333
DTE::DTE(const esp_modem_dte_config *config, std::unique_ptr<Terminal> t, std::unique_ptr<Terminal> s):
3434
buffer(config->dte_buffer_size),
3535
cmux_term(nullptr), primary_term(std::move(t)), secondary_term(std::move(s)),
36-
mode(modem_mode::UNDEF)
36+
mode(modem_mode::DUAL_MODE)
3737
{
3838
set_command_callbacks();
3939
}
4040

4141
DTE::DTE(std::unique_ptr<Terminal> t, std::unique_ptr<Terminal> s):
4242
buffer(dte_default_buffer_size),
4343
cmux_term(nullptr), primary_term(std::move(t)), secondary_term(std::move(s)),
44-
mode(modem_mode::UNDEF)
44+
mode(modem_mode::DUAL_MODE)
4545
{
4646
set_command_callbacks();
4747
}

0 commit comments

Comments
 (0)