add a real BOOT state, to avoid glitch from redrawing bootscreen twice

also its the right thing to do ;-)
This commit is contained in:
geeksville
2020-03-18 15:00:17 -07:00
parent 0d94458c4e
commit 53765298e1
5 changed files with 38 additions and 13 deletions
+8 -5
View File
@@ -243,18 +243,21 @@ void setup()
if (ssd1306_found)
screen.setup();
screen.showBootscreen();
// Now that the screen is on, show our bootscreen
screen_print("Started...\n");
// Init GPS
gps.setup();
screen_print("Started...\n");
service.init();
// This must be _after_ service.init because we need our preferences loaded from flash to have proper timeout values
PowerFSM_setup(); // we will transition to ON in a couple of seconds, FIXME, only do this for cold boots, not waking from SDS
// setBluetoothEnable(false); we now don't start bluetooth until we enter the proper state
setCPUFast(false); // 80MHz is fine for our slow peripherals
PowerFSM_setup();
powerFSM.trigger(EVENT_BOOT); // transition to ON, FIXME, only do this for cold boots, not waking from SDS
}
void initBluetooth()