From 6078ca9659f20eae0127a8858a5812712deac339 Mon Sep 17 00:00:00 2001 From: Claude Date: Tue, 1 Dec 2026 09:41:25 +0000 Subject: [PATCH] Turn off the communication timing logs (DEBUG_COMMUNICATION) The field test is done: replies avg 113-205 ms, spikes up to 1.5 s, one slow reply covered by the retry, 0 failed commands. The #define in deviceNodeEthernet2Serial.cpp and deviceNodeSensor.cpp is commented out; uncomment it to get the timing lines again. The reconnect error ("No reply to N requests in a row") is always logged. Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_0139veDo3XyavMuVhdnHcN16 --- lib/App/common/deviceNodeEthernet2Serial.cpp | 2 +- lib/App/common/deviceNodeSensor.cpp | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/lib/App/common/deviceNodeEthernet2Serial.cpp b/lib/App/common/deviceNodeEthernet2Serial.cpp index 366ffc4f..4ae0efed 100644 --- a/lib/App/common/deviceNodeEthernet2Serial.cpp +++ b/lib/App/common/deviceNodeEthernet2Serial.cpp @@ -11,7 +11,7 @@ // #define DEBUG_EXTRA // #define DEBUG_SERIAL_COMMUNICATION // Request / reply timing of the I/O thread: no reply, slow and late replies, one-minute summary -#define DEBUG_COMMUNICATION +// #define DEBUG_COMMUNICATION // timing logs (see the commit "Debug: log communication timing ...") #ifndef E2UART_SLOW_REPLY_MS #define E2UART_SLOW_REPLY_MS 500 #endif diff --git a/lib/App/common/deviceNodeSensor.cpp b/lib/App/common/deviceNodeSensor.cpp index db235c28..a59338b0 100644 --- a/lib/App/common/deviceNodeSensor.cpp +++ b/lib/App/common/deviceNodeSensor.cpp @@ -4,7 +4,7 @@ #include "kernelPrototype.h" // Communication timing: slow replies, timeouts and a one-minute summary (see txTimingReport) -#define DEBUG_COMMUNICATION +// #define DEBUG_COMMUNICATION // timing logs (see the commit "Debug: log communication timing ...") #ifndef LGS_SLOW_REPLY_MS #define LGS_SLOW_REPLY_MS 500 // replies slower than this are logged one by one #endif @@ -213,6 +213,9 @@ void deviceNodeSensor::txTimingDone(bool ok) LOG(tB); }; }; +#else + (void) ok; + (void) tTotal; #endif m_nTxStartMs = 0; m_nTxFirstMs = 0;