mirror of
https://github.com/emsesp/EMS-ESP32.git
synced 2025-12-08 08:49:52 +03:00
count tx-queue overflows as tx-errors
This commit is contained in:
@@ -434,6 +434,11 @@ void TxService::add(const uint8_t operation,
|
||||
|
||||
// if the queue is full, make room but removing the last one
|
||||
if (tx_telegrams_.size() >= MAX_TX_TELEGRAMS) {
|
||||
if (tx_telegrams_.front().telegram_->operation == Telegram::Operation::TX_WRITE) {
|
||||
telegram_write_fail_count_++;
|
||||
} else {
|
||||
telegram_read_fail_count_++;
|
||||
}
|
||||
tx_telegrams_.pop_front();
|
||||
}
|
||||
|
||||
@@ -507,6 +512,11 @@ void TxService::add(uint8_t operation, const uint8_t * data, const uint8_t lengt
|
||||
|
||||
// if the queue is full, make room but removing the last one
|
||||
if (tx_telegrams_.size() >= MAX_TX_TELEGRAMS) {
|
||||
if (tx_telegrams_.front().telegram_->operation == Telegram::Operation::TX_WRITE) {
|
||||
telegram_write_fail_count_++;
|
||||
} else {
|
||||
telegram_read_fail_count_++;
|
||||
}
|
||||
tx_telegrams_.pop_front();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user