don't wait for TX-read when getting new poll

This commit is contained in:
MichaelDvP
2024-11-23 18:48:28 +01:00
parent a5879d1995
commit 549f7e30db

View File

@@ -1474,13 +1474,9 @@ void EMSESP::incoming_telegram(uint8_t * data, const uint8_t length) {
txservice_.reset_retry_count(); txservice_.reset_retry_count();
tx_successful = true; // no retries tx_successful = true; // no retries
} else { } else {
txservice_.send_poll(); // close the bus
LOG_ERROR("Last Tx write host reply: 0x%02X", first_value); LOG_ERROR("Last Tx write host reply: 0x%02X", first_value);
} }
} else if (tx_state == Telegram::Operation::TX_READ && length == 1) { } else if (tx_state == Telegram::Operation::TX_READ && length > 1) {
EMSbus::tx_state(Telegram::Operation::TX_READ); // reset Tx wait state
return;
} else if (tx_state == Telegram::Operation::TX_READ) {
// got a telegram with data in it. See if the src/dest matches that from the last one we sent and continue to process it // got a telegram with data in it. See if the src/dest matches that from the last one we sent and continue to process it
uint8_t src = data[0]; uint8_t src = data[0];
uint8_t dest = data[1]; uint8_t dest = data[1];