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",
|
||||
"name": "Battery Level Widget",
|
||||
"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",
|
||||
"tags": "widget,battery,b2",
|
||||
"type":"widget",
|
||||
|
|
|
|||
|
|
@ -4,3 +4,4 @@
|
|||
0.05: Fix regression stopping correct widget updates
|
||||
0.06: Use 'g.theme' (requires bootloader 0.23)
|
||||
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
|
||||
g.flip();
|
||||
});
|
||||
var batteryInterval;
|
||||
var batteryInterval = Bangle.isLCDOn() ? setInterval(()=>WIDGETS["bat"].draw(), 60000) : undefined;
|
||||
Bangle.on('lcdPower', function(on) {
|
||||
if (on) {
|
||||
WIDGETS["bat"].draw();
|
||||
|
|
|
|||
Loading…
Reference in New Issue