diff --git a/display.c b/display.c --- a/display.c +++ b/display.c @@ -74,6 +74,11 @@ void display_process(therm_settings_t* s ssd1306_drawlogo(); switch(goto_mode) { + case 3: + { + ssd1306_DrawString("-> loader ", 1, 40); + } break; + case 2: { ssd1306_DrawString("-> heat ", 1, 40); @@ -86,11 +91,6 @@ void display_process(therm_settings_t* s case 0: { - ssd1306_DrawString("-> loader ", 1, 40); - } break; - - case 3: - { ssd1306_DrawString("-> reset ", 1, 40); } } @@ -99,15 +99,6 @@ void display_process(therm_settings_t* s if(SW_BTN_PRESSED) { switch(goto_mode) { case 3: - status->state = STATE_IDLE; - flash_erase(set); - case 2: - status->state = STATE_PREHEAT_BREW; - break; - case 1: - status->state = STATE_SETP; - break; - case 0: { ssd1306_clearscreen(); ssd1306_DrawString("Bootloader Entered", 0, 0); @@ -116,6 +107,17 @@ void display_process(therm_settings_t* s bootloader_enter(); // Resets into bootloader status->state = STATE_IDLE; // Just in case } break; + case 2: + status->state = STATE_PREHEAT_BREW; + break; + case 1: + status->state = STATE_SETP; + break; + case 0: + status->state = STATE_IDLE; + flash_erase(set); + NVIC_SystemReset(); + break; default: status->state = STATE_PREHEAT_BREW;