static state_t menuResetConfig(button_t button) { if (button == BUTTON_ENTER) { lcdprint_P(PSTR("Reset config?"), true); editInt = 0; } else if (button == BUTTON_LEAVE) { if (editInt != 0) eepromLoadConfig(1); } menuBooleanEdit(button, NULL); return ST_AUTO; }
static state_t menuResetConfig(button_t button) { if (button == BUTTON_ENTER) { lcd.clear(); lcd.print(F("Reset Config?")); editInt = 0; } else if (isEditing && button == BUTTON_CENTER) { if (editInt) configReset(); return ST_HOME_SMART; } return menuBooleanEdit(button, NULL, PSTR(" No "), PSTR(" Yes ")); }
static state_t menuManualMode(button_t button) { if (button == BUTTON_ENTER) { lcdprint_P(PSTR("Manual fan mode"), true); editInt = pid.getManualOutputMode(); } else if (button == BUTTON_LEAVE) { // Check to see if it is different because the setPoint // field stores either the setPoint or manual mode boolean manual = (editInt != 0); if (manual != pid.getManualOutputMode()) storeSetPoint(manual ? 0 : pid.getSetPoint()); } menuBooleanEdit(button, NULL); return ST_AUTO; }
static state_t menuUnits(button_t button) { if (button == BUTTON_ENTER) { lcd.clear(); lcd.print(F("Temperature unit")); if (g_Units == 'F') editInt = 0; else editInt = !0; } else if (isEditing && button == BUTTON_CENTER) { if (editInt) g_Units = 'C'; else g_Units = 'F'; configChanged(); } return menuBooleanEdit(button, NULL, PSTR(" Fahrenheit "), PSTR(" Celcius ")); }