Merge branch 'feat-additional-compensation' of https://github.com/jpirnay/crosspoint-reader into mybuild

This commit is contained in:
jpirnay
2026-03-29 18:35:36 +02:00
parent 4740145a88
commit 0bdfc6e816
27 changed files with 1514 additions and 85 deletions
+10 -1
View File
@@ -1,5 +1,7 @@
#include "Logging.h"
#include <HalClock.h>
#include <string>
#define MAX_ENTRY_LEN 256
@@ -41,7 +43,14 @@ void logPrintf(const char* level, const char* origin, const char* format, ...) {
// add the timestamp
{
unsigned long ms = millis();
int len = snprintf(c, sizeof(buf), "[%lu] ", ms);
char wallClock[12];
HalClock::formatLogTime(wallClock, sizeof(wallClock));
int len;
if (wallClock[0] != '\0') {
len = snprintf(c, sizeof(buf), "[%lu %s] ", ms, wallClock);
} else {
len = snprintf(c, sizeof(buf), "[%lu] ", ms);
}
if (len < 0) {
return; // encoding error, skip logging
}