diff --git a/Software/Software.ino b/Software/Software.ino index f724d9e2..ce9df0f5 100644 --- a/Software/Software.ino +++ b/Software/Software.ino @@ -98,6 +98,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 89d579cf..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,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;