activepedom 0.05: Fix default step/distance display if it hasn't been set up first
parent
c9afa66dde
commit
e0a8664745
|
|
@ -1341,7 +1341,7 @@
|
||||||
"name": "Active Pedometer",
|
"name": "Active Pedometer",
|
||||||
"shortName":"Active Pedometer",
|
"shortName":"Active Pedometer",
|
||||||
"icon": "app.png",
|
"icon": "app.png",
|
||||||
"version":"0.04",
|
"version":"0.05",
|
||||||
"description": "Pedometer that filters out arm movement and displays a step goal progress. Steps are saved to a daily file and can be viewed as graph.",
|
"description": "Pedometer that filters out arm movement and displays a step goal progress. Steps are saved to a daily file and can be viewed as graph.",
|
||||||
"tags": "outdoors,widget",
|
"tags": "outdoors,widget",
|
||||||
"readme": "README.md",
|
"readme": "README.md",
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,5 @@
|
||||||
0.01: New Widget!
|
0.01: New Widget!
|
||||||
0.02: Distance calculation and display
|
0.02: Distance calculation and display
|
||||||
0.03: Data logging and display
|
0.03: Data logging and display
|
||||||
0.04: Steps are set to 0 in log on new day
|
0.04: Steps are set to 0 in log on new day
|
||||||
|
0.05: Fix default step/distance display if it hasn't been set up first
|
||||||
|
|
|
||||||
|
|
@ -68,6 +68,8 @@
|
||||||
'stepSensitivity' : 80,
|
'stepSensitivity' : 80,
|
||||||
'stepGoal' : 10000,
|
'stepGoal' : 10000,
|
||||||
'stepLength' : 75,
|
'stepLength' : 75,
|
||||||
|
'lineOne' : "Distance",
|
||||||
|
'lineTwo' : "Steps",
|
||||||
};
|
};
|
||||||
if (!settings) { loadSettings(); }
|
if (!settings) { loadSettings(); }
|
||||||
return (key in settings) ? settings[key] : DEFAULTS[key];
|
return (key in settings) ? settings[key] : DEFAULTS[key];
|
||||||
|
|
@ -160,7 +162,6 @@
|
||||||
if (active == 1) g.setColor(0x07E0); //green
|
if (active == 1) g.setColor(0x07E0); //green
|
||||||
else g.setColor(0xFFFF); //white
|
else g.setColor(0xFFFF); //white
|
||||||
g.setFont("6x8", 2);
|
g.setFont("6x8", 2);
|
||||||
|
|
||||||
if (setting('lineOne') == 'Steps') {
|
if (setting('lineOne') == 'Steps') {
|
||||||
g.drawString(kFormatterSteps(stepsCounted),this.x+1,this.y); //first line, big number, steps
|
g.drawString(kFormatterSteps(stepsCounted),this.x+1,this.y); //first line, big number, steps
|
||||||
}
|
}
|
||||||
|
|
@ -229,4 +230,4 @@
|
||||||
timerStoreData = setInterval(storeData, storeDataInterval); //store data regularly
|
timerStoreData = setInterval(storeData, storeDataInterval); //store data regularly
|
||||||
//Add widget
|
//Add widget
|
||||||
WIDGETS["activepedom"]={area:"tl",width:width,draw:draw};
|
WIDGETS["activepedom"]={area:"tl",width:width,draw:draw};
|
||||||
})();
|
})();
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue