battery voltage estimate

pull/2855/head
Graham Fenner 2023-07-01 16:55:42 +01:00
parent 0662bb44f5
commit d2789d8418
No known key found for this signature in database
5 changed files with 9 additions and 4 deletions

View File

@ -25,3 +25,4 @@
0.25: Add more colors to the settings and add the ability to disable the data charts+Markup. 0.25: Add more colors to the settings and add the ability to disable the data charts+Markup.
0.26: Use widget_utils. 0.26: Use widget_utils.
0.27: Report latest HRM rather than HRM 10 minutes ago (fix #2395) 0.27: Report latest HRM rather than HRM 10 minutes ago (fix #2395)
0.28: Battery Vref implemented correctly.

View File

@ -25,7 +25,8 @@ the "sched" app must be installed on your device.
## Data that can be configured ## Data that can be configured
* Steps - Steps loaded via the wpedom app. * Steps - Steps loaded via the wpedom app.
* Battery - Current battery level in % * Battery - Current battery level in %
* VREF - Voltage of battery * BattVolt - Voltage of battery
* VREF - Internal Voltage Reference
* HRM - Last measured HRM * HRM - Last measured HRM
* Temp - Weather temperature loaded via the weather module + gadgetbridge * Temp - Weather temperature loaded via the weather module + gadgetbridge
* Humidity - Humidity loaded via the weather module + gadgetbridge * Humidity - Humidity loaded via the weather module + gadgetbridge

View File

@ -239,6 +239,9 @@ function _drawData(key, y, c){
} else if (key == "VREF"){ } else if (key == "VREF"){
value = E.getAnalogVRef().toFixed(2) + "V"; value = E.getAnalogVRef().toFixed(2) + "V";
} else if (key =="BATTVOLT" ) {
text = "BATV";
value = (E.getAnalogVRef()*analogRead(3)*4).toFixed(2) + "V";
} else if(key == "HRM"){ } else if(key == "HRM"){
value = Math.round(Bangle.getHealthStatus().bpm||Bangle.getHealthStatus("last").bpm); value = Math.round(Bangle.getHealthStatus().bpm||Bangle.getHealthStatus("last").bpm);

View File

@ -26,7 +26,7 @@
} }
var dataOptions = ["Steps", "Battery", "VREF", "HRM", "Temp", "Humidity", "Wind", "Altitude", "CoreT"]; var dataOptions = ["Steps", "Battery", "BattVolt", "VREF", "HRM", "Temp", "Humidity", "Wind", "Altitude", "CoreT"];
var speedOptions = ["kph", "mph"]; var speedOptions = ["kph", "mph"];
var color_options = ['Green','Orange','Cyan','Purple','Red','Blue','Yellow','White','Purple','Pink','Light Green','Dark Green']; var color_options = ['Green','Orange','Cyan','Purple','Red','Blue','Yellow','White','Purple','Pink','Light Green','Dark Green'];
var bg_code = ['#00ff00','#FF9900','#0094FF','#FF00DC','#ff0000','#0000ff','#ffef00','#FFFFFF','#FF00FF','#6C00FF','#99FF00','#556B2F']; var bg_code = ['#00ff00','#FF9900','#0094FF','#FF00DC','#ff0000','#0000ff','#ffef00','#FFFFFF','#FF00FF','#6C00FF','#99FF00','#556B2F'];

View File

@ -3,7 +3,7 @@
"name": "LCARS Clock", "name": "LCARS Clock",
"shortName":"LCARS", "shortName":"LCARS",
"icon": "lcars.png", "icon": "lcars.png",
"version":"0.27", "version":"0.28",
"readme": "README.md", "readme": "README.md",
"supports": ["BANGLEJS2"], "supports": ["BANGLEJS2"],
"description": "Library Computer Access Retrieval System (LCARS) clock.", "description": "Library Computer Access Retrieval System (LCARS) clock.",