platform: move some startup state reporting from main to platform

This commit is contained in:
Torrie Fischer
2023-12-11 08:04:55 +01:00
parent d592810b3b
commit e9f63e718c
2 changed files with 24 additions and 10 deletions

View File

@@ -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);