If I just modify the files in libararies/ReefAngel/RA_NokiaLCD/ then it appears to have no effect--the original libraries are used.
There seems to be some gap in my understanding of the Arduino compilation/library model.
The code in question is intended to replace the DrawOutletBox with a version that allows the outlets to be labelled. A wrapper for the old behaviour is provided that prints the usual 1-8. In my sketch I would use the new DrawLabelledOutletBox with a label set that labels my outlets "HFLR KR" (or something else that helps me remember which is which).
Cheers!
Code: Select all
void RA_NokiaLCD::DrawOutletBox(byte x, byte y,byte RelayData)
{
DrawLabelledOutletBox(x, y, RelayData, "12345678");
}
void RA_NokiaLCD::DrawLabelledOutletBox(byte x, byte y,byte RelayData, char* labels)
{
Clear(OutletBorderColor,x,y,x+104,y); //94
Clear(OutletBorderColor,x,y+12,x+104,y+12);
for (byte a=0;a<8;a++)
{
byte bcolor = OutletOffBGColor;
byte fcolor = OutletOffFGColor;
char temp[]=" ";
if ((RelayData&(1<<a))==1<<a)
{
bcolor = OutletOnBGColor;
fcolor = OutletOnFGColor;
}
Clear(bcolor,x+(a*13),y+1,x+13+(a*13),y+11);
temp[0] = labels[a];
DrawText(fcolor,bcolor,x+4+(a*13),y+3,temp);
}
}