From 2f69399e87170fd9effa7814128e4cf3af8ba0c4 Mon Sep 17 00:00:00 2001 From: "J. Nick Koston" Date: Wed, 21 Jan 2026 18:20:49 -1000 Subject: [PATCH] naming --- esphome/components/api/api_frame_helper.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/esphome/components/api/api_frame_helper.h b/esphome/components/api/api_frame_helper.h index c6c45e3959..f311e34fd7 100644 --- a/esphome/components/api/api_frame_helper.h +++ b/esphome/components/api/api_frame_helper.h @@ -147,7 +147,7 @@ class APIFrameHelper { if (this->nodelay_state_ == NODELAY_ON) { this->set_nodelay_raw_(false); this->nodelay_state_ = 1; - } else if (this->nodelay_state_ >= LOG_BATCH_MAX) { + } else if (this->nodelay_state_ >= LOG_NAGLE_COUNT) { this->set_nodelay_raw_(true); this->nodelay_state_ = NODELAY_ON; } else { @@ -244,9 +244,9 @@ class APIFrameHelper { uint8_t tx_buf_count_{0}; // Nagle batching state for log messages. NODELAY_ON (-1) means NODELAY is enabled // (immediate send). Values 1-2 count log messages in the current Nagle batch. - // After LOG_BATCH_MAX logs, we switch to NODELAY to flush and reset. + // After LOG_NAGLE_COUNT logs, we switch to NODELAY to flush and reset. static constexpr int8_t NODELAY_ON = -1; - static constexpr int8_t LOG_BATCH_MAX = 2; + static constexpr int8_t LOG_NAGLE_COUNT = 2; int8_t nodelay_state_{NODELAY_ON}; // Internal helper to set TCP_NODELAY socket option