trae fix
This commit is contained in:
1 parent
ad4002ecfb
commit
d163397de4
2 files changed
+19
-2
No files matched your search
@@ -41,7 +41,7 @@
|
||||
// 1 = print every raw UART frame candidate as hex on the Serial
|
||||
// Monitor (115200). Use this to capture real traffic from the
|
||||
// module so the frame format can be confirmed/reverse-engineered.
|
||||
#define DEBUG_RADAR_RAW 0
|
||||
#define DEBUG_RADAR_RAW 1
|
||||
|
||||
// 1 = diagnostic mode only: Serial-only target printout, no Wi-Fi,
|
||||
// no web server, no WebSocket. This is the recommended first
|
||||
|
||||
+18
-1
@@ -109,7 +109,24 @@ void loop() {
|
||||
#endif
|
||||
}
|
||||
|
||||
#if !DIAGNOSTIC_MODE
|
||||
#if DIAGNOSTIC_MODE
|
||||
// Print stats periodically even if no frame is parsed yet
|
||||
static uint32_t lastStatsReport = 0;
|
||||
uint32_t now = millis();
|
||||
if (now - lastStatsReport >= 5000) { // every 5 seconds
|
||||
const LD2453Stats &stats = radar.getStats();
|
||||
Serial.println(F("\n--- Periodic Status ---"));
|
||||
Serial.print(F("Bytes received: "));
|
||||
Serial.println(stats.bytesReceived);
|
||||
Serial.print(F("Frames parsed: "));
|
||||
Serial.println(stats.framesParsed);
|
||||
Serial.print(F("Parse errors: "));
|
||||
Serial.println(stats.parseErrors);
|
||||
Serial.print(F("Packets/sec: "));
|
||||
Serial.println(stats.packetsPerSecond, 1);
|
||||
lastStatsReport = now;
|
||||
}
|
||||
#else
|
||||
webServer.loop();
|
||||
#endif
|
||||
}
|
||||
Reference in new issue
Block a user