bumped versions and Changelogs for apps using wpedom and activepedom .getSteps()

master
hughbarney 2021-01-26 22:10:29 +00:00
parent 63131d3133
commit b8c181209c
6 changed files with 23 additions and 20 deletions

View File

@ -1007,7 +1007,7 @@
{ "id": "widpedom",
"name": "Pedometer widget",
"icon": "widget.png",
"version":"0.10",
"version":"0.11",
"description": "Daily pedometer widget",
"tags": "widget",
"type":"widget",
@ -2139,7 +2139,7 @@
{ "id": "multiclock",
"name": "Multi Clock",
"icon": "multiclock.png",
"version":"0.10",
"version":"0.11",
"description": "Clock with multiple faces - Big, Analogue, Digital, Text, Time-Date.\n Switch between faces with BTN1 & BTN3",
"readme": "README.md",
"tags": "clock",

View File

@ -8,3 +8,4 @@
0.08: Add pinned clock face
0.09: Added Pedometer clock
0.10: Added GPS and Grid Ref clock faces
0.11: Updated Pedometer clock to retrieve steps from either wpedom or activepedom

View File

@ -2,38 +2,36 @@
function getFace(){
function draw() {
let steps = -1;
function draw() {
let steps = "-";
let show_steps = false;
// only attempt to get steps if activepedom is loaded
if (WIDGETS.activepedom !== undefined) {
steps = WIDGETS.activepedom.getSteps();
show_steps = true;
steps = WIDGETS.activepedom.getSteps();
} else if (WIDGETS.wpedom !== undefined) {
steps = WIDGETS.wpedom.getSteps();
}
var d = new Date();
var da = d.toString().split(" ");
var time = da[4].substr(0,5);
g.reset();
g.clearRect(0,24,239,239);
g.setFont("Vector", 80);
g.setColor(1,1,1); // white
g.setFontAlign(0, -1);
g.drawString(time, g.getWidth()/2, 60);
g.setColor(0,255,0); // green
g.setFont("Vector", 60);
g.drawString(steps, g.getWidth()/2, 160);
}
if (show_steps) {
g.setColor(0,255,0); // green
g.setFont("Vector", 60);
g.drawString(steps, g.getWidth()/2, 160);
}
}
function onSecond(){
var t = new Date();
if ((t.getSeconds() % 5) === 0) draw();
}
function onSecond(){
var t = new Date();
if ((t.getSeconds() % 5) === 0) draw();
}
return {init:draw, tick:onSecond};
}

View File

@ -2,3 +2,4 @@
0.05: Stop hours being displayed wrong if moving from 2 digits to 1 (fix #516)
0.06: Tweak sizing to allow widgets at top, and add widgets (fix #567)
0.07: Added leading zero to hours and minutes
0.08: Show step count by calling wpedom.getSteps() or activepedom.getSteps()

View File

@ -49,7 +49,9 @@ function drawSteps() {
g.setFontAlign(-1,0); // align right bottom
g.drawString("STEPS", 145, 40, true /*clear background*/);
g.setColor('#bdc3c7');
if (WIDGETS.wpedom !== undefined) {
if (WIDGETS.activepedom !== undefined) {
steps = WIDGETS.activepedom.getSteps();
} else if (WIDGETS.wpedom !== undefined) {
steps = WIDGETS.wpedom.getSteps();
}
g.drawString(steps, 145, 65, true /*clear background*/);

View File

@ -7,3 +7,4 @@
0.08: Ensure redrawing works with variable size widget system
0.09: Add daily goal
0.10: Fix daily goal, don't store settings in separate file
0.11: added getSteps() method for apps to retrieve step count