changing custom main displays at night

Do you have a question on how to do something.
Ask in here.
Post Reply
psyrob
Posts: 242
Joined: Thu Sep 01, 2011 8:44 pm

changing custom main displays at night

Post by psyrob »

I'm running out of room for displaying things on my screen...is it possible to have one screen during the day and swap a line at night? I want to display the moon phase but right now I don't have the room :cry:
I have a line in the middle of the screen that displays the direction of the pumps I have alternating under the wave maker function along with a timer counting down : I thought I could turn that off at night and have the moon phase listed along that line. Is that possible? Here is the code: Moonphase is squashed into the side of the screen and doesn't fit....I thought it could be swapped for the line after "Display arrows for wavemaker at night....thanks :|

Code: Select all

void DrawCustomMain()
{
    // the graph is drawn/updated when we exit the main menu &
    // when the parameters are saved
    ReefAngel.LCD.DrawDate(6, 120);
  ReefAngel.LCD.DrawLargeText(COLOR_DARKTURQUOISE, COLOR_WHITE, 4, 4 , "ROB'S REEF ANGEL");
  ReefAngel.LCD.Clear(COLOR_MAROON, 1, 13, 132, 13);
  ReefAngel.LCD.Clear(COLOR_MAROON, 10, 75, 119, 75);
  ReefAngel.LCD.Clear(COLOR_MAROON, 10, 59, 119, 59);
  pingSerial();


  ReefAngel.LCD.DrawLargeText(COLOR_GOLDENROD, COLOR_WHITE, 8, 15, "Big Tank");
  char text[7];
  ConvertNumToString(text, ReefAngel.Params.Temp[T1_PROBE], 10);
  pingSerial();
  ReefAngel.LCD.DrawLargeText(COLOR_GOLDENROD, DefaultBGColor, 18, 28, text);
 
  pingSerial(); 
  ReefAngel.LCD.DrawText(COLOR_RED, COLOR_WHITE,8,48,"Frag:");
  ReefAngel.LCD.DrawSingleMonitor(ReefAngel.Params.Temp[T3_PROBE], COLOR_RED, 40, 48, 10);

  ReefAngel.LCD.DrawText(COLOR_DARKORCHID, COLOR_WHITE,8,39,"Room:");
  ReefAngel.LCD.DrawSingleMonitor(ReefAngel.Params.Temp[T2_PROBE], T2TempColor, 40, 39, 10);
  ReefAngel.LCD.DrawText(COLOR_DARKTURQUOISE, COLOR_WHITE, 70, 39, "Moon Phase");
  ReefAngel.LCD.DrawText(0,255,70,48,MoonPhaseLabel());
  pingSerial();
  ReefAngel.LCD.DrawLargeText(COLOR_MEDIUMSEAGREEN, COLOR_WHITE, 92, 15, "pH");
  ConvertNumToString(text, ReefAngel.Params.PH, 100);

  ReefAngel.LCD.DrawLargeText(PHColor, DefaultBGColor, 88, 28, text);
  pingSerial();


  // Display arrows for Wavemaker
  ReefAngel.LCD.DrawText(DPColor,DefaultBGColor, 5, 64,"WAVE FLOW:");
  if (bitRead(ReefAngel.Relay.RelayData,Port5-1)==1) ReefAngel.LCD.DrawText(APColor,DefaultBGColor, 67, 64,"----->"); //port 5 on
  else if (bitRead(ReefAngel.Relay.RelayData,Port6-1)==1) ReefAngel.LCD.DrawText(APColor,DefaultBGColor, 67, 64,"<-----");  //port 6 on
  else ReefAngel.LCD.DrawText(APColor,DefaultBGColor, 67, 64," 00000 "); //port5 and port 6 off, wavemaker delay
  //show the timer for wavemaker
  int t=ReefAngel.Timer[1].Trigger-now();
  if (t>=0)
    ReefAngel.LCD.Clear(255,105,64,135,74);
  ReefAngel.LCD.DrawText(APColor, COLOR_KHAKI,110,64,t);
  pingSerial();
 
  ReefAngel.LCD.DrawText(COLOR_MEDIUMSEAGREEN,DefaultBGColor,10,79,"Actinic");
  ReefAngel.LCD.DrawText(COLOR_MEDIUMSEAGREEN,DefaultBGColor,10,89,"FragLt");
  ReefAngel.LCD.DrawText(COLOR_MEDIUMSEAGREEN,DefaultBGColor,10,99,"WM RT");
  ReefAngel.LCD.DrawText(COLOR_MEDIUMSEAGREEN,DefaultBGColor,10,109,"Fan");
  ReefAngel.LCD.DrawText(COLOR_MEDIUMSEAGREEN,DefaultBGColor,80,79,"ATO");
  ReefAngel.LCD.DrawText(COLOR_MEDIUMSEAGREEN,DefaultBGColor,80,89,"DayLts");
  ReefAngel.LCD.DrawText(COLOR_MEDIUMSEAGREEN,DefaultBGColor,80,99,"WM LFT");
  ReefAngel.LCD.DrawText(COLOR_MEDIUMSEAGREEN,DefaultBGColor,80,109,"Heater");
  byte TempRelay = ReefAngel.Relay.RelayData;
  TempRelay &= ReefAngel.Relay.RelayMaskOff;
  TempRelay |= ReefAngel.Relay.RelayMaskOn;
  ReefAngel.LCD.DrawCircleOutletBox(60, 81, TempRelay, true);
}
Image
rimai
Posts: 12857
Joined: Fri Mar 18, 2011 6:47 pm

Re: changing custom main displays at night

Post by rimai »

you can use an if statement or you could do multiple screens too.
http://forum.reefangel.com/viewtopic.php?p=10028#p10028
Roberto.
psyrob
Posts: 242
Joined: Thu Sep 01, 2011 8:44 pm

Re: changing custom main displays at night

Post by psyrob »

thanks...used an if statement for now...works fine
Image
User avatar
jsclownfish
Posts: 375
Joined: Mon Oct 24, 2011 7:52 pm
Location: Saint Louis

Re: changing custom main displays at night

Post by jsclownfish »

I had the same problem before I added the second monitor, so I had the temps cycle through the same place on the screen. The modulo function worked great. I never was really happy with my attempt to get the info to scroll.
http://forum.reefangel.com/viewtopic.php?f=12&t=1073.

-Jon
Post Reply