Code: Select all
int T2C;
float T2C2;
void DrawCustomMain()
{
T2C=ReefAngel.Params.Temp2;
T2C2=((float)T2C-32.0)*0.56;
ConvertNumToString(text, T2C2, 10);
ReefAngel.LCD.DrawText(T2TempColor,DefaultBGColor, 95, 65, T2C2);
}
Code: Select all
int T2C;
float T2C2;
void DrawCustomMain()
{
T2C=ReefAngel.Params.Temp2;
T2C2=((float)T2C-32.0)*0.56;
ConvertNumToString(text, T2C2, 10);
ReefAngel.LCD.DrawText(T2TempColor,DefaultBGColor, 95, 65, T2C2);
}
Code: Select all
ReefAngel.Params.Temp[T2_PROBE];
Code: Select all
Temp = Temp * 1.8 + 320;
Code: Select all
T2C2 = ((float)T2C-320)*0.56;
Code: Select all
int T2C;
int T2C2;
//This is inserted into DrawCustomMain...
//Convert and display LED array in Celsius
T2C=ReefAngel.Params.Temp2;
T2C2=((float)T2C-320)*0.56;
ConvertNumToString(text, T2C2, 10);
ReefAngel.LCD.DrawText(COLOR_OLIVEDRAB,DefaultBGColor, 95, 79, text);
ReefAngel.LCD.DrawText(COLOR_OLIVEDRAB,DefaultBGColor, 70, 79, "C");
ReefAngel.LCD.PutPixel(70, 66, 79);
ReefAngel.LCD.PutPixel(70, 67, 79);
ReefAngel.LCD.PutPixel(70, 65, 80);
ReefAngel.LCD.PutPixel(70, 65, 81);
ReefAngel.LCD.PutPixel(70, 66, 82);
ReefAngel.LCD.PutPixel(70, 67, 82);
ReefAngel.LCD.PutPixel(70, 68, 80);
ReefAngel.LCD.PutPixel(70, 68, 81);
Code: Select all
#define CONVERT_TO_C(x) ((x) - 320)/1.8
#define CONVERT_TO_F(x) ((x) * 1.8) + 320
Code: Select all
T2C2 = CONVERT_TO_C(ReefAngel.Params.Temp2);
Cool.sjmusic2 wrote:Just saw this new info, thanks, every byte saved is much appreciated