At night it shows moon phase with pwm% and where moonphase is(crescent, quarter, gibb, full ect)
During the day it shows 4 PWM module %'s
If there is a cloud it will show time and duration, also if there is lightning it will change the label from cloud to storm
Code: Select all
//*********************************************************************************************************************************
//Custom Main, Graph & Menu
void DrawCustomMain()
{
Wire.requestFrom(8,8);
for (int a=0;a<12;a++)
{
if (Wire.available()) SeasonsVar[a]=Wire.receive();
}
byte x = 6;
byte y = 2;
byte t;
char text[7];
ReefAngel.LCD.DrawDate(6, 2);
ReefAngel.LCD.Clear(COLOR_BLACK, 1, 11, 132, 11);
pingSerial();
ReefAngel.LCD.DrawText(COLOR_TOMATO,255, 6, 90, "--------------------");
ReefAngel.LCD.DrawText(COLOR_TOMATO,255, 6, 126, "--------------------");
for (byte Left=93; Left < 133; Left+=10)
{
ReefAngel.LCD.DrawText(COLOR_TOMATO,255, 2, Left, "|");
ReefAngel.LCD.DrawText(COLOR_TOMATO,255, 126, Left, "|");
}
ReefAngel.LCD.DrawText(0,255,18,12,"EcoSmart Vortech");
ReefAngel.LCD.Clear(255, 1, 19, 128, 29);
if (vtechmode == 0) ReefAngel.LCD.DrawLargeText(COLOR_LIMEGREEN,255,35,21,"Constant");
else if(vtechmode == 1) ReefAngel.LCD.DrawLargeText(COLOR_GOLD,255,42,21,"Lagoon");
else if (vtechmode == 2) ReefAngel.LCD.DrawLargeText(COLOR_GOLD,255,25,21,"Reef Crest");
else if (vtechmode == 3) ReefAngel.LCD.DrawLargeText(COLOR_CORNFLOWERBLUE,255,22,21,"Short Pulse");
else if (vtechmode == 4) ReefAngel.LCD.DrawLargeText(COLOR_PINK,255,25,21,"Long Pulse");
else if (vtechmode == 5) ReefAngel.LCD.DrawLargeText(COLOR_MAGENTA,255,8,21,"Nutrient Trnsp.");
else if (vtechmode == 6) ReefAngel.LCD.DrawLargeText(COLOR_MAGENTA,255,23,21,"Tidal Swell");
else if (vtechmode == 9) ReefAngel.LCD.DrawLargeText(COLOR_WHITE,0,45,21,"Night");
ReefAngel.LCD.DrawText(0,255,10,30,"Display");
ConvertNumToString(text, ReefAngel.Params.Temp3, 10);
ReefAngel.LCD.DrawLargeText(COLOR_INDIANRED, 255, 10, 40, text, Num8x8);
pingSerial();
ReefAngel.LCD.DrawText(0,255,100,30,"pH");
ConvertNumToString(text, ReefAngel.Params.PH, 100);
ReefAngel.LCD.DrawLargeText(COLOR_PLUM, 255, 85, 40, text, Num8x8);
pingSerial();
ReefAngel.LCD.DrawText(0,255,43,48,"Salinity");
ConvertNumToString(text, ReefAngel.Params.Salinity, 10);
ReefAngel.LCD.DrawLargeText(COLOR_LIMEGREEN, 255, 49, 58, text, Num8x8);
pingSerial();
pingSerial();
byte TempRelay = ReefAngel.Relay.RelayData;
TempRelay &= ReefAngel.Relay.RelayMaskOff;
TempRelay |= ReefAngel.Relay.RelayMaskOn;
ReefAngel.LCD.DrawOutletBox(12, 77, TempRelay);
ReefAngel.LCD.DrawText(0,255,8,68,"Sump");
ReefAngel.LCD.DrawSingleMonitor(ReefAngel.Params.Temp1, COLOR_CORNFLOWERBLUE, 40, 68, 10);
ReefAngel.LCD.DrawText(0,255,70,68,"Room");
ReefAngel.LCD.DrawSingleMonitor(ReefAngel.Params.Temp2, COLOR_CORNFLOWERBLUE, 99, 68, 10);
if (ReefAngel.PWM.GetActinicValue() > 0)//if moon phase is active display state and pwm %
{
ReefAngel.LCD.DrawText(0,255,8,98,"Moon");
DayAge = MoonAge(day(), month(), year());
MoonState(DayAge);
char* ThisPhaseLabel[]={
"New","Waxing Crescent","First Quarter","Waxing Gibbous","Full","Waning Gibbous","Last Quarter","Waning Crescent" };
ReefAngel.LCD.DrawText(COLOR_CORNFLOWERBLUE,255,35,98,ThisPhaseLabel[ThisPhase]);
ReefAngel.LCD.DrawText(0,255,75,109,"%");
ReefAngel.LCD.DrawSingleMonitor(COLOR_CORNFLOWERBLUE,255, 60, 109, ReefAngel.PWM.GetActinicValue());
}
else if (SeasonsVar[5] > 0) //or if there is a cloud display clouds instead
{
if (SeasonsVar[8] > 0) ReefAngel.LCD.DrawText(0,255, 8, 98, "Storm"); //decide between dislaying storm or cloud based on lightningchance
else ReefAngel.LCD.DrawText(0,255,8,98,"Cloud");
ReefAngel.LCD.DrawText(COLOR_CORNFLOWERBLUE,255,42,98, SeasonsVar[5]);
ReefAngel.LCD.DrawText(COLOR_CORNFLOWERBLUE,255,54,98, ":");
ReefAngel.LCD.DrawText(COLOR_CORNFLOWERBLUE,255,59,98, SeasonsVar[6]);
ReefAngel.LCD.DrawText(0,255,75,98,"Length");
ReefAngel.LCD.DrawText(COLOR_CORNFLOWERBLUE,255,115,98, SeasonsVar[7]);
}
else //if no moon or clouds show LED PWM %'s
{
ReefAngel.LCD.DrawText(0,255,8,98,"W");
ReefAngel.LCD.DrawText(COLOR_CORNFLOWERBLUE,255,15,98,SeasonsVar[0]);
ReefAngel.LCD.DrawText(COLOR_TOMATO,255,33,98,"|");
ReefAngel.LCD.DrawText(0,255,38,98,"R");
ReefAngel.LCD.DrawText(COLOR_CORNFLOWERBLUE,255,45,98,SeasonsVar[9]);
ReefAngel.LCD.DrawText(COLOR_TOMATO,255,63,98,"|");
ReefAngel.LCD.DrawText(0,255,68,98,"B");
ReefAngel.LCD.DrawText(COLOR_CORNFLOWERBLUE,255,75,98,SeasonsVar[10]);
ReefAngel.LCD.DrawText(COLOR_TOMATO,255,93,98,"|");
ReefAngel.LCD.DrawText(0,255,98,98,"V");
ReefAngel.LCD.DrawText(COLOR_CORNFLOWERBLUE,255,105,98,SeasonsVar[11]);
}
ReefAngel.LCD.DrawText(0,255,8,109, "Sunrise");
ReefAngel.LCD.DrawText(COLOR_CORNFLOWERBLUE,255,15,119, SeasonsVar[1]);
ReefAngel.LCD.DrawText(COLOR_CORNFLOWERBLUE,255,20,119, ":");
ReefAngel.LCD.DrawText(COLOR_CORNFLOWERBLUE,255,25,119, SeasonsVar[2]);
ReefAngel.LCD.DrawText(0,255,88,109, "Sunset");
ReefAngel.LCD.DrawText(COLOR_CORNFLOWERBLUE,255,90,119, SeasonsVar[3]);
ReefAngel.LCD.DrawText(COLOR_CORNFLOWERBLUE,255,102,119, ":");
ReefAngel.LCD.DrawText(COLOR_CORNFLOWERBLUE,255,107,119, SeasonsVar[4]);
}
void DrawCustomGraph()
{
}