Stops the face redrawing and using all memory

Removes the clear screen and widget loading from each wake so it only runs the first time. Prevents the watch from running out of memory after approx. 3 wakes.
pull/466/head
Harrison Asmar 2020-05-30 20:05:47 +10:00 committed by GitHub
parent 889ed82de2
commit c83ae5dc7e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 3 deletions

View File

@ -5,9 +5,6 @@ var flag = false;
var WeekDays = ["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]; var WeekDays = ["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"];
function drawAll(){ function drawAll(){
g.clear();
Bangle.loadWidgets();
Bangle.drawWidgets();
updateTime(); updateTime();
updateRest(new Date()); updateRest(new Date());
} }
@ -42,6 +39,9 @@ function writeLine(str,line){
g.drawString(str,25,marginTop+line*30); g.drawString(str,25,marginTop+line*30);
} }
g.clear();
Bangle.loadWidgets();
Bangle.drawWidgets();
drawAll(); drawAll();
Bangle.on('lcdPower',function(on) { Bangle.on('lcdPower',function(on) {
if (on) if (on)