main: tweak log levels, add crash info
This commit is contained in:
parent
ea058a33da
commit
ccb58082a2
18
src/main.cpp
18
src/main.cpp
@ -84,13 +84,23 @@ void setup() {
|
|||||||
// Turn on,
|
// Turn on,
|
||||||
Platform::preSetup();
|
Platform::preSetup();
|
||||||
Log.notice(u8"🐛 Booting Renderbug!");
|
Log.notice(u8"🐛 Booting Renderbug!");
|
||||||
Log.notice(u8"🐞 I am built for %d LEDs running on %dmA", HardwareConfig::MAX_LED_NUM, PSU_MILLIAMPS);
|
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());
|
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[15];
|
||||||
|
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)");
|
Log.notice(u8"Setting timezone to +2 (CEST)");
|
||||||
Platform::setTimezone(+2);
|
Platform::setTimezone(+2);
|
||||||
|
|
||||||
Log.notice(u8"Setting up platform...");
|
Log.trace(u8"Setting up platform...");
|
||||||
|
|
||||||
Platform::setup();
|
Platform::setup();
|
||||||
Platform::bootSplash();
|
Platform::bootSplash();
|
||||||
@ -100,7 +110,7 @@ void setup() {
|
|||||||
|
|
||||||
// Tune in,
|
// Tune in,
|
||||||
if (Platform::bootopts.isSafeMode) {
|
if (Platform::bootopts.isSafeMode) {
|
||||||
Log.notice(u8"⚠️ Starting Figment in safe mode!!!");
|
Log.error(u8"⚠️ Starting Figment in safe mode!!!");
|
||||||
runner = &SafeMode::safeModeApp;
|
runner = &SafeMode::safeModeApp;
|
||||||
FastLED.showColor(CRGB(5, 0, 0));
|
FastLED.showColor(CRGB(5, 0, 0));
|
||||||
FastLED.show();
|
FastLED.show();
|
||||||
@ -108,7 +118,7 @@ void setup() {
|
|||||||
Log.notice(u8"🌌 Starting Figment...");
|
Log.notice(u8"🌌 Starting Figment...");
|
||||||
|
|
||||||
if (Platform::bootopts.isSetup) {
|
if (Platform::bootopts.isSetup) {
|
||||||
Log.notice(u8"🔧 Booting up into setup profile!!!");
|
Log.warning(u8"🔧 Booting up into setup profile!!!");
|
||||||
Static<ConfigService>::instance()->overrideProfile("setup");
|
Static<ConfigService>::instance()->overrideProfile("setup");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user