mirror of
https://github.com/emsesp/EMS-ESP32.git
synced 2025-12-07 16:29:51 +03:00
prevent multiple reading of long messages with no offset
This commit is contained in:
@@ -1061,6 +1061,8 @@ void EMSESP::incoming_telegram(uint8_t * data, const uint8_t length) {
|
||||
// get_uptime is only updated once per loop, does not give the right time
|
||||
LOG_TRACE(F("[UART_DEBUG] Echo after %d ms: %s"), ::millis() - rx_time_, Helpers::data_to_hex(data, length).c_str());
|
||||
#endif
|
||||
// add to RxQueue for log/watch
|
||||
rxservice_.add(data, length);
|
||||
return; // it's an echo
|
||||
}
|
||||
|
||||
@@ -1096,7 +1098,7 @@ void EMSESP::incoming_telegram(uint8_t * data, const uint8_t length) {
|
||||
tx_successful = true;
|
||||
// if telegram is longer read next part with offset + 25 for ems+
|
||||
if (length == 32) {
|
||||
if (txservice_.read_next_tx() == read_id_) {
|
||||
if (txservice_.read_next_tx(data[3]) == read_id_) {
|
||||
read_next_ = true;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user