diff --git a/src/boiler.cpp b/src/boiler.cpp index d6edcb6c8..5d03e02a0 100644 --- a/src/boiler.cpp +++ b/src/boiler.cpp @@ -49,6 +49,8 @@ Boiler::Boiler(uint8_t device_type, int8_t device_id, uint8_t product_id, const LOG_DEBUG(F("Registering new Boiler with device ID 0x%02X"), device_id); // the telegram handlers... + register_telegram_type(0x10, F("UBAErrorMessage1"), false, nullptr); + register_telegram_type(0x11, F("UBAErrorMessage2"), false, nullptr); register_telegram_type(0x18, F("UBAMonitorFast"), false, std::bind(&Boiler::process_UBAMonitorFast, this, _1)); register_telegram_type(0x19, F("UBAMonitorSlow"), true, std::bind(&Boiler::process_UBAMonitorSlow, this, _1)); register_telegram_type(0x34, F("UBAMonitorWW"), false, std::bind(&Boiler::process_UBAMonitorWW, this, _1)); diff --git a/src/emsesp.cpp b/src/emsesp.cpp index 99c9c2da9..9be3bc02c 100644 --- a/src/emsesp.cpp +++ b/src/emsesp.cpp @@ -582,9 +582,11 @@ void EMSESP::incoming_telegram(uint8_t * data, const uint8_t length) { txservice_.send_poll(); // close the bus txservice_.post_send_query(); // follow up with any post-read tx_successful = true; + txservice_.reset_retry_count(); } else if (first_value == TxService::TX_WRITE_FAIL) { LOG_ERROR(F("Last Tx write rejected by host")); txservice_.send_poll(); // close the bus + txservice_.reset_retry_count(); } } else { // got a telegram with data in it. See if the src/dest matches that from the last one we sent @@ -595,6 +597,7 @@ void EMSESP::incoming_telegram(uint8_t * data, const uint8_t length) { LOG_DEBUG(F("Last Tx read successful")); txservice_.increment_telegram_read_count(); txservice_.send_poll(); // close the bus + txservice_.reset_retry_count(); tx_successful = true; } } diff --git a/src/telegram.cpp b/src/telegram.cpp index 3187a64cd..9011f5933 100644 --- a/src/telegram.cpp +++ b/src/telegram.cpp @@ -390,7 +390,7 @@ void TxService::send() { // if there's nothing in the queue to transmit, send back a poll and quit if (tx_telegrams_.empty()) { - send_poll(); + //send_poll(); return; } diff --git a/src/uart/emsuart_esp32.cpp b/src/uart/emsuart_esp32.cpp index 11ac5dc05..c353a695c 100644 --- a/src/uart/emsuart_esp32.cpp +++ b/src/uart/emsuart_esp32.cpp @@ -103,7 +103,7 @@ void EMSuart::start(uint8_t tx_mode) { drop_next_rx = true; buf_handle = xRingbufferCreate(128, RINGBUF_TYPE_NOSPLIT); ESP_ERROR_CHECK(uart_isr_register(EMSUART_UART, emsuart_rx_intr_handler, NULL, ESP_INTR_FLAG_IRAM, &uart_handle)); - xTaskCreate(emsuart_recvTask, "emsuart_recvTask", 2048, NULL, 12, NULL); + xTaskCreate(emsuart_recvTask, "emsuart_recvTask", 2048, NULL, configMAX_PRIORITIES -1, NULL); EMS_UART.int_ena.brk_det = 1; // activate only break } diff --git a/src/uart/emsuart_esp8266.h b/src/uart/emsuart_esp8266.h index c92ea6fd5..a8841588e 100644 --- a/src/uart/emsuart_esp8266.h +++ b/src/uart/emsuart_esp8266.h @@ -30,7 +30,7 @@ #define EMS_MAXBUFFERS 3 // buffers for circular filling to avoid collisions #define EMS_MAXBUFFERSIZE 33 // max size of the buffer. EMS packets are max 32 bytes, plus extra 2 for BRKs -#define EMSUART_recvTaskPrio 1 // 0, 1 or 2. 0 being the lowest +#define EMSUART_recvTaskPrio 2 // 0, 1 or 2. 0 being the lowest #define EMSUART_recvTaskQueueLen 10 // number of queued Rx triggers #define EMS_TXMODE_DEFAULT 1