widbat 0.08: Ensure battery updates every 60s even if LCD was on at boot and stays on
parent
397fce2842
commit
0d7bddddde
|
|
@ -616,7 +616,7 @@
|
||||||
{ "id": "widbat",
|
{ "id": "widbat",
|
||||||
"name": "Battery Level Widget",
|
"name": "Battery Level Widget",
|
||||||
"icon": "widget.png",
|
"icon": "widget.png",
|
||||||
"version":"0.07",
|
"version":"0.08",
|
||||||
"description": "Show the current battery level and charging status in the top right of the clock",
|
"description": "Show the current battery level and charging status in the top right of the clock",
|
||||||
"tags": "widget,battery,b2",
|
"tags": "widget,battery,b2",
|
||||||
"type":"widget",
|
"type":"widget",
|
||||||
|
|
|
||||||
|
|
@ -4,3 +4,4 @@
|
||||||
0.05: Fix regression stopping correct widget updates
|
0.05: Fix regression stopping correct widget updates
|
||||||
0.06: Use 'g.theme' (requires bootloader 0.23)
|
0.06: Use 'g.theme' (requires bootloader 0.23)
|
||||||
0.07: Move CHARGING variable to more readable string
|
0.07: Move CHARGING variable to more readable string
|
||||||
|
0.08: Ensure battery updates every 60s even if LCD was on at boot and stays on
|
||||||
|
|
|
||||||
|
|
@ -23,7 +23,7 @@
|
||||||
Bangle.drawWidgets(); // relayout widgets
|
Bangle.drawWidgets(); // relayout widgets
|
||||||
g.flip();
|
g.flip();
|
||||||
});
|
});
|
||||||
var batteryInterval;
|
var batteryInterval = Bangle.isLCDOn() ? setInterval(()=>WIDGETS["bat"].draw(), 60000) : undefined;
|
||||||
Bangle.on('lcdPower', function(on) {
|
Bangle.on('lcdPower', function(on) {
|
||||||
if (on) {
|
if (on) {
|
||||||
WIDGETS["bat"].draw();
|
WIDGETS["bat"].draw();
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue