static state_t menuLidOpenDur(button_t button) { if (button == BUTTON_ENTER) { lcdprint_P(PSTR("Lid open timer"), true); editInt = pid.getLidOpenDuration(); } else if (button == BUTTON_LEAVE) { storeLidParam(LIDPARAM_DURATION, editInt); } menuNumberEdit(button, 10, 0, 1000, PSTR("%3d seconds")); return ST_AUTO; }
static state_t menuProbeOffset(button_t button) { unsigned char probeIndex = Menus.getState() - ST_PROBEOFF0; if (button == BUTTON_ENTER) { menuProbenameLine(probeIndex); editInt = pid.Probes[probeIndex]->Offset; } else if (button == BUTTON_LEAVE) storeAndReportProbeOffset(probeIndex, editInt); menuNumberEdit(button, 1, -100, 100, PSTR("Offset %4d"DEGREE"%c")); return ST_AUTO; }
static state_t menuLidOpenOff(button_t button) { if (button == BUTTON_ENTER) { lcdprint_P(PSTR("Lid open offset"), true); editInt = pid.LidOpenOffset; } else if (button == BUTTON_LEAVE) { storeLidParam(LIDPARAM_OFFSET, editInt); } menuNumberEdit(button, 1, 0, 100, PSTR("%3d%% below set")); return ST_AUTO; }
static state_t menuSetpoint(button_t button) { if (button == BUTTON_ENTER) { lcd.clear(); lcd.print(F("Cooling setpoint")); editInt = g_SetPoint; } else if (isEditing && button == BUTTON_CENTER) { setSetPoint(editInt); } return menuNumberEdit(button, 1, -40, 100, PSTR(" %3d"DEGREE"%c ")); }
static state_t menuMaxFanSpeed(button_t button) { if (button == BUTTON_ENTER) { lcdprint_P(PSTR("Maximum auto fan"), true); editInt = pid.getFanMaxSpeed(); } else if (button == BUTTON_LEAVE) { if (editInt != pid.getFanMaxSpeed()) storeAndReportMaxFanSpeed(editInt); } menuNumberEdit(button, 5, 0, 100, PSTR("speed %3d%%")); return ST_AUTO; }
state_t menuLcdBrightness(button_t button) { if (button == BUTTON_ENTER) { lcd.clear(); lcd.print(F("LCD brightness")); editInt = rgb.getBrightness(); } else if (isEditing && button == BUTTON_CENTER) configChanged(); state_t r = menuNumberEdit(button, 10, 10, 100, PSTR(" %3d%% ")); if (isEditing && button & (BUTTON_LEFT | BUTTON_RIGHT)) rgb.setBrightness(editInt); return r; }
static state_t menuMinRunTime(button_t button) { if (button == BUTTON_ENTER) { lcd.clear(); lcd.print(F("Min ON time")); editInt = g_MinRunTime; } else if (isEditing && button == BUTTON_CENTER) { g_MinRunTime = editInt; configChanged(); } return menuNumberEdit(button, 1, 0, 30, PSTR(" %3d minutes ")); }
static state_t menuCutOutDifferential(button_t button) { if (button == BUTTON_ENTER) { lcd.clear(); lcd.print(F("Cutout diff")); editInt = g_CutoutOffset; } else if (isEditing && button == BUTTON_CENTER) { g_CutoutOffset = editInt; configChanged(); } return menuNumberEdit(button, 1, 0, 30, PSTR(" %3d"DEGREE"%c ")); }
static state_t menuSetpoint(button_t button) { if (button == BUTTON_ENTER) { lcdprint_P(PSTR("Set temperature:"), true); editInt = pid.getSetPoint(); } else if (button == BUTTON_LEAVE) { // Check to see if it is different because the setPoint // field stores either the setPoint or manual mode if (editInt != pid.getSetPoint()) storeSetPoint(editInt); } menuNumberEdit(button, 5, 0, 1000, PSTR("%3d"DEGREE"%c")); return ST_AUTO; }
static state_t menuLcdBacklight(button_t button) { if (button == BUTTON_ENTER) { lcdprint_P(PSTR("LCD brightness"), true); editInt = g_LcdBacklight; } else if (button == BUTTON_LEAVE) { if (editInt != g_LcdBacklight) { storeLcdBacklight(editInt); reportLcdParameters(); } } menuNumberEdit(button, 10, 0, 100, PSTR("%3d%%")); setLcdBacklight(0x80 | editInt); return ST_AUTO; }