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

@ -1,4 +1,5 @@
0.01: Launch app. 0.01: Launch app.
0.02: 12k steps are 360 degrees - improves readability of steps. 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.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.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", "name": "Not Analog",
"shortName":"Not Analog", "shortName":"Not Analog",
"icon": "notanalog.png", "icon": "notanalog.png",
"version":"0.04", "version":"0.05",
"readme": "README.md", "readme": "README.md",
"supports": ["BANGLEJS2"], "supports": ["BANGLEJS2"],
"description": "An analog watch face for people that can not read analog watch faces.", "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() { function getSteps() {
var steps = 0;
try{ try{
if (WIDGETS.wpedom !== undefined) { if (WIDGETS.wpedom !== undefined) {
return WIDGETS.wpedom.getSteps(); steps = WIDGETS.wpedom.getSteps();
} else if (WIDGETS.activepedom !== undefined) { } else if (WIDGETS.activepedom !== undefined) {
return WIDGETS.activepedom.getSteps(); steps = WIDGETS.activepedom.getSteps();
} else {
steps = Bangle.getHealthStatus("day").steps;
} }
} catch(ex) { } catch(ex) {
// In case we failed, we can only show 0 steps. // In case we failed, we can only show 0 steps.
} }
return 0; return steps;
} }
function drawBackground() { function drawBackground() {
@ -289,6 +291,9 @@ function drawSleep(){
function draw(fastUpdate){ function draw(fastUpdate){
// Queue draw in one minute
queueDraw();
// Execute handlers // Execute handlers
handleState(fastUpdate); handleState(fastUpdate);
@ -320,9 +325,6 @@ function draw(fastUpdate){
drawState(); drawState();
drawTime(); drawTime();
drawData(); drawData();
// Queue draw in one minute
queueDraw();
} }