Move logging of version/data/time to setup()

Move logging of version/data/time to setup() to ensure it is also printed to serial.
This commit is contained in:
mvgalen 2025-01-04 22:29:46 +01:00
parent 0512d02101
commit af296ac88a
2 changed files with 5 additions and 3 deletions

View file

@ -4,8 +4,6 @@
#include <inttypes.h>
#include "Print.h"
extern const char* version_number; // The current software version, shown on webserver
class Logging : public Print {
void add_timestamp(size_t size);
@ -13,7 +11,7 @@ class Logging : public Print {
virtual size_t write(const uint8_t* buffer, size_t size);
virtual size_t write(uint8_t) { return 0; }
void printf(const char* fmt, ...);
Logging() {printf("Battery emulator %s build "__DATE__ " " __TIME__ "\n", version_number);}
Logging() {}
};
extern Logging logging;