mirror of
https://github.com/emsesp/EMS-ESP32.git
synced 2025-12-07 16:29:51 +03:00
enlarge uart-tx-queue, warn overflow
This commit is contained in:
@@ -445,6 +445,7 @@ void TxService::add(const uint8_t operation,
|
||||
|
||||
// if the queue is full, make room by removing the last one
|
||||
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) {
|
||||
telegram_write_fail_count_++;
|
||||
} 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 (tx_telegrams_.size() >= MAX_TX_TELEGRAMS) {
|
||||
LOG_WARNING("Tx queue overflow, skip one message");
|
||||
if (tx_telegrams_.front().telegram_->operation == Telegram::Operation::TX_WRITE) {
|
||||
telegram_write_fail_count_++;
|
||||
} else {
|
||||
|
||||
@@ -34,7 +34,7 @@
|
||||
#include "helpers.h"
|
||||
|
||||
#define MAX_RX_TELEGRAMS 10 // size of Rx queue
|
||||
#define MAX_TX_TELEGRAMS 50 // size of Tx queue
|
||||
#define MAX_TX_TELEGRAMS 100 // size of Tx queue
|
||||
|
||||
// default values for null values
|
||||
static constexpr uint8_t EMS_VALUE_BOOL = 0xFF; // used to mark that something is a boolean
|
||||
|
||||
Reference in New Issue
Block a user