Skip to content

Commit

Permalink
Merge pull request #2855 from d3nd3/lcars_vref
Browse files Browse the repository at this point in the history
battery voltage estimate
  • Loading branch information
gfwilliams authored Jul 3, 2023
2 parents 8b5fd6f + d2789d8 commit 78d95a0
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 4 deletions.
3 changes: 2 additions & 1 deletion apps/lcars/ChangeLog
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,5 @@
0.24: Add ability to disable alarm functionality.
0.25: Add more colors to the settings and add the ability to disable the data charts+Markup.
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.
3 changes: 2 additions & 1 deletion apps/lcars/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,8 @@ the "sched" app must be installed on your device.
## Data that can be configured
* Steps - Steps loaded via the wpedom app.
* Battery - Current battery level in %
* VREF - Voltage of battery
* BattVolt - Voltage of battery
* VREF - Internal Voltage Reference
* HRM - Last measured HRM
* Temp - Weather temperature loaded via the weather module + gadgetbridge
* Humidity - Humidity loaded via the weather module + gadgetbridge
Expand Down
3 changes: 3 additions & 0 deletions apps/lcars/lcars.app.js
Original file line number Diff line number Diff line change
Expand Up @@ -239,6 +239,9 @@ function _drawData(key, y, c){
} else if (key == "VREF"){
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"){
value = Math.round(Bangle.getHealthStatus().bpm||Bangle.getHealthStatus("last").bpm);

Expand Down
2 changes: 1 addition & 1 deletion apps/lcars/lcars.settings.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 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'];
Expand Down
2 changes: 1 addition & 1 deletion apps/lcars/metadata.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"name": "LCARS Clock",
"shortName":"LCARS",
"icon": "lcars.png",
"version":"0.27",
"version":"0.28",
"readme": "README.md",
"supports": ["BANGLEJS2"],
"description": "Library Computer Access Retrieval System (LCARS) clock.",
Expand Down

0 comments on commit 78d95a0

Please sign in to comment.