1
0
mirror of https://github.com/thooge/esp32-nmea2000-obp60.git synced 2025-12-15 15:03:07 +01:00

Bugfix units and display function

This commit is contained in:
norbert-walter
2022-02-27 19:08:45 +01:00
parent d3e7aae21a
commit 1d1f8ef0db
5 changed files with 27 additions and 7 deletions

View File

@@ -72,16 +72,19 @@ public:
//Clear display in obp60task.cpp in main loop
// Show name
display.setTextColor(textcolor);
display.setFont(&Ubuntu_Bold32pt7b);
display.setCursor(20, 100);
display.print(name1); // Page name
// Show unit
display.setTextColor(textcolor);
display.setFont(&Ubuntu_Bold20pt7b);
display.setCursor(270, 100);
display.print("V");
// Reading bus data or using simulation data
display.setTextColor(textcolor);
display.setFont(&DSEG7Classic_BoldItalic60pt7b);
display.setCursor(20, 240);
if(simulation == true){
@@ -114,18 +117,19 @@ public:
}
// Key Layout
display.setTextColor(textcolor);
display.setFont(&Ubuntu_Bold8pt7b);
display.setCursor(115, 290);
if(keylock == false){
display.print(" [ <<<<<< >>>>>> ]");
if(String(backlightMode) == "Control by Key"){ // Key for illumination
display.setCursor(343, 290);
display.print("[ILUM]");
}
}
else{
display.print(" [ Keylock active ]");
}
if(String(backlightMode) == "Control by Key"){ // Key for illumination
display.setCursor(343, 290);
display.print("[ILUM]");
}
// Update display
display.updateWindow(0, 0, GxEPD_WIDTH, GxEPD_HEIGHT, true); // Partial update (fast)