mirror of https://github.com/espruino/BangleApps
powermanager - Adds setting for widget
parent
b334b14f40
commit
ce46760922
|
@ -24,6 +24,12 @@
|
|||
'title': 'Power Manager'
|
||||
},
|
||||
"< Back" : back,
|
||||
'Show widget': {
|
||||
value: !!settings.widget,
|
||||
onchange: v => {
|
||||
writeSettings("widget", v);
|
||||
}
|
||||
},
|
||||
'Monotonic percentage': {
|
||||
value: !!settings.forceMonoPercentage,
|
||||
onchange: v => {
|
||||
|
|
|
@ -1,6 +1,10 @@
|
|||
/* run widgets in their own function scope so they don't interfere with
|
||||
currently-running apps */
|
||||
(() => {
|
||||
const s = require("Storage").readJSON("powermanager.json") || {};
|
||||
|
||||
if (!s.widget) return;
|
||||
|
||||
const GU = require("graphics_utils");
|
||||
const APPROX_IDLE = 0.3;
|
||||
const APPROX_HIGH_BW_BLE = 0.5;
|
||||
|
|
Loading…
Reference in New Issue