@@ -400,49 +400,53 @@ void display_process(therm_settings_t* s
ssd1306_drawstring(tempstr, 1, 57);
ssd1306_drawstring("Press to accept", 3, 40);
// Button handler
if(SW_BTN_PRESSED) {
flash_save(set);
status->state = STATE_IDLE;
}
else {
user_input_signed(&set->val.temp_offset);
// Event Handler
// N/A
} break;
case STATE_PREHEAT:
{
// Write text to OLED
// [ therm : preheating brew ]
// [ 30 => 120 C ]
ssd1306_drawstring("Preheating...", 0, 0);
if(set->val.plant_type == PLANT_HEATER)
else
ssd1306_drawstring("Precooling...", 0, 0);
//ssd1306_drawlogo();
draw_setpoint(status);
status->pid_enabled = 1;
status->setpoint = set->val.setpoint_brew;
user_input((uint16_t*)&set->val.setpoint_brew);
if(status->temp >= status->setpoint) {
status->state = STATE_MAINTAIN;
case STATE_MAINTAIN:
Status change: