Fix pointer display and header layout improved

This commit is contained in:
Thomas Hooge 2025-02-08 16:15:37 +01:00
parent 2a4c351c58
commit acf75495df
2 changed files with 4 additions and 4 deletions

View File

@ -438,7 +438,7 @@ void displayHeader(CommonData &commonData, GwApi::BoatValue *date, GwApi::BoatVa
getdisplay().print(" "); getdisplay().print(" ");
getdisplay().print(tz == 0 ? "UTC" : "LOT"); getdisplay().print(tz == 0 ? "UTC" : "LOT");
} else { } else {
getdisplay().print("RTC invalid"); drawTextRalign(396, 15, "RTC invalid");
} }
} }
else if (timesource == "GPS") { else if (timesource == "GPS") {
@ -458,7 +458,7 @@ void displayHeader(CommonData &commonData, GwApi::BoatValue *date, GwApi::BoatVa
getdisplay().print("12:00 01.01.2024 LOT"); getdisplay().print("12:00 01.01.2024 LOT");
} }
else{ else{
getdisplay().print("No GPS data"); drawTextRalign(396, 15, "No GPS data");
} }
} }
} // timesource == "GPS" } // timesource == "GPS"

View File

@ -378,7 +378,7 @@ double timezone = 0; // there are timezones with non int offsets, e.g. 5.5 or 5.
// Draw hour pointer // Draw hour pointer
float startwidth = 8; // Start width of pointer float startwidth = 8; // Start width of pointer
if(valid1 == true || commonData->data.rtcValid || holdvalues == true || simulation == true){ if(valid1 == true || (source == 'R' && commonData->data.rtcValid) || holdvalues == true || simulation == true){
float sinx=sin(hour * 30.0 * pi / 180); // Hour float sinx=sin(hour * 30.0 * pi / 180); // Hour
float cosx=cos(hour * 30.0 * pi / 180); float cosx=cos(hour * 30.0 * pi / 180);
// Normal pointer // Normal pointer
@ -404,7 +404,7 @@ double timezone = 0; // there are timezones with non int offsets, e.g. 5.5 or 5.
// Draw minute pointer // Draw minute pointer
startwidth = 8; // Start width of pointer startwidth = 8; // Start width of pointer
if(valid1 == true || commonData->data.rtcValid || holdvalues == true || simulation == true){ if(valid1 == true || (source == 'R' && commonData->data.rtcValid) || holdvalues == true || simulation == true){
float sinx=sin(minute * 6.0 * pi / 180); // Minute float sinx=sin(minute * 6.0 * pi / 180); // Minute
float cosx=cos(minute * 6.0 * pi / 180); float cosx=cos(minute * 6.0 * pi / 180);
// Normal pointer // Normal pointer