change tx_mode without needing a restart

This commit is contained in:
Paul
2020-05-28 23:40:47 +02:00
parent b4aca3bcb9
commit c976d330d2
3 changed files with 4 additions and 5 deletions

View File

@@ -700,6 +700,9 @@ void EMSESP::console_commands(Shell & shell, unsigned int context) {
settings.ems_tx_mode(tx_mode);
settings.commit();
shell.printfln(F_(tx_mode_fmt), settings.ems_tx_mode());
// reset the UART
EMSuart::stop();
EMSuart::start(tx_mode);
} else {
shell.println(F("Must be 1 for EMS generic, 2 for EMS+, 3 for HT3, 4 for experimental"));
}