From ccab932e8decb7fbc3efd1726f7c0a80421740d2 Mon Sep 17 00:00:00 2001 From: proddy Date: Sun, 21 Dec 2025 22:30:03 +0100 Subject: [PATCH] dont long rx garbage if ems bus not connected --- src/core/telegram.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/core/telegram.cpp b/src/core/telegram.cpp index 1c31f4d51..0056c1f33 100644 --- a/src/core/telegram.cpp +++ b/src/core/telegram.cpp @@ -152,8 +152,9 @@ void RxService::add(uint8_t * data, uint8_t length) { } // validate the CRC. if it fails then increment the number of corrupt/incomplete telegrams and only report to console/syslog + // if bus is not connected, do not count echos as errors uint8_t crc = calculate_crc(data, length - 1); - if (data[length - 1] != crc) { + if ((data[length - 1] != crc) && bus_connected()) { if (data[0] != EMSuart::last_tx_src()) { // do not count echos as errors telegram_error_count_++; LOG_WARNING("Incomplete Rx: %s", Helpers::data_to_hex(data, length).c_str()); // include CRC