mirror of
https://github.com/espressif/esp-protocols.git
synced 2025-06-25 17:31:33 +02:00
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.
This commit is contained in:
@ -33,7 +33,7 @@ DTE::DTE(std::unique_ptr<Terminal> terminal):
|
||||
DTE::DTE(const esp_modem_dte_config *config, std::unique_ptr<Terminal> t, std::unique_ptr<Terminal> 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<Terminal> t, std::u
|
||||
DTE::DTE(std::unique_ptr<Terminal> t, std::unique_ptr<Terminal> 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();
|
||||
}
|
||||
|
Reference in New Issue
Block a user