void stateSetTime() { menuLevel1(1); } void stateSetHour() { lcd.clear(); lcd.print("Set Hours"); } void stateChangeHour() { lcd.clear(); sprintf(buff, "%02d", hours); lcd.print(buff); } void stateIncreaseHour() { getTime(); if(hours==23) hours=0; else hours++; shiftCurrentTime(); makeAnAction(ACTION_AUTO); } void stateDecreaseHour() { getTime(); if(hours==0) hours=23; else hours--; shiftCurrentTime(); makeAnAction(ACTION_AUTO); } void stateSetMinutes() { lcd.clear(); lcd.print("Set Minutes"); } void stateChangeMinutes() { lcd.clear(); sprintf(buff, "%02d", minutes); lcd.print(buff); } void stateIncreaseMinutes() { getTime(); if(minutes==59) minutes=0; else minutes++; shiftCurrentTime(); makeAnAction(ACTION_AUTO); } void stateDecreaseMinutes() { getTime(); if(minutes==0) minutes=59; else minutes--; shiftCurrentTime(); makeAnAction(ACTION_AUTO); } void stateSetSeconds() { lcd.clear(); lcd.print("Set Seconds"); } void stateChangeSeconds() { lcd.clear(); sprintf(buff, "%02d", seconds); lcd.print(buff); } void stateIncreaseSeconds() { getTime(); if(seconds==59) seconds=0; else seconds++; shiftCurrentTime(); makeAnAction(ACTION_AUTO); } void stateDecreaseSeconds() { getTime(); if(seconds==0) seconds=59; else seconds--; shiftCurrentTime(); makeAnAction(ACTION_AUTO); }