Backup
This commit is contained in:
parent
662dd5e0e2
commit
4de0606521
|
@ -9,6 +9,7 @@ class PageBattery2 : public Page
|
||||||
bool init = false; // Marker for init done
|
bool init = false; // Marker for init done
|
||||||
bool keylock = false; // Keylock
|
bool keylock = false; // Keylock
|
||||||
int average = 0; // Average type [0...3], 0=off, 1=10s, 2=60s, 3=300s
|
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;
|
double raw = 0;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
@ -23,6 +24,12 @@ public:
|
||||||
return 0; // Commit the key
|
return 0; // Commit the key
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Trend indicator
|
||||||
|
if(key == 5){
|
||||||
|
trend = !trend;
|
||||||
|
return 0; // Commit the key
|
||||||
|
}
|
||||||
|
|
||||||
// Code for keylock
|
// Code for keylock
|
||||||
if(key == 11){
|
if(key == 11){
|
||||||
keylock = !keylock; // Toggle keylock
|
keylock = !keylock; // Toggle keylock
|
||||||
|
@ -72,6 +79,9 @@ public:
|
||||||
valueTrend = commonData.data.batteryVoltage10;
|
valueTrend = commonData.data.batteryVoltage10;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Get raw value for trend indicator
|
||||||
|
raw = commonData.data.batteryVoltage; // Live data
|
||||||
|
|
||||||
// Switch average values
|
// Switch average values
|
||||||
switch (average) {
|
switch (average) {
|
||||||
case 0:
|
case 0:
|
||||||
|
|
Loading…
Reference in New Issue