mirror of https://github.com/espruino/BangleApps
Revert "Revert "exstats: fix steps being negative""
parent
cd79303f54
commit
ea03c34099
|
@ -17,3 +17,4 @@
|
|||
0.16: Added ability to resume a run that was stopped previously (fix #1907)
|
||||
0.17: Ensure screen redraws after "Resume run?" menu (#3044)
|
||||
0.18: Minor code improvements
|
||||
0.19: Fix step count bug when runs are resumed after a long time
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{ "id": "run",
|
||||
"name": "Run",
|
||||
"version": "0.18",
|
||||
"version": "0.19",
|
||||
"description": "Displays distance, time, steps, cadence, pace and more for runners.",
|
||||
"icon": "app.png",
|
||||
"tags": "run,running,fitness,outdoors,gps",
|
||||
|
|
|
@ -25,3 +25,4 @@ Write to correct settings file, fixing settings not working.
|
|||
0.22: Ensure screen redraws after "Resume run?" menu (#3044)
|
||||
0.23: Minor code improvements
|
||||
0.24: Add indicators for lock,gps and pulse to karvonen screen
|
||||
0.25: Fix step count bug when runs are resumed after a long time
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
{
|
||||
"id": "runplus",
|
||||
"name": "Run+",
|
||||
"version": "0.24",
|
||||
"version": "0.25",
|
||||
"description": "Displays distance, time, steps, cadence, pace and more for runners. Based on the Run app, but extended with additional screen for heart rate interval training.",
|
||||
"icon": "app.png",
|
||||
"tags": "run,running,fitness,outdoors,gps,karvonen,karvonnen",
|
||||
|
|
|
@ -102,6 +102,7 @@ var stats = {};
|
|||
const DATA_FILE = "exstats.json";
|
||||
// Load the state from a saved file if there was one
|
||||
state = Object.assign(state, require("Storage").readJSON(DATA_FILE,1)||{});
|
||||
state.startSteps = Bangle.getStepCount() - (state.lastSteps - state.startSteps);
|
||||
// force step history to a uint8array
|
||||
state.stepHistory = new Uint8Array(state.stepHistory);
|
||||
// when we exit, write the current state
|
||||
|
|
Loading…
Reference in New Issue