mirror of https://github.com/espruino/BangleApps
widbattpwr: show percentage if charging
parent
1e82772de6
commit
35bc00e271
|
@ -1 +1,2 @@
|
||||||
0.01: Initial fork from hwid_a_battery_widget
|
0.01: Initial fork from hwid_a_battery_widget
|
||||||
|
0.02: Show battery percentage (instead of power) if charging
|
||||||
|
|
|
@ -2,6 +2,10 @@
|
||||||
|
|
||||||
Show the time remaining at the current power consumption, and battery percentage via shading of the text and a percentage bar.
|
Show the time remaining at the current power consumption, and battery percentage via shading of the text and a percentage bar.
|
||||||
|
|
||||||
|
Battery percentage can be seen:
|
||||||
|
- Temporarily by tapping the widget
|
||||||
|
- By charging the watch
|
||||||
|
|
||||||
Requires firmware 2v23 or above.
|
Requires firmware 2v23 or above.
|
||||||
|
|
||||||
This is a copy of `hwid_a_battery_widget` (that being a copy of `wid_a_battery_widget`).
|
This is a copy of `hwid_a_battery_widget` (that being a copy of `wid_a_battery_widget`).
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
"name": "Battery power and percentage widget",
|
"name": "Battery power and percentage widget",
|
||||||
"shortName": "Batt Pwr",
|
"shortName": "Batt Pwr",
|
||||||
"icon": "widget.png",
|
"icon": "widget.png",
|
||||||
"version": "0.01",
|
"version": "0.02",
|
||||||
"type": "widget",
|
"type": "widget",
|
||||||
"supports": ["BANGLEJS2"],
|
"supports": ["BANGLEJS2"],
|
||||||
"readme": "README.md",
|
"readme": "README.md",
|
||||||
|
|
|
@ -39,7 +39,7 @@
|
||||||
g.setFont("Vector", 16);
|
g.setFont("Vector", 16);
|
||||||
{
|
{
|
||||||
var txt = void 0;
|
var txt = void 0;
|
||||||
if (showPct) {
|
if (showPct || Bangle.isCharging()) {
|
||||||
txt = "".concat(batt, "%");
|
txt = "".concat(batt, "%");
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
|
|
@ -44,7 +44,7 @@
|
||||||
g.setFont("Vector", 16);
|
g.setFont("Vector", 16);
|
||||||
{
|
{
|
||||||
let txt;
|
let txt;
|
||||||
if(showPct){
|
if(showPct || Bangle.isCharging()){
|
||||||
txt = `${batt}%`;
|
txt = `${batt}%`;
|
||||||
}else{
|
}else{
|
||||||
// 175mAh, scaled based on battery (batt/100), scaled down based on usage
|
// 175mAh, scaled based on battery (batt/100), scaled down based on usage
|
||||||
|
|
Loading…
Reference in New Issue