main: move startup strings to flash

This commit is contained in:
Torrie Fischer 2023-12-20 12:11:49 +01:00
parent 6df7e938cb
commit 924673ada3

View File

@ -83,24 +83,24 @@ MainLoop* runner = &SafeMode::safeModeApp;
void setup() { void setup() {
// Turn on, // Turn on,
Platform::preSetup(); Platform::preSetup();
Log.notice(u8"🐛 Booting Renderbug!"); Log.notice(F(u8"\n\n\n🐛 Booting Renderbug!"));
Log.notice(u8"🐞 I am built for %d LEDs on pin %d", HardwareConfig::MAX_LED_NUM, RENDERBUG_LED_PIN); Log.notice(F(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(F(u8"📡 Platform %s version %s"), Platform::name(), Platform::version());
Log.notice(u8"Setting timezone to +2 (CEST)"); Log.notice(F(u8"Setting timezone to +2 (CEST)"));
Platform::setTimezone(+1); Platform::setTimezone(+1);
Log.trace(u8"Setting up platform..."); Log.trace(F(u8"Setting up platform..."));
Platform::setup(); Platform::setup();
Platform::bootSplash(); Platform::bootSplash();
Log.notice(u8"💡 Starting FastLED on %d LEDs...", HardwareConfig::MAX_LED_NUM); Log.notice(F(u8"💡 Starting FastLED on %d LEDs..."), HardwareConfig::MAX_LED_NUM);
Platform::addLEDs(leds, HardwareConfig::MAX_LED_NUM); Platform::addLEDs(leds, HardwareConfig::MAX_LED_NUM);
// Tune in, // Tune in,
if (Platform::bootopts.isSafeMode) { if (Platform::bootopts.isSafeMode) {
Log.warning(u8"⚠️ Starting Figment in safe mode!!!"); Log.warning(F(u8"⚠️ Starting Figment in safe mode!!!"));
runner = &SafeMode::safeModeApp; runner = &SafeMode::safeModeApp;
for(auto task : runner->scheduler.tasks) { for(auto task : runner->scheduler.tasks) {
task->state = Task::Running; task->state = Task::Running;
@ -108,10 +108,10 @@ void setup() {
FastLED.showColor(CRGB(255, 0, 0)); FastLED.showColor(CRGB(255, 0, 0));
FastLED.show(); FastLED.show();
} else { } else {
Log.notice(u8"🌌 Starting Figment..."); Log.notice(F(u8"🌌 Starting Figment..."));
if (Platform::bootopts.isSetup) { if (Platform::bootopts.isSetup) {
Log.warning(u8"🔧 Booting up into setup profile!!!"); Log.warning(F(u8"🔧 Booting up into setup profile!!!"));
Static<ConfigService>::instance()->overrideProfile("setup"); Static<ConfigService>::instance()->overrideProfile("setup");
} }
@ -124,8 +124,8 @@ void setup() {
Serial.flush(); Serial.flush();
runner->start(); runner->start();
Log.notice(u8"💽 %l bytes of free RAM", Platform::freeRam()); Log.notice(F(u8"💽 %l bytes of free RAM"), Platform::freeRam());
Log.notice(u8"🚀 Setup complete! Ready to rock and roll."); Log.notice(F(u8"🚀 Setup complete! Ready to rock and roll."));
Serial.flush(); Serial.flush();
} }