Merge pull request #202 from TobiasE-github/master

fix error in label position
This commit is contained in:
Norbert Walter 2025-08-27 23:14:37 +02:00 committed by GitHub
commit ac86bfb304
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 4 additions and 2 deletions

View File

@ -364,6 +364,7 @@ public:
// Show value6 (=fourth user-configured parameter) and ssource, so that they do not collide with the wind pointer // Show value6 (=fourth user-configured parameter) and ssource, so that they do not collide with the wind pointer
if ( cos(value1) > 0){ if ( cos(value1) > 0){
//pointer points upwards
getdisplay().setFont(&DSEG7Classic_BoldItalic16pt7b); getdisplay().setFont(&DSEG7Classic_BoldItalic16pt7b);
getdisplay().setCursor(160, 200); getdisplay().setCursor(160, 200);
getdisplay().print(svalue6); // Value getdisplay().print(svalue6); // Value
@ -385,6 +386,7 @@ if ( cos(value1) > 0){
getdisplay().print(ssource); // true or app. getdisplay().print(ssource); // true or app.
} }
else{ else{
// pointer points downwards
getdisplay().setFont(&DSEG7Classic_BoldItalic16pt7b); getdisplay().setFont(&DSEG7Classic_BoldItalic16pt7b);
getdisplay().setCursor(160, 130); getdisplay().setCursor(160, 130);
getdisplay().print(svalue6); // Value getdisplay().print(svalue6); // Value
@ -398,10 +400,10 @@ else{
getdisplay().print(unit6old); // Unit getdisplay().print(unit6old); // Unit
} }
if (sin(value1)>0){ if (sin(value1)>0){
getdisplay().setCursor(160, 130); getdisplay().setCursor(160, 200);
} }
else{ else{
getdisplay().setCursor(220, 130); getdisplay().setCursor(220, 200);
} }
getdisplay().print(ssource); //true or app. getdisplay().print(ssource); //true or app.
} }