@@ -65,66 +65,68 @@ void display_process(therm_settings_t* s
if(temp_changed) {
char tempstr[6];
itoa_fp(status->temp, status->temp_frac, tempstr);
ssd1306_DrawString("Temp: ", 3, 40);
ssd1306_DrawString(" ", 3, 72);
ssd1306_DrawString(tempstr, 3, 72);
}
ssd1306_drawlogo();
switch(goto_mode) {
case 3:
{
ssd1306_DrawString("-> loader ", 1, 40);
} break;
case 2:
ssd1306_DrawString("-> heat ", 1, 40);
case 1:
ssd1306_DrawString("-> setup ", 1, 40);
case 0:
ssd1306_DrawString("-> reset ", 1, 40);
// Button handler
if(SW_BTN_PRESSED) {
status->state = STATE_IDLE;
flash_erase(set);
status->state = STATE_PREHEAT_BREW;
break;
status->state = STATE_SETP;
ssd1306_clearscreen();
ssd1306_DrawString("Bootloader Entered", 0, 0);
ssd1306_DrawString("Device won't boot", 2, 0);
ssd1306_DrawString("until reflashed!", 3, 0);
bootloader_enter(); // Resets into bootloader
status->state = STATE_IDLE; // Just in case
NVIC_SystemReset();
default:
else if(SW_UP_PRESSED && goto_mode < 3) {
goto_mode++;
else if(SW_DOWN_PRESSED && goto_mode > 0) {
goto_mode--;
Status change: