Code: Select all
//function to flash warning (parameter, high limt, low limit, x, y, decimal)
void Warningflash(int param, int high, int low, byte x, byte y, byte z)
{
int mod=second()%2;
if (param > high || param < low)
{
if (mod==0) ReefAngel.LCD.Clear(DefaultBGColor,x,y,x+40,y+10);
else ReefAngel.LCD.DrawSingleMonitor(param, COLOR_RED, x, y, z);
}
else ReefAngel.LCD.DrawSingleMonitor(param, DefaultFGColor, x, y, z);
}
...
void DrawCustomMain()
{
ReefAngel.LCD.DrawDate(6, 2);
ReefAngel.LCD.Clear(0, 1, 11, 132, 11);
// Display the PH with color sensors
ReefAngel.LCD.DrawText(PHColor,DefaultBGColor, 5, 13,"PH:");
ReefAngel.LCD.DrawSingleMonitor(ReefAngel.Params.PH, 0, 23, 13, 100);
Warningflash(ReefAngel.Params.PH, 840, 790, 23, 13, 100);
.....
-Jon