mirror of
https://github.com/thooge/esp32-nmea2000-obp60.git
synced 2025-12-15 06:53:07 +01:00
Backup
This commit is contained in:
@@ -9,7 +9,6 @@ class PageBattery2 : public Page
|
||||
bool init = false; // Marker for init done
|
||||
bool keylock = false; // Keylock
|
||||
int average = 0; // Average type [0...3], 0=off, 1=10s, 2=60s, 3=300s
|
||||
bool trend = true; // Trend indicator [0|1], 0=off, 1=on
|
||||
double raw = 0;
|
||||
|
||||
public:
|
||||
@@ -24,12 +23,6 @@ public:
|
||||
return 0; // Commit the key
|
||||
}
|
||||
|
||||
// Trend indicator
|
||||
if(key == 5){
|
||||
trend = !trend;
|
||||
return 0; // Commit the key
|
||||
}
|
||||
|
||||
// Code for keylock
|
||||
if(key == 11){
|
||||
keylock = !keylock; // Toggle keylock
|
||||
@@ -79,9 +72,6 @@ public:
|
||||
valueTrend = commonData.data.batteryVoltage10;
|
||||
}
|
||||
|
||||
// Get raw value for trend indicator
|
||||
raw = commonData.data.batteryVoltage; // Live data
|
||||
|
||||
// Switch average values
|
||||
switch (average) {
|
||||
case 0:
|
||||
@@ -281,11 +271,18 @@ public:
|
||||
display.print("h");
|
||||
|
||||
// Show sensor type info
|
||||
String i2cAddr = "";
|
||||
display.setFont(&Ubuntu_Bold8pt7b);
|
||||
display.setCursor(270, 60);
|
||||
if(powerSensor == "off") display.print("Internal");
|
||||
if(powerSensor == "INA219") display.print("INA219");
|
||||
if(powerSensor == "INA226") display.print("INA226");
|
||||
if(powerSensor == "INA219"){
|
||||
display.print("INA219");
|
||||
}
|
||||
if(powerSensor == "INA226"){
|
||||
display.print("INA226");
|
||||
i2cAddr = " (0x" + String(INA226_I2C_ADDR1, HEX) + ")";
|
||||
}
|
||||
display.print(i2cAddr);
|
||||
display.setCursor(270, 80);
|
||||
display.print("Sensor Modul");
|
||||
|
||||
|
||||
Reference in New Issue
Block a user