Allow configuration of update interval
parent
437630574d
commit
5358fec9ba
|
|
@ -23,3 +23,4 @@
|
||||||
0.11: New color option: foreground color
|
0.11: New color option: foreground color
|
||||||
Improve performance, reduce memory usage
|
Improve performance, reduce memory usage
|
||||||
Small optical adjustments
|
Small optical adjustments
|
||||||
|
0.12: Allow configuration of update interval
|
||||||
|
|
|
||||||
|
|
@ -848,8 +848,8 @@ Bangle.loadWidgets();
|
||||||
|
|
||||||
// schedule a draw for the next minute
|
// schedule a draw for the next minute
|
||||||
setTimeout(function() {
|
setTimeout(function() {
|
||||||
// draw every 60 seconds
|
// draw in interval
|
||||||
setInterval(draw,60000);
|
setInterval(draw, settings.updateInterval * 1000);
|
||||||
}, 60000 - (Date.now() % 60000));
|
}, 60000 - (Date.now() % 60000));
|
||||||
|
|
||||||
draw();
|
draw();
|
||||||
|
|
|
||||||
|
|
@ -21,5 +21,6 @@
|
||||||
"circle2colorizeIcon": true,
|
"circle2colorizeIcon": true,
|
||||||
"circle3colorizeIcon": true,
|
"circle3colorizeIcon": true,
|
||||||
"circle4colorizeIcon": false,
|
"circle4colorizeIcon": false,
|
||||||
"hrmValidity": 60
|
"hrmValidity": 60,
|
||||||
|
"updateInterval": 60
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
{ "id": "circlesclock",
|
{ "id": "circlesclock",
|
||||||
"name": "Circles clock",
|
"name": "Circles clock",
|
||||||
"shortName":"Circles clock",
|
"shortName":"Circles clock",
|
||||||
"version":"0.11",
|
"version":"0.12",
|
||||||
"description": "A clock with three or four circles for different data at the bottom in a probably familiar style",
|
"description": "A clock with three or four circles for different data at the bottom in a probably familiar style",
|
||||||
"icon": "app.png",
|
"icon": "app.png",
|
||||||
"screenshots": [{"url":"screenshot-dark.png"}, {"url":"screenshot-light.png"}, {"url":"screenshot-dark-4.png"}, {"url":"screenshot-light-4.png"}],
|
"screenshots": [{"url":"screenshot-dark.png"}, {"url":"screenshot-light.png"}, {"url":"screenshot-dark-4.png"}, {"url":"screenshot-light-4.png"}],
|
||||||
|
|
|
||||||
|
|
@ -58,6 +58,16 @@
|
||||||
min: 0, max: 2,
|
min: 0, max: 2,
|
||||||
format: v => weatherData[v],
|
format: v => weatherData[v],
|
||||||
onchange: x => save('weatherCircleData', weatherData[x]),
|
onchange: x => save('weatherCircleData', weatherData[x]),
|
||||||
|
},
|
||||||
|
/*LANG*/'update interval': {
|
||||||
|
value: settings.updateInterval,
|
||||||
|
min: 0,
|
||||||
|
max : 3600,
|
||||||
|
step: 30,
|
||||||
|
format: x => {
|
||||||
|
return x + 's';
|
||||||
|
},
|
||||||
|
onchange: x => save('updateInterval', x),
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
E.showMenu(menu);
|
E.showMenu(menu);
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue