Skip to content

Commit 9b1a48c

Browse files
authored
Fix flicker
1 parent bf1f2de commit 9b1a48c

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

apps/chargeanim/app.js

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -76,14 +76,15 @@ function anim() {
7676
g.drawImage(imgbubble,f.y,f.x,{scale:f.s * b2scale, rotate:b2rot});
7777
});
7878
g.drawImage(imgbat, mx,my,{scale:b2scale, rotate:Math.sin(getTime()*2)*0.5-Math.PI/2 + b2rot});
79-
g.flip();
80-
8179
if(settings.showTime==true){
8280
g.drawString(clockStr,x,cy);
8381
}
8482
if(settings.showBatPercent==true){
8583
g.drawString(batteryPercentStr,x,by,true);
8684
}
85+
g.flip();
86+
87+
8788
}
8889

8990
if(settings.showBatPercent||settings.showTime){
@@ -92,7 +93,7 @@ if(settings.showBatPercent||settings.showTime){
9293
setInterval(calculate,20000);
9394
}
9495

95-
setInterval(anim,15);
96+
setInterval(anim,22);
9697

9798

9899
Bangle.on("charging", isCharging => {

0 commit comments

Comments
 (0)