Can't calibrate ph or reset ato timeout

Do you have a question on how to do something.
Ask in here.
Post Reply
sceia
Posts: 30
Joined: Mon Nov 14, 2011 8:06 pm

Can't calibrate ph or reset ato timeout

Post by sceia »

Everytime I try to press either menu item, it just returns to the main screen... Hints?

Scott.

Code: Select all

#include <ReefAngel_Features.h>
#include <Globals.h>
#include <RA_Wifi.h>
#include <Wire.h>
#include <OneWire.h>
#include <Time.h>
#include <DS1307RTC.h>
#include <InternalEEPROM.h>
#include <RA_NokiaLCD.h>
#include <RA_ATO.h>
#include <RA_Joystick.h>
#include <LED.h>
#include <RA_TempSensor.h>
#include <Relay.h>
#include <RA_PWM.h>
#include <Timer.h>
#include <Memory.h>
#include <ReefAngel.h>

#define AutoTopOff          1 
#define Refuge              2 
#define MHOuter             3 
#define Actinic             4 
//#define MHCenter            5 
#define Heater              6 
#define Moonleds            7 
#define Pumps               8 

#define RB         0
#define Moonlight  1  //moonlight

#include <avr/pgmspace.h>
// Create the menu entries
prog_char menu1_label[] PROGMEM = "Feed Fish";
prog_char menu2_label[] PROGMEM = "ATO Clear";
prog_char menu3_label[] PROGMEM = "Calibrate PH";
prog_char menu4_label[] PROGMEM = "-";
prog_char menu5_label[] PROGMEM = "-";
prog_char menu6_label[] PROGMEM = "-";

// Group the menu entries together
PROGMEM const char *menu_items[] = {
  menu1_label, 
  menu2_label, 
  menu3_label,
  menu4_label, 
  menu5_label, 
  menu6_label
};


void MenuEntry1() //"Feed Fish"
{
  ReefAngel.FeedingModeStart();
}
void MenuEntry2() //"ATO Clear"
{
  ReefAngel.ATOClear();
  ReefAngel.DisplayMenuEntry("Clear ATO Timeout");
}

void MenuEntry3() 
{
  ReefAngel.SetupCalibratePH();
  ReefAngel.DisplayedMenu = ALT_SCREEN_MODE;
}

void MenuEntry4() //"Actinic LEDs"
{

}

void MenuEntry5() //"100% Daylight LEDs"
{

}

void MenuEntry6() //"Refuge LEDs"
{

}


void setup() 
{ 
  //Init and custom menus
  ReefAngel.Init();  //Initialize controller
  ReefAngel.InitMenu(pgm_read_word(&(menu_items[0])),SIZE(menu_items));

  //Menu Modes 
  ReefAngel.FeedingModePorts = B10010000;
  ReefAngel.WaterChangePorts = B10010000;
  ReefAngel.OverheatShutoffPorts = B00101110;

  //Pumps and waves on
  ReefAngel.Relay.On(Pumps);  //Turn Sump/Skimmer on at startup

}

void loop() 
{ 
  //Top Off
  ReefAngel.StandardATO(AutoTopOff,25);  //Setup AutoTopOff as Auto Top-Off function with 500s timeout

  //Light Schedule  
  ReefAngel.StandardLights(Refuge,19,00,14,00);  //Refugium schedule 10:00pm - 12:00am   
  //ReefAngel.MHLights(MHCenter,13,0,20,0,15);
  ReefAngel.MHLights(MHOuter,13,15,20,0,15);
  ReefAngel.StandardLights(Actinic,11,0,23,0); 
  ReefAngel.StandardLights(Moonleds,6,30,2,30);

  // Drivers
  ReefAngel.PWM.SetChannel(RB,PWMSlope(10,0,22,0,15,65,45,15));
  ReefAngel.PWM.SetChannel(Moonlight,25);

  //Heating/Cooling
  ReefAngel.StandardHeater(Heater,778,782);  // Setup Heater to turn on at 77.8F and off at 78.2F 

  ReefAngel.ShowInterface();
}
rimai
Posts: 12857
Joined: Fri Mar 18, 2011 6:47 pm

Re: Can't calibrate ph or reset ato timeout

Post by rimai »

It works for me.
Roberto.
sceia
Posts: 30
Joined: Mon Nov 14, 2011 8:06 pm

Re: Can't calibrate ph or reset ato timeout

Post by sceia »

rimai wrote:It works for me.

I'm not sure what's up then?? All it does is go back to the main screen.... The Feed fish menu works though....

Scott.
rimai
Posts: 12857
Joined: Fri Mar 18, 2011 6:47 pm

Re: Can't calibrate ph or reset ato timeout

Post by rimai »

I've seen this behavior you are describing when this line is not in the code:

Code: Select all

  ReefAngel.InitMenu(pgm_read_word(&(menu_items[0])),SIZE(menu_items));
But your code does have it.
Roberto.
Post Reply