esp32 uart
This commit is contained in:
MichaelDvP
2020-05-29 16:06:10 +02:00
19 changed files with 179 additions and 119 deletions

View File

@@ -422,7 +422,7 @@ bool EMSESP::process_telegram(std::shared_ptr<const Telegram> telegram) {
for (const auto & emsdevice : emsdevices) {
if (emsdevice) {
if (emsdevice->is_device_id(telegram->src)) {
found = emsdevice->process_telegram(telegram);
found = emsdevice->handle_telegram(telegram);
// check to see if we need to force an MQTT publish
if (found) {
if (emsdevice->updated_values()) {
@@ -702,6 +702,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"));
}