Lee's Feature Complete PDE

Share you PDE file with our community
User avatar
Posts: 5350
Joined: Fri Jul 20, 2012 9:42 am
PostPosted: Mon Mar 11, 2013 4:17 pm
Ok, the new version is posted in the second post (viewtopic.php?p=17807#p17807) This version incorporates the Automated Water change mode using my Reactor pump (Media Rinsing and Water change in one!!) It also incorporates the new Tide class and a custom RF mode to use it. The tidal gap (difference between high and low tide) is affected by the current MoonPhase() and the Sync / Anti-Sync pumps will switch direction based on Ebb and Flood of the tide. I also add a PWMSlope to transition to Night Mode and maintain the tidal effect.

Any questions, please ask. Testing so far is going well :)
User avatar
Posts: 5350
Joined: Fri Jul 20, 2012 9:42 am
PostPosted: Mon Mar 11, 2013 7:48 pm
Had my night speed PWMSlope getting set wrong... all fixed now :)
User avatar
Posts: 5350
Joined: Fri Jul 20, 2012 9:42 am
PostPosted: Sun Mar 17, 2013 3:15 pm
I have turned all my custom code into functions so it should be much easier to borrow bits and pieces. Later, I'll move some of the variables into the functions that don't need to be global to make it even more self-contained.
User avatar
Posts: 5350
Joined: Fri Jul 20, 2012 9:42 am
PostPosted: Wed Mar 20, 2013 8:46 pm
Added the anti-sync part of the ReefCrestMode function into play. Added moonrise/set calculation.
User avatar
Posts: 5350
Joined: Fri Jul 20, 2012 9:42 am
PostPosted: Sat Mar 23, 2013 7:54 am
Implemented Roberto's clever multiple screen display feature :)

Roberto... I'm using LCD.DrawGraph and getting a lot of flicker... is there a better way to call that function?

Posts: 12273
Joined: Fri Mar 18, 2011 6:47 pm
PostPosted: Sat Mar 23, 2013 8:06 am
Graph has it's own custom section...
You need to do this:
Code: Select all
void DrawCustomGraph()
{
  if (ScreenID==1)
    ReefAngel.LCD.DrawGraph(5, 10);
}
Roberto.
User avatar
Posts: 5350
Joined: Fri Jul 20, 2012 9:42 am
PostPosted: Sat Mar 23, 2013 8:14 am
Not working right if I navigate away from the screen and come back it doesn't redraw.... If I make that the default screen then it draws until I leave... how can I trigger it to draw once :)

Posts: 12273
Joined: Fri Mar 18, 2011 6:47 pm
PostPosted: Sat Mar 23, 2013 8:16 am
You can't have it being called inside DrawCustomMain() at all.
Just on DrawCustomGraph()
Roberto.
User avatar
Posts: 5350
Joined: Fri Jul 20, 2012 9:42 am
PostPosted: Sat Mar 23, 2013 10:07 am
Yeah i took it out...if i navigate off the screen and back its blank...how can i trigger it to draw when switching screens.

Posts: 12273
Joined: Fri Mar 18, 2011 6:47 pm
PostPosted: Sat Mar 23, 2013 10:15 am
Try this:
Code: Select all
//declare this on global
boolean DrawGraph=true;

// This goes in DrawCustomMain()
  switch (ScreenID)
  {
  case 0:
    {
      break;
    }
  case 1:
    if (DrawGraph)
    {
      ReefAngel.LCD.DrawGraph(5, 10);
      DrawGraph=false;
    }
    break;
  }

  if (ReefAngel.Joystick.IsLeft())
  {
    ReefAngel.ClearScreen(DefaultBGColor);
    DrawGraph=true;
    ScreenID--;
  }
  if (ReefAngel.Joystick.IsRight())
  {
    ReefAngel.ClearScreen(DefaultBGColor);
    DrawGraph=true;
    ScreenID++;
  }
  if (ScreenID<0) ScreenID=NumScreens-1;
  if (ScreenID>=NumScreens) ScreenID=0;
Roberto.
PreviousNext

Return to My PDE/INO file

Who is online

Users browsing this forum: No registered users and 3 guests

cron