added hide settings for line1/line2 in activepedom widget

pull/650/head
hughbarney 2021-01-28 20:53:39 +00:00
parent 6c830d4a0c
commit 41777c29b8
5 changed files with 9 additions and 3 deletions

View File

@ -1341,7 +1341,7 @@
"name": "Active Pedometer",
"shortName":"Active Pedometer",
"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.",
"tags": "outdoors,widget",
"readme": "README.md",

View File

@ -4,3 +4,4 @@
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.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
* 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
* Can hide the widget display if required using settings
## Features App

View File

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

View File

@ -141,6 +141,10 @@
function draw() {
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
//Check if same day