warning in log on tx-queue overflow

This commit is contained in:
MichaelDvP
2023-11-04 18:17:33 +01:00
parent d105c18bf7
commit ab6cf78822

View File

@@ -445,6 +445,7 @@ void TxService::add(const uint8_t operation,
// if the queue is full, make room by removing the last one // if the queue is full, make room by removing the last one
if (tx_telegrams_.size() >= MAX_TX_TELEGRAMS) { if (tx_telegrams_.size() >= MAX_TX_TELEGRAMS) {
LOG_WARNING("Tx queue overflow, skip one message");
if (tx_telegrams_.front().telegram_->operation == Telegram::Operation::TX_WRITE) { if (tx_telegrams_.front().telegram_->operation == Telegram::Operation::TX_WRITE) {
telegram_write_fail_count_++; telegram_write_fail_count_++;
} else { } else {
@@ -528,6 +529,7 @@ void TxService::add(uint8_t operation, const uint8_t * data, const uint8_t lengt
// if the queue is full, make room by removing the last one // if the queue is full, make room by removing the last one
if (tx_telegrams_.size() >= MAX_TX_TELEGRAMS) { if (tx_telegrams_.size() >= MAX_TX_TELEGRAMS) {
LOG_WARNING("Tx queue overflow, skip one message");
if (tx_telegrams_.front().telegram_->operation == Telegram::Operation::TX_WRITE) { if (tx_telegrams_.front().telegram_->operation == Telegram::Operation::TX_WRITE) {
telegram_write_fail_count_++; telegram_write_fail_count_++;
} else { } else {