1
0
Fork 0

Merge branch 'espruino:master' into master

master
nxdefiant 2022-05-05 18:56:05 +02:00 committed by GitHub
commit 048f4dedd8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 13 additions and 10 deletions

View File

@ -2,3 +2,4 @@
0.02: 12k steps are 360 degrees - improves readability of steps.
0.03: Battery improvements through sleep (no minute updates) and partial updates of drawing.
0.04: Use alarm for timer instead of own alarm implementation.
0.05: Use internal step counter if no widget is available.

View File

@ -3,7 +3,7 @@
"name": "Not Analog",
"shortName":"Not Analog",
"icon": "notanalog.png",
"version":"0.04",
"version":"0.05",
"readme": "README.md",
"supports": ["BANGLEJS2"],
"description": "An analog watch face for people that can not read analog watch faces.",

View File

@ -88,20 +88,22 @@ Graphics.prototype.setNormalFont = function(scale) {
};
function getSteps() {
var steps = 0;
try{
if (WIDGETS.wpedom !== undefined) {
return WIDGETS.wpedom.getSteps();
steps = WIDGETS.wpedom.getSteps();
} else if (WIDGETS.activepedom !== undefined) {
return WIDGETS.activepedom.getSteps();
steps = WIDGETS.activepedom.getSteps();
} else {
steps = Bangle.getHealthStatus("day").steps;
}
} catch(ex) {
// In case we failed, we can only show 0 steps.
}
return 0;
}
return steps;
}
function drawBackground() {
@ -289,6 +291,9 @@ function drawSleep(){
function draw(fastUpdate){
// Queue draw in one minute
queueDraw();
// Execute handlers
handleState(fastUpdate);
@ -320,9 +325,6 @@ function draw(fastUpdate){
drawState();
drawTime();
drawData();
// Queue draw in one minute
queueDraw();
}