mirror of
https://github.com/dalathegreat/Battery-Emulator.git
synced 2025-10-05 19:42:08 +02:00
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:
parent
0512d02101
commit
af296ac88a
2 changed files with 5 additions and 3 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue