I have created my own screen by cutting and pasting alot, but I am getting the hang of coding and want to understand more so I can do more on my own
...here is something I don't understand...in the code below, what do the lines "byte x=6" and "byte y=2" and "byte t" mean? They are used later adding numbers to define spots on the X/Y axis, right? but what does it do that just putting in a number value doesn't do? I feel like this is a newb question, and that it may be an obvious coding answer, but I can't figure it out on my own...thanks in advance...
Code: Select all
[quote]
void DrawCustomMain()
{
byte x = 6;
byte y = 2;
byte t;
ReefAngel.LCD.DrawLargeText(COLOR_DARKTURQUOISE, COLOR_WHITE, 6, 2, [color=#006699]"Rob's ReefAngel"[/color]);
ReefAngel.LCD.DrawDate(6, 118);
ReefAngel.LCD.Clear(COLOR_MAROON, 1, 17, 132, 17);
ReefAngel.LCD.Clear(COLOR_MAROON, 1, 115, 132, 115);
ReefAngel.LCD.Clear(COLOR_MAROON, 1, 90, 132, 90);
pingSerial();
x = 6;
y += MENU_START_ROW+1;
ReefAngel.LCD.DrawText(COLOR_BLUE, COLOR_WHITE, x, y+6, [color=#006699]"Display Tank PH"[/color]);
[color=#CC6600]char[/color] text[7];
ConvertNumToString(text, ReefAngel.Params.PH, 100);
ReefAngel.LCD.Clear(DefaultBGColor, x+8, y+65, x+65, y+16);
ReefAngel.LCD.DrawLargeText(PHColor, DefaultBGColor, x+90, y+18, text);
pingSerial();
ConvertNumToString(text, ReefAngel.Params.Temp1, 10);
y += MENU_START_ROW*2;
x = 10;
ReefAngel.LCD.Clear(DefaultBGColor,x,y,x+(16*4),y+16);
pingSerial();
ReefAngel.LCD.DrawHugeNumbers(T1TempColor, DefaultBGColor, x, y, text);
pingSerial();
x += (16*4) + 8;
ReefAngel.LCD.DrawText(COLOR_BLUE, COLOR_WHITE,8,y+25,[color=#006699]"ROOM:"[/color]);
ReefAngel.LCD.Clear(COLOR_CRIMSON, 8, y+33, 32, y+33);
ReefAngel.LCD.DrawSingleMonitor(ReefAngel.Params.Temp2, T2TempColor,
9, y+36, 10);
ReefAngel.LCD.DrawText(COLOR_BLUE, COLOR_WHITE,x+8,y+25,[color=#006699]"FRAG:"[/color]);
ReefAngel.LCD.Clear(COLOR_CRIMSON, x+8, y+33, x+32, y+33);
ReefAngel.LCD.DrawSingleMonitor(ReefAngel.Params.Temp3, T3TempColor,
x+9, y+36, 10);
[color=#CC6600]byte[/color] TempRelay = ReefAngel.Relay.RelayData;
TempRelay &= ReefAngel.Relay.RelayMaskOff;
TempRelay |= ReefAngel.Relay.RelayMaskOn;
ReefAngel.LCD.DrawOutletBox(12, 96, TempRelay);
}
[color=#CC6600]void[/color] DrawCustomGraph()
{
}
[/quote]