Browse Source

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 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0139veDo3XyavMuVhdnHcN16
pull/24/head
Claude 3 hours ago
parent
commit
6078ca9659
Failed to extract signature
  1. 2
      lib/App/common/deviceNodeEthernet2Serial.cpp
  2. 5
      lib/App/common/deviceNodeSensor.cpp

2
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

5
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;

Loading…
Cancel
Save