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

Sample page apparent wind

This commit is contained in:
norbert-walter
2022-02-27 17:20:53 +01:00
parent d39c233a39
commit d3e7aae21a
7 changed files with 211 additions and 67 deletions

View File

@@ -3,17 +3,16 @@
class PageVoltage : public Page
{
int dummy=0; //an example on how you would maintain some status
//for a page
bool keylock = false; // Keylock
public:
PageVoltage(CommonData &common){
common.logger->logDebug(GwLog::LOG,"created PageApparentWind");
dummy=1;
common.logger->logDebug(GwLog::LOG,"Show PageVoltage");
}
virtual int handleKey(int key){
if(key == 3){
dummy++;
return 0; // Commit the key
if(key == 11){ // Code for keylock
keylock = !keylock; // Toggle keylock
return 0; // Commit the key
}
return key;
}
@@ -117,8 +116,13 @@ public:
// Key Layout
display.setFont(&Ubuntu_Bold8pt7b);
display.setCursor(115, 290);
display.print(" [ <<<<<< >>>>>> ]");
if(String(backlightMode) == "Control by Key"){
if(keylock == false){
display.print(" [ <<<<<< >>>>>> ]");
}
else{
display.print(" [ Keylock active ]");
}
if(String(backlightMode) == "Control by Key"){ // Key for illumination
display.setCursor(343, 290);
display.print("[ILUM]");
}