diff --git a/Software/Software.ino b/Software/Software.ino index 7c75b07d..44016637 100644 --- a/Software/Software.ino +++ b/Software/Software.ino @@ -97,6 +97,10 @@ Logging logging; void setup() { init_serial(); + // We print this after setting up serial, such that is also printed to serial with DEBUG_VIA_USB set. + logging.printf("Battery emulator %s build " __DATE__ + " " __TIME__ "\n", version_number); + init_stored_settings(); #ifdef WIFI diff --git a/Software/src/devboard/utils/logging.h b/Software/src/devboard/utils/logging.h index 102c0d80..84fc9a97 100644 --- a/Software/src/devboard/utils/logging.h +++ b/Software/src/devboard/utils/logging.h @@ -4,8 +4,6 @@ #include #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,12 +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;