Add indicator that the board is initializing in case something goes wrong with the init sequence -- most likely due to a bad sd card formatting / missing sd card

This commit is contained in:
KemoNine 2020-09-12 17:21:19 -04:00
parent 450c4aeb9c
commit e8a53866b1
1 changed files with 11 additions and 7 deletions

View File

@ -156,14 +156,11 @@ void setup() {
pixels_board.setBrightness(10);
pixels_wing.setBrightness(5);
// Start with blank wing indicator
// Setup neopixels to indicate we are initializing gui slice
// This can serve as an indication something has gone wrong like the sd card is missing
pixels_wing.setPixelColor(0, pixels_board.Color(255, 0, 0));
pixels_board.setPixelColor(0, pixels_board.Color(255, 0, 0));
pixels_wing.show();
// Green : pixels.Color(0, 255, 0)
// Yellow : pixels.Color(255, 255, 0)
// Orange : pixels.Color(255, 128, 0)
// Red : pixels.Color(255, 0, 0)
pixels_board.setPixelColor(0, pixels_board.Color(0, 0, 255));
pixels_board.show();
// Setup BBQ10Keyboard
@ -185,6 +182,13 @@ void setup() {
gslc_InputMapAdd(&m_gui, GSLC_INPUT_PIN_ASSERT, KBD_SW_LF, GSLC_ACTION_FOCUS_NEXT, 0);
gslc_InputMapAdd(&m_gui, GSLC_INPUT_PIN_ASSERT, KBD_SW_RT, GSLC_ACTION_FOCUS_PREV, 0);
gslc_InputMapAdd(&m_gui, GSLC_INPUT_PIN_ASSERT, KBD_SW_OK, GSLC_ACTION_SELECT, 0);
// Set neopixels to standard start state
pixels_wing.clear();
pixels_wing.show();
pixels_board.setPixelColor(0, pixels_board.Color(0, 0, 255));
pixels_board.show();
}
// -----------------------------------