diff --git a/lib/obp60task/PageBattery2.cpp b/lib/obp60task/PageBattery2.cpp index 766481b..515dac1 100644 --- a/lib/obp60task/PageBattery2.cpp +++ b/lib/obp60task/PageBattery2.cpp @@ -9,6 +9,7 @@ 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: @@ -23,6 +24,12 @@ 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 @@ -72,6 +79,9 @@ public: valueTrend = commonData.data.batteryVoltage10; } + // Get raw value for trend indicator + raw = commonData.data.batteryVoltage; // Live data + // Switch average values switch (average) { case 0: