Enables pages Autopilot, BME280, Compass, Current for small decimals

This commit is contained in:
Ulrich Meine
2026-09-01 21:51:30 +02:00
parent 0202c5d82a
commit 6c318d5a69
4 changed files with 36 additions and 33 deletions
+8 -5
View File
@@ -24,6 +24,10 @@ const float Compass_LineDelta = 8.0;// Compass band: 1deg = 5 Pixels, 10deg = 50
class PageCompass : public Page
{
static constexpr int8_t LEFT = 0;
static constexpr int8_t CENTER = 1;
static constexpr int8_t RIGHT = 2;
int WhichDataCompass = ShowHDM;
int WhichDataDisplay = ShowHDM;
@@ -75,6 +79,7 @@ class PageCompass : public Page
bool holdvalues = config->getBool(config->holdvalues);
String flashLED = config->getString(config->flashLED);
String backlightMode = config->getString(config->backlight);
bool smallDecimals = config->getBool(config->smallDecimals);
GwApi::BoatValue *bvalue;
String DataName[HowManyValues];
@@ -122,14 +127,12 @@ class PageCompass : public Page
getdisplay().setFont(&Ubuntu_Bold12pt8b);
getdisplay().setCursor(10, 120);
getdisplay().print(DataUnits[WhichDataDisplay]);
getdisplay().setCursor(190, 120);
getdisplay().setFont(&DSEG7Classic_BoldItalic42pt7b);
if(holdvalues == false){
getdisplay().print(DataText[WhichDataDisplay]); // Real value as formated string
printBoatValue(DataText[WhichDataDisplay], 190, 120, LEFT, 42, smallDecimals); // Real value as formated string
}
else{
getdisplay().print(OldDataText[WhichDataDisplay]); // Old value as formated string
printBoatValue(OldDataText[WhichDataDisplay], 190, 120, LEFT, 42, smallDecimals); // Old value as formated string
}
if(DataValid[WhichDataDisplay] == true){
OldDataText[WhichDataDisplay] = DataText[WhichDataDisplay]; // Save the old value