Merge branch 'master' of github.com:espruino/BangleApps

master
Gordon Williams 2021-01-29 09:18:32 +00:00
commit f6e4c49d8e
5 changed files with 9 additions and 3 deletions

View File

@ -1341,7 +1341,7 @@
"name": "Active Pedometer", "name": "Active Pedometer",
"shortName":"Active Pedometer", "shortName":"Active Pedometer",
"icon": "app.png", "icon": "app.png",
"version":"0.06", "version":"0.07",
"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",

View File

@ -4,3 +4,4 @@
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 0.05: Fix default step/distance display if it hasn't been set up first
0.06: Added WIDGETS.activepedom.getSteps() 0.06: Added WIDGETS.activepedom.getSteps()
0.07: Added settings to be able to hide line1 and line2 so there is no visible widget

View File

@ -31,6 +31,7 @@ Steps are saved to a datafile every 5 minutes. You can watch a graph using the a
* Step detection sensitivity from firmware can be configured * Step detection sensitivity from firmware can be configured
* Steps are saved to a file and read-in at start (to not lose step progress) * Steps are saved to a file and read-in at start (to not lose step progress)
* Settings can be changed in Settings - App/widget settings - Active Pedometer * Settings can be changed in Settings - App/widget settings - Active Pedometer
* Can hide the widget display if required using settings
## Features App ## Features App

View File

@ -4,7 +4,7 @@
*/ */
(function(back) { (function(back) {
const SETTINGS_FILE = 'activepedom.settings.json'; const SETTINGS_FILE = 'activepedom.settings.json';
const LINES = ['Steps', 'Distance']; const LINES = ['Steps', 'Distance', 'Hide'];
// initialize with default settings... // initialize with default settings...
let s = { let s = {
@ -109,4 +109,4 @@
}, },
}; };
E.showMenu(menu); E.showMenu(menu);
}); });

View File

@ -141,6 +141,10 @@
function draw() { function draw() {
var height = 23; //width is deined globally var height = 23; //width is deined globally
// not everyone likes a widget
if (setting('lineOne') == 'Hide' && setting('lineTwo') == 'Hide')
return;
distance = (stepsCounted * setting('stepLength')) / 100 /1000; //distance in km distance = (stepsCounted * setting('stepLength')) / 100 /1000; //distance in km
//Check if same day //Check if same day