1
0
Fork 0

Optimized Battery display

master
OmegaRogue 2020-12-09 14:24:02 +01:00
parent 3d6cba0925
commit 0da99ce3ff
1 changed files with 7 additions and 3 deletions

View File

@ -73,6 +73,10 @@ function drawBattery() {
g.setColor(c).fillRect(46, 58 + 80 + yOffset + 37, xl, height - 5);
}
function updateCounter() {
drawBattery();
drawCounterText();
}
function drawClock() {
// main frame
@ -89,7 +93,7 @@ function drawClock() {
Arwes.drawFrameNoCorners(44, 58 + 80 + yOffset + 35, 196, height - 3);
drawBattery();
updateCounter()
updateClock();
// const img = makeImg();
@ -101,7 +105,7 @@ function updateClock() {
const date = new Date();
drawTimeText(date);
drawDateText(date);
drawCounterText();
}
@ -131,6 +135,6 @@ setWatch(Bangle.showLauncher, BTN2, {repeat: false, edge: "falling"});
// refesh every 100 milliseconds
setInterval(updateClock, 500);
setInterval(drawBattery, 1000);
setInterval(updateCounter, 1000);