Add/change menu items to Simple Menu

Do you have a question on how to do something.
Ask in here.
Post Reply
StuGotz
Posts: 95
Joined: Sat Oct 15, 2011 9:17 am

Add/change menu items to Simple Menu

Post 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!
binder
Posts: 2865
Joined: Fri Mar 18, 2011 6:20 pm
Location: Illinois
Contact:

Re: Add/change menu items to Simple Menu

Post 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
StuGotz
Posts: 95
Joined: Sat Oct 15, 2011 9:17 am

Re: Add/change menu items to Simple Menu

Post 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!
StuGotz
Posts: 95
Joined: Sat Oct 15, 2011 9:17 am

Re: Add/change menu items to Simple Menu

Post 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!
StuGotz
Posts: 95
Joined: Sat Oct 15, 2011 9:17 am

Re: Add/change menu items to Simple Menu

Post 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.
alexwbush
Posts: 327
Joined: Tue Mar 22, 2011 12:45 am
Location: San Diego, CA

Re: Add/change menu items to Simple Menu

Post by alexwbush »

your main displayed cloud and thunderstorm status?

man... I need to get back into messing with my controller
StuGotz
Posts: 95
Joined: Sat Oct 15, 2011 9:17 am

Re: Add/change menu items to Simple Menu

Post 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.
Post Reply