Page 1 of 1

Add/change menu items to Simple Menu

Posted: Sun Dec 18, 2011 4:09 pm
by StuGotz
Is there example code for SIMPLE_MENU that I can use to setup a Custom Menu? I just want to remove some things and add in force cloud. Eventually I'd like to add a force storm menu entry.

Thanks!

Re: Add/change menu items to Simple Menu

Posted: Sun Dec 18, 2011 5:10 pm
by binder
StuGotz wrote:Is there example code for SIMPLE_MENU that I can use to setup a Custom Menu? I just want to remove some things and add in force cloud. Eventually I'd like to add a force storm menu entry.

Thanks!
http://forum.reefangel.com/viewtopic.php?f=14&t=311

The manual shows you how to mimic the SIMPLE_MENU which sounds like what you are wanting.

curt

Re: Add/change menu items to Simple Menu

Posted: Sun Dec 18, 2011 5:18 pm
by StuGotz
Sweet. I was looking http://www.reefangel.com/Download.ashx & http://www.reefangel.com/Support.Creati ... items.ashx for something like that. Exactly what I needed. Thanks!

Re: Add/change menu items to Simple Menu

Posted: Sun Dec 18, 2011 6:11 pm
by StuGotz
I got it all added. I had to remove DateTimeSetup from ReefAngel_Features.h, it's custom menu entry and reduce #define CUSTOM_MENU_ENTRIES down to 6 or my sketch was too big. I'll just use the client if I ever have to modify it later.

I'll test the force cloud menu entry tomorrow, the lights are off right now.

Thanks again!

Re: Add/change menu items to Simple Menu

Posted: Mon Dec 19, 2011 11:46 am
by StuGotz
Force clouds worked! But it definitely messed up my custom main's cloud and thunderstorm line on the LCD Display. I was afraid of that was going to happen.

Re: Add/change menu items to Simple Menu

Posted: Mon Dec 19, 2011 12:27 pm
by alexwbush
your main displayed cloud and thunderstorm status?

man... I need to get back into messing with my controller

Re: Add/change menu items to Simple Menu

Posted: Mon Dec 19, 2011 2:35 pm
by StuGotz
This should be the part of Roberto's code that displays the info on the custom main. Mine is a little goofed up though... Towards the end of his code

Code: Select all

 if (LastNumMins!=NumMins(hour(),minute()))
  {
    LastNumMins=NumMins(hour(),minute());
    ReefAngel.LCD.Clear(255,0,113,132,121);
    ReefAngel.LCD.DrawText(0,255,12,113,"C");
    ReefAngel.LCD.DrawText(0,255,18,113,"00:00");
    ReefAngel.LCD.DrawText(0,255,52,113,"L");
    ReefAngel.LCD.DrawText(0,255,58,113,"00:00");
    ReefAngel.LCD.DrawText(0,255,93,113,"DUR");
    if (cloudchance && (NumMins(hour(),minute())<cloudstart))
    {
      int x=0;
      if ((cloudstart/60)>=10) x=18; 
      else x=24;
      ReefAngel.LCD.DrawText(0,255,x,113,(cloudstart/60));
      if ((cloudstart%60)>=10) x=36; 
      else x=42;
      ReefAngel.LCD.DrawText(0,255,x,113,(cloudstart%60));
    }
    ReefAngel.LCD.DrawText(0,255,114,113,cloudduration);
    if (lightningchance) 
    {
      int x=0;
      if (((cloudstart+(cloudduration/2))/60)>=10) x=88; 
      else x=94;
      ReefAngel.LCD.DrawText(0,255,x,113,((cloudstart+(cloudduration/2))/60));
      if (((cloudstart+(cloudduration/2))%60)>=10) x=109; 
      else x=112;
      ReefAngel.LCD.DrawText(0,255,x,113,((cloudstart+(cloudduration/2))%60));
    }
  }   
It's great, it tells you what time Clouds will start, and if there's lighting what time that will happen, and the duration of the clouds.