platform: move some startup state reporting from main to platform
This commit is contained in:
10
src/main.cpp
10
src/main.cpp
@@ -87,16 +87,6 @@ void setup() {
|
||||
Log.notice(u8"🐞 I am built for %d LEDs on pin %d", HardwareConfig::MAX_LED_NUM, RENDERBUG_LED_PIN);
|
||||
Log.notice(u8"📡 Platform %s version %s", Platform::name(), Platform::version());
|
||||
|
||||
if (Platform::bootopts.crashCount > 0) {
|
||||
Log.warning(u8"Previous crash detected!!!! We're on attempt %d", Platform::bootopts.crashCount);
|
||||
char lastTaskBuf[16];
|
||||
strncpy(lastTaskBuf, MainLoop::lastTaskName(), sizeof(lastTaskBuf));
|
||||
lastTaskBuf[15] = 0;
|
||||
Log.error(u8"Crash occurred in task %s", lastTaskBuf);
|
||||
}
|
||||
|
||||
Log.trace("Startup reason: %d", Platform::bootopts.resetReason);
|
||||
|
||||
Log.notice(u8"Setting timezone to +2 (CEST)");
|
||||
Platform::setTimezone(+2);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user