How do I set the date/time on a custom menu?
Posted: Wed Dec 02, 2015 11:38 pm
I have a custom menu set up, but I can't figure out how to give myself the option to set the date/time from the custom menu. Here's what I have so far:
What should I do to get this to work?
Thanks,
Gabe
Code: Select all
//Custom Menu Code
prog_char menu0_label[] PROGMEM = "Manual Feed";
prog_char menu1_label[] PROGMEM = "Start AWC";
prog_char menu2_label[] PROGMEM = "Clear Alerts & Vars";
prog_char menu3_label[] PROGMEM = "pH Calibration";
prog_char menu4_label[] PROGMEM = "Toggle All Pumps";
prog_char menu5_label[] PROGMEM = "Set Date and Time";
PROGMEM const char *menu_items[] = {
menu0_label, menu1_label, menu2_label, menu3_label, menu4_label, menu5_label
};
void MenuEntry1()
{
feedsToday += 1;
wp25On = false;
feedingPauseTimer = now();
feeding = true;
}
void MenuEntry2()
{
if (!ReefAngel.IO.GetChannel(0))
{
AWCToday = false;
AWC = true;
}
}
void MenuEntry3()
{
//Clear portal variables.
ReefAngel.CustomVar[Var_AWCCountTotal] = 0;
ReefAngel.CustomVar[Var_AWCCountToday] = 0;
ReefAngel.CustomVar[Var_AWCDrainFail] = 0;
ReefAngel.CustomVar[Var_AWCFillFail] = 0;
ReefAngel.CustomVar[Var_AWCOverflowFail] = 0;
ReefAngel.CustomVar[Var_AWCATOFail] = 0;
//Clear AWC control variables.
AWC = false;
AWCToday = false;
AWCFail = false;
AWCCheck = 0;
AWCDrainCheck = 0;
//Clear ATO timeout.
ReefAngel.ATOClear();
ReefAngel.DisplayMenuEntry("Clear ATO Timeout");
}
void MenuEntry4()
{
ReefAngel.StartSetupCalibrateChoicePH();
}
void MenuEntry5()
{
ReefAngel.WaterChangeModeStart();
}
void MenuEntry6()
{
ReefAngel.DisplayMenuEntry("Item 1");ReefAngel.SetupDateTime();
ReefAngel.DisplayedMenu = ALT_SCREEN_MODE;
}Thanks,
Gabe