need custom PDE help

Share you PDE file with our community
jjdezek
Posts: 329
Joined: Fri May 17, 2013 1:35 pm

Re: need custom PDE help

Post by jjdezek »

here is how i did the code pic of screen to follow



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 <InternalEEPROM.h>
#include <RA_Colors.h>
#include <RA_CustomColors.h>
#include <Salinity.h>
#include <RF.h>
#include <IO.h>
#include <ORP.h>
#include <AI.h>
#include <PH.h>
#include <WaterLevel.h>
#include <ReefAngel.h>

////// Place global variable code below here


////// Place global variable code above here


void setup()
{
    // This must be the first line
    ReefAngel.Init();  //Initialize controller
    // Ports toggled in Feeding Mode
    ReefAngel.FeedingModePorts = Port5Bit | Port6Bit;
    // Ports toggled in Water Change Mode
    ReefAngel.WaterChangePorts = Port1Bit;
    // Ports toggled when Lights On / Off menu entry selected
    ReefAngel.LightsOnPorts = 0;
    // Ports turned off when Overheat temperature exceeded
    ReefAngel.OverheatShutoffPorts = Port3Bit | Port7Bit;
    // Use T1 probe as temperature and overheat functions
    ReefAngel.TempProbe = T1_PROBE;
    ReefAngel.OverheatProbe = T1_PROBE;
    // Set the Overheat temperature setting
    InternalMemory.OverheatTemp_write( 800 );


    // Ports that are always on
    ReefAngel.Relay.On( Port2 );
    ReefAngel.Relay.On( Port4 );
    ReefAngel.Relay.On( Port8 );

    ////// Place additional initialization code below here
    

    ////// Place additional initialization code above here
}

void loop()
{
    ReefAngel.StandardATO( Port1,60 );
    ReefAngel.StandardLights( Port3,18,0,10,0 );
    ReefAngel.WavemakerRandom( Port5,30,100 );
    ReefAngel.WavemakerRandom( Port6,30,100 );
    ReefAngel.StandardHeater( Port7,752,755 );
    ReefAngel.PWM.SetChannel( 0, PWMSlope(7,0,22,0,0,40,180,0) );
    ReefAngel.PWM.SetChannel( 1, PWMSlope(7,30,21,30,0,35,180,0) );
    ReefAngel.PWM.SetChannel( 2, PWMSlope(7,0,22,0,0,40,180,0) );
    ReefAngel.PWM.SetChannel( 3, PWMSlope(7,30,21,30,0,35,180,0) );
    ReefAngel.PWM.SetChannel( 4, PWMSlope(7,0,22,0,0,40,180,0) );
    ReefAngel.PWM.SetChannel( 5, PWMSlope(7,30,21,30,0,35,180,0) );
    ////// Place your custom code below here
    if (hour()>=8 && hour()<12)
{
  ReefAngel.PWM.SetDaylight( ReefCrestMode(100,20,true) ); // ReefCrest at 100% +/- 20% on sync mode
  ReefAngel.PWM.SetActinic( ReefCrestMode(100,20,false) ); // ReefCrest at 100% +/- 20% on anti-sync mode
}
else if (hour()>=12 && hour()<18)
{
  ReefAngel.PWM.SetDaylight( ShortPulseMode(0,100,200,true) ); // Short pulse at 100% with 200ms pulse on sync mode
  ReefAngel.PWM.SetActinic( ShortPulseMode(0,100,200,false) ); // Short pulse at 100% with 200ms pulse on anti-sync mode
}
else
{
  ReefAngel.PWM.SetDaylight( LongPulseMode(0,100,10,true) ); // Long pulse at 100% with 10s pulse on sync mode
  ReefAngel.PWM.SetActinic( LongPulseMode(0,100,10,false) ); // Long pulse at 6100% with 10s pulse on anti-sync mode
}
if( ReefAngel.DisplayedMenu==FEEDING_MODE )
{
   ReefAngel.PWM.SetActinic(0);
   ReefAngel.PWM.SetDaylight(0);
}

    ////// Place your custom code above here

    // This should always be the last line
    ReefAngel.Portal( "jjdezek" );
    ReefAngel.ShowInterface();
}

void DrawParams(int x, int y) {
  char buf[16];

  ReefAngel.LCD.DrawText(COLOR_BLACK,DefaultBGColor,x+5,y,"Temp:");
  ReefAngel.LCD.DrawText(COLOR_BLACK,DefaultBGColor,x+80, y, "PH:");
  // Temp and PH
  y+=2;

  ConvertNumToString(buf, ReefAngel.Params.Temp[T1_PROBE], 10);
  ReefAngel.LCD.DrawLargeText(T1TempColor, DefaultBGColor, x+5, y, buf, Num8x16);
  ConvertNumToString(buf, ReefAngel.Params.PH, 100);
  ReefAngel.LCD.DrawLargeText(PHColor, DefaultBGColor, x+80, y, buf, Num8x16);
  y+=5;
  ReefAngel.LCD.DrawText(T3TempColor, DefaultBGColor, x+45, y, buf);
}

void DrawStatus(int x, int y) {
  int t=x;
  
  ReefAngel.LCD.DrawLargeText(COLOR_INDIGO,DefaultBGColor,15,y,"High",Font8x16);
  ReefAngel.LCD.DrawLargeText(COLOR_INDIGO,DefaultBGColor,85,y,"Low",Font8x16);
  
  if (ReefAngel.HighATO.IsActive()) {
    ReefAngel.LCD.FillCircle(55,y+3,5,COLOR_GREEN);
  } else {
    ReefAngel.LCD.FillCircle(55,y+3,5,COLOR_RED);
  }
  
  if (ReefAngel.LowATO.IsActive()) {
    ReefAngel.LCD.FillCircle(70,y+3,5,COLOR_GREEN);
  } else {
    ReefAngel.LCD.FillCircle(70,y+3,5,COLOR_RED);
  }
}


void DrawCustomGraph()
{
}
Image
jjdezek
Posts: 329
Joined: Fri May 17, 2013 1:35 pm

Re: need custom PDE help

Post by jjdezek »

Image
Image
User avatar
lnevo
Posts: 5430
Joined: Fri Jul 20, 2012 9:42 am

Re: need custom PDE help

Post by lnevo »

On so right now you took both DrawCustomMain() functions out and you are getting the stock screen...

You can now follow the tutorial and add that function in...when you do that you can use my functions that you also added correctly.

The syntax would be DrawStatus(x,y);
where x and y are the coordinates you want the ato circles and DrawParams(x,y);

You will use these inside the DrawCustomMain() function.

You do already have the DrawCustomGraph() function so make sure you dont add that one again when you follow the tutorial.
jjdezek
Posts: 329
Joined: Fri May 17, 2013 1:35 pm

Re: need custom PDE help

Post by jjdezek »

ok you just confused me again. so do i put the custommenu code in the
////// Place global variable code below here


////// Place global variable code above here
wont that throw another error? Im trying to get a grasp on this coding stuff but everytime i think im getting the hang of it i find something that looses me.
Image
User avatar
lnevo
Posts: 5430
Joined: Fri Jul 20, 2012 9:42 am

Re: need custom PDE help

Post by lnevo »

It goes at the bottom...it's a new function...look how DrawCustomGraph() is in your code...it I'll be just like that except with code in it...
User avatar
lnevo
Posts: 5430
Joined: Fri Jul 20, 2012 9:42 am

Re: need custom PDE help

Post by lnevo »

It could be where you put it last time, but that space is usually for variables...it doesn't really matter,..last time you had it in there twice ( at top and at bottom )...that was why you had an error
User avatar
lnevo
Posts: 5430
Joined: Fri Jul 20, 2012 9:42 am

Re: need custom PDE help

Post by lnevo »

jjdezek wrote: Im trying to get a grasp on this coding stuff but everytime i think im getting the hang of it i find something that looses me.
Don't worry...we'll get you there...it's like learning a new language...actually it is learning a new language...

Check this tutorial it will help you understand a lot more. It really should be added as a MUST-READ!

http://forum.reefangel.com/viewtopic.php?p=27161#p27161
jjdezek
Posts: 329
Joined: Fri May 17, 2013 1:35 pm

Re: need custom PDE help

Post by jjdezek »

yeah i copied the custommenu code from the tutorial and put it in there and ran the varify and it didnt give any errors. im still not sure what to do next. I try reading the tutorial but it just makes me more cunfused. im more of a hands on learning. i can read all day and walk away not knowing what i read, not sure if it would be classified as A.D.D. it would really be helpful to see a partion of code typed out then see what that does on the screen. thanks for all the help with this.
Image
User avatar
lnevo
Posts: 5430
Joined: Fri Jul 20, 2012 9:42 am

Re: need custom PDE help

Post by lnevo »

Look at the last tutorial I posted...it's pretty much a line by line explanation of the code...


As far as the draw custom main tutorial...you had the right one that was posted earlier...
User avatar
lnevo
Posts: 5430
Joined: Fri Jul 20, 2012 9:42 am

Re: need custom PDE help

Post by lnevo »

Here is an example from page 4 of the PDF from curt.

Code: Select all

////// Place global variable code below here
void DrawCustomMain()
{
     // the graph is drawn/updated when we exit the main menu &
     // when the parameters are saved
     ReefAngel.LCD.DrawDate(6, 112);
     pingSerial();
#if defined DisplayLEDPWM && ! defined RemoveAllLights
     ReefAngel.LCD.DrawMonitor(15, 60, ReefAngel.Params,
ReefAngel.PWM.GetDaylightValue(), ReefAngel.PWM.GetActinicValue());
#else // defined DisplayLEDPWM && ! defined RemoveAllLights
     ReefAngel.LCD.DrawMonitor(15, 60, ReefAngel.Params);
#endif // defined DisplayLEDPWM && ! defined RemoveAllLights
     pingSerial();
     byte TempRelay = ReefAngel.Relay.RelayData;
     TempRelay &= ReefAngel.Relay.RelayMaskOff;
     TempRelay |= ReefAngel.Relay.RelayMaskOn;
     ReefAngel.LCD.DrawOutletBox(12, 93, TempRelay);
}
void DrawCustomGraph()
{
     ReefAngel.LCD.DrawGraph(5,5);
}
////// Place global variable code above here
I see now why you posted it above :)

Let's look at a few lines...

Code: Select all

ReefAngel.LCD.DrawDate(6, 112);
What do you think that does? It draws the date at coordinates 6,112..

The pingSerial() commands are no longer needed in this function...you can ignore them...but what they used to do is manage the wifi while we were busy drawing new screens...

Code: Select all

ReefAngel.LCD.DrawMonitor(15, 60, ReefAngel.Params,
ReefAngel.PWM.GetDaylightValue(), ReefAngel.PWM.GetActinicValue());
Ignore all the #ifdef lines for now...they are basically a way to make the screen generic for people that want to use sections of code to minimize the memory footprint...advanced topic for you...but look at this last line that I posted above...
it uses the DrawMonitor() function to print the daylight and actinic values on the screen starting at coordinates 15,60.

So to use the functions I gave you, you would just "call" one of mine inside the DrawCustomMain() with something like this.

Code: Select all

DrawStatus(15,80);
I recommend starting by just changing around the x and y locations in the default example so you can get that hands-on feeling and make room for what you want to add. Once you start getting a feel it will become easier.


I noodled that because I didn't want you to miss the recommendation through all the code explanation.
jjdezek
Posts: 329
Joined: Fri May 17, 2013 1:35 pm

Re: need custom PDE help

Post by jjdezek »

i changed these numbers and it moved the codes up to the top. what im not understanding is how do i get the ATO to display on the screen?

Code: Select all

ReefAngel.LCD.DrawMonitor(15, 10, ReefAngel.Params,
ReefAngel.PWM.GetDaylightValue(), ReefAngel.PWM.GetActinicValue());
#else // defined DisplayLEDPWM && ! defined RemoveAllLights
ReefAngel.LCD.DrawMonitor(15, 10, ReefAngel.Params.);
Image
User avatar
lnevo
Posts: 5430
Joined: Fri Jul 20, 2012 9:42 am

Re: need custom PDE help

Post by lnevo »

You need to add DrawStatus(x,y); inside the DrawCustomMain function. with x and y being the coordinates where you want it.
jjdezek
Posts: 329
Joined: Fri May 17, 2013 1:35 pm

Re: need custom PDE help

Post by jjdezek »

so i would put something like
DrawStatus(15,50)
and just plug it in anywhere in the drawcustommain?
Image
User avatar
lnevo
Posts: 5430
Joined: Fri Jul 20, 2012 9:42 am

Re: need custom PDE help

Post by lnevo »

By Jove, I think he's got it!
User avatar
lnevo
Posts: 5430
Joined: Fri Jul 20, 2012 9:42 am

Re: need custom PDE help

Post by lnevo »

Don't forget the semicolon after the last parenthesis.
jjdezek
Posts: 329
Joined: Fri May 17, 2013 1:35 pm

Re: need custom PDE help

Post by jjdezek »

haha awesome got it. ok next step. how do you make the temp 1 text larger? along with ph?
Image
jjdezek
Posts: 329
Joined: Fri May 17, 2013 1:35 pm

Re: need custom PDE help

Post by jjdezek »

Image
Image
User avatar
lnevo
Posts: 5430
Joined: Fri Jul 20, 2012 9:42 am

Re: need custom PDE help

Post by lnevo »

You'll need to replace the current drawing of those parameters with the other function I gave you.

DrawParams(x,y);
jjdezek
Posts: 329
Joined: Fri May 17, 2013 1:35 pm

Re: need custom PDE help

Post by jjdezek »

so i replace this

Code: Select all

ReefAngel.LCD.DrawMonitor(15, 10, ReefAngel.Params,
ReefAngel.PWM.GetDaylightValue(), ReefAngel.PWM.GetActinicValue());
#else // defined DisplayLEDPWM && ! defined RemoveAllLights
ReefAngel.LCD.DrawMonitor(15, 10, ReefAngel.Params.);
with this

Code: Select all

ConvertNumToString(buf, ReefAngel.Params.Temp[T1_PROBE], 10);
  ReefAngel.LCD.DrawLargeText(T1TempColor, DefaultBGColor, x+5, y, buf, Num8x16);
  ConvertNumToString(buf, ReefAngel.Params.PH, 100);
  ReefAngel.LCD.DrawLargeText(PHColor, DefaultBGColor, x+80, y, buf, Num8x16);
  y+=5;
  ReefAngel.LCD.DrawText(T3TempColor, DefaultBGColor, x+45, y, buf);
}
Image
jjdezek
Posts: 329
Joined: Fri May 17, 2013 1:35 pm

Re: need custom PDE help

Post by jjdezek »

or just plug in the DrawParams (15,10);
Image
User avatar
lnevo
Posts: 5430
Joined: Fri Jul 20, 2012 9:42 am

Re: need custom PDE help

Post by lnevo »

I would do the second but either would work. The first one You would have a problem because x and y are not defined in the drawcustommain, so you'd have to edit that bit.

I think your starting to get the hang of it :)
jjdezek
Posts: 329
Joined: Fri May 17, 2013 1:35 pm

Re: need custom PDE help

Post by jjdezek »

with this it didnt turn out. pic to follow.

Code: Select all

// when the parameters are saved
ReefAngel.LCD.DrawDate(6, 112);
pingSerial();
#if defined DisplayLEDPWM && ! defined RemoveAllLights
ReefAngel.LCD.DrawMonitor(15, 10, ReefAngel.Params,
ReefAngel.PWM.GetDaylightValue(), ReefAngel.PWM.GetActinicValue());
#else // defined DisplayLEDPWM && ! defined RemoveAllLights
ReefAngel.LCD.DrawMonitor(15, 10, ReefAngel.Params.);
#endif // defined DisplayLEDPWM && ! defined RemoveAllLig
DrawStatus (20,80);
DrawParams (15,50);
pingSerial();
byte TempRelay = ReefAngel.Relay.RelayData;
TempRelay &= ReefAngel.Relay.RelayMaskOff;
TempRelay |= ReefAngel.Relay.RelayMaskOn;
ReefAngel.LCD.DrawOutletBox(12, 93, TempRelay);
}

////// Place global variable code above here
Image
jjdezek
Posts: 329
Joined: Fri May 17, 2013 1:35 pm

Re: need custom PDE help

Post by jjdezek »

Image
Image
jjdezek
Posts: 329
Joined: Fri May 17, 2013 1:35 pm

Re: need custom PDE help

Post by jjdezek »

with this code set up

Code: Select all

////// Place global variable code below here
void DrawCustomMain()
{
// the graph is drawn/updated when we exit the main menu &
// when the parameters are saved
ReefAngel.LCD.DrawDate(6, 112);
pingSerial();

DrawStatus (20,80);
DrawParams (15,50);
pingSerial();
byte TempRelay = ReefAngel.Relay.RelayData;
TempRelay &= ReefAngel.Relay.RelayMaskOff;
TempRelay |= ReefAngel.Relay.RelayMaskOn;
}

////// Place global variable code above here
Image
jjdezek
Posts: 329
Joined: Fri May 17, 2013 1:35 pm

Re: need custom PDE help

Post by jjdezek »

I get this

Image
Image
User avatar
lnevo
Posts: 5430
Joined: Fri Jul 20, 2012 9:42 am

Re: need custom PDE help

Post by lnevo »

Sorry, you need to add this to get the large numbers. This goes right after the // Place global variable code below here. Not inside the functions.

Code: Select all

#define NUMBERS_8x16
As far as the alignment if it doesn't get fixed after that, try changing the x to 5.
jjdezek
Posts: 329
Joined: Fri May 17, 2013 1:35 pm

Re: need custom PDE help

Post by jjdezek »

all that did was make the text bigger still have the smaller numbers overlapping and those numbers a glitching.
Image
jjdezek
Posts: 329
Joined: Fri May 17, 2013 1:35 pm

Re: need custom PDE help

Post by jjdezek »

it looks like the word temp and ph are behind the numbers instead of above them. I also noticed that when i removed the old params codes i removed the pwm block. is there away i can keep the pwm on the screen and remove the old params?
Image
User avatar
lnevo
Posts: 5430
Joined: Fri Jul 20, 2012 9:42 am

Re: need custom PDE help

Post by lnevo »

Lets address the pwm values after. That will be easy. Can you post your current code and screenshot.
jjdezek
Posts: 329
Joined: Fri May 17, 2013 1:35 pm

Re: need custom PDE help

Post by jjdezek »

well while i was waiting for your response i did a little playing with the code. i got my name displayed across the top and put the params back in. so right now this is what i have.

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 <InternalEEPROM.h>
#include <RA_Colors.h>
#include <RA_CustomColors.h>
#include <Salinity.h>
#include <RF.h>
#include <IO.h>
#include <ORP.h>
#include <AI.h>
#include <PH.h>
#include <WaterLevel.h>
#include <ReefAngel.h>

////// Place global variable code below here
#define NUMBERS_8x16
void DrawCustomMain()
{
// the graph is drawn/updated when we exit the main menu &
// when the parameters are saved
ReefAngel.LCD.DrawDate(6, 112);
ReefAngel.LCD.DrawText(COLOR_INDIGO, COLOR_WHITE,20,5, "Jeremy's Reef");
pingSerial();
#if defined DisplayLEDPWM && ! defined RemoveAllLights
ReefAngel.LCD.DrawMonitor(15, 30, ReefAngel.Params,
ReefAngel.PWM.GetDaylightValue(), ReefAngel.PWM.GetActinicValue());
#endif // defined DisplayLEDPWM && ! defined RemoveAllLig
DrawStatus (20,80);
DrawParams (5,60);
pingSerial();
byte TempRelay = ReefAngel.Relay.RelayData;
TempRelay &= ReefAngel.Relay.RelayMaskOff;
TempRelay |= ReefAngel.Relay.RelayMaskOn;
ReefAngel.LCD.DrawOutletBox(12, 93, TempRelay);
}

////// Place global variable code above here


void setup()
{
    // This must be the first line
    ReefAngel.Init();  //Initialize controller
    // Ports toggled in Feeding Mode
    ReefAngel.FeedingModePorts = Port5Bit | Port6Bit;
    // Ports toggled in Water Change Mode
    ReefAngel.WaterChangePorts = Port1Bit;
    // Ports toggled when Lights On / Off menu entry selected
    ReefAngel.LightsOnPorts = 0;
    // Ports turned off when Overheat temperature exceeded
    ReefAngel.OverheatShutoffPorts = Port3Bit | Port7Bit;
    // Use T1 probe as temperature and overheat functions
    ReefAngel.TempProbe = T1_PROBE;
    ReefAngel.OverheatProbe = T1_PROBE;
    // Set the Overheat temperature setting
    InternalMemory.OverheatTemp_write( 800 );


    // Ports that are always on
    ReefAngel.Relay.On( Port2 );
    ReefAngel.Relay.On( Port4 );
    ReefAngel.Relay.On( Port8 );

    ////// Place additional initialization code below here
    

    ////// Place additional initialization code above here
}

void loop()
{
    ReefAngel.StandardATO( Port1,60 );
    ReefAngel.StandardLights( Port3,18,0,10,0 );
    ReefAngel.WavemakerRandom( Port5,30,100 );
    ReefAngel.WavemakerRandom( Port6,30,100 );
    ReefAngel.StandardHeater( Port7,752,755 );
    ReefAngel.PWM.SetChannel( 0, PWMSlope(7,0,22,0,0,40,180,0) );
    ReefAngel.PWM.SetChannel( 1, PWMSlope(7,30,21,30,0,35,180,0) );
    ReefAngel.PWM.SetChannel( 2, PWMSlope(7,0,22,0,0,40,180,0) );
    ReefAngel.PWM.SetChannel( 3, PWMSlope(7,30,21,30,0,35,180,0) );
    ReefAngel.PWM.SetChannel( 4, PWMSlope(7,0,22,0,0,40,180,0) );
    ReefAngel.PWM.SetChannel( 5, PWMSlope(7,30,21,30,0,35,180,0) );
    ////// Place your custom code below here
    if (hour()>=8 && hour()<12)
{
  ReefAngel.PWM.SetDaylight( ReefCrestMode(100,20,true) ); // ReefCrest at 100% +/- 20% on sync mode
  ReefAngel.PWM.SetActinic( ReefCrestMode(100,20,false) ); // ReefCrest at 100% +/- 20% on anti-sync mode
}
else if (hour()>=12 && hour()<18)
{
  ReefAngel.PWM.SetDaylight( ShortPulseMode(0,100,200,true) ); // Short pulse at 100% with 200ms pulse on sync mode
  ReefAngel.PWM.SetActinic( ShortPulseMode(0,100,200,false) ); // Short pulse at 100% with 200ms pulse on anti-sync mode
}
else
{
  ReefAngel.PWM.SetDaylight( LongPulseMode(0,100,10,true) ); // Long pulse at 100% with 10s pulse on sync mode
  ReefAngel.PWM.SetActinic( LongPulseMode(0,100,10,false) ); // Long pulse at 6100% with 10s pulse on anti-sync mode
}
if( ReefAngel.DisplayedMenu==FEEDING_MODE )
{
   ReefAngel.PWM.SetActinic(0);
   ReefAngel.PWM.SetDaylight(0);
}

    ////// Place your custom code above here

    // This should always be the last line
    ReefAngel.Portal( "jjdezek" );
    ReefAngel.ShowInterface();
}

void DrawParams(int x, int y) {
  char buf[16];

  ReefAngel.LCD.DrawText(COLOR_BLACK,DefaultBGColor,x+5,y,"Temp:");
  ReefAngel.LCD.DrawText(COLOR_BLACK,DefaultBGColor,x+80, y, "PH:");
  // Temp and PH
  y+=2;

  ConvertNumToString(buf, ReefAngel.Params.Temp[T1_PROBE], 10);
  ReefAngel.LCD.DrawLargeText(T1TempColor, DefaultBGColor, x+5, y, buf, Num8x16);
  ConvertNumToString(buf, ReefAngel.Params.PH, 100);
  ReefAngel.LCD.DrawLargeText(PHColor, DefaultBGColor, x+80, y, buf, Num8x16);
  y+=5;
  ReefAngel.LCD.DrawText(T3TempColor, DefaultBGColor, x+45, y, buf);
}

void DrawStatus(int x, int y) {
  int t=x;
  
  ReefAngel.LCD.DrawLargeText(COLOR_INDIGO,DefaultBGColor,15,y,"High",Font8x16);
  ReefAngel.LCD.DrawLargeText(COLOR_INDIGO,DefaultBGColor,85,y,"Low",Font8x16);
  
  if (ReefAngel.HighATO.IsActive()) {
    ReefAngel.LCD.FillCircle(55,y+3,5,COLOR_GREEN);
  } else {
    ReefAngel.LCD.FillCircle(55,y+3,5,COLOR_RED);
  }
  
  if (ReefAngel.LowATO.IsActive()) {
    ReefAngel.LCD.FillCircle(70,y+3,5,COLOR_GREEN);
  } else {
    ReefAngel.LCD.FillCircle(70,y+3,5,COLOR_RED);
  }
}


void DrawCustomGraph()
{
}
Image
Post Reply