Revert "exstats: fix steps being negative"

pull/3411/head
Gordon Williams 2024-05-10 09:08:24 +01:00 committed by GitHub
parent e2ecb58c94
commit 208f04988e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
5 changed files with 3 additions and 6 deletions

View File

@ -17,4 +17,3 @@
0.16: Added ability to resume a run that was stopped previously (fix #1907) 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.17: Ensure screen redraws after "Resume run?" menu (#3044)
0.18: Minor code improvements 0.18: Minor code improvements
0.19: Fix step count bug when runs are resumed after a long time

View File

@ -1,6 +1,6 @@
{ "id": "run", { "id": "run",
"name": "Run", "name": "Run",
"version": "0.19", "version": "0.18",
"description": "Displays distance, time, steps, cadence, pace and more for runners.", "description": "Displays distance, time, steps, cadence, pace and more for runners.",
"icon": "app.png", "icon": "app.png",
"tags": "run,running,fitness,outdoors,gps", "tags": "run,running,fitness,outdoors,gps",

View File

@ -24,5 +24,4 @@ Write to correct settings file, fixing settings not working.
0.21: Rebase on "Run" app ver. 0.16. 0.21: Rebase on "Run" app ver. 0.16.
0.22: Ensure screen redraws after "Resume run?" menu (#3044) 0.22: Ensure screen redraws after "Resume run?" menu (#3044)
0.23: Minor code improvements 0.23: Minor code improvements
0.24: Add indicators for lock,gps and pulse to karvonen screen 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

View File

@ -1,7 +1,7 @@
{ {
"id": "runplus", "id": "runplus",
"name": "Run+", "name": "Run+",
"version": "0.25", "version": "0.24",
"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.", "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", "icon": "app.png",
"tags": "run,running,fitness,outdoors,gps,karvonen,karvonnen", "tags": "run,running,fitness,outdoors,gps,karvonen,karvonnen",

View File

@ -102,7 +102,6 @@ var stats = {};
const DATA_FILE = "exstats.json"; const DATA_FILE = "exstats.json";
// Load the state from a saved file if there was one // Load the state from a saved file if there was one
state = Object.assign(state, require("Storage").readJSON(DATA_FILE,1)||{}); state = Object.assign(state, require("Storage").readJSON(DATA_FILE,1)||{});
state.startSteps = Bangle.getStepCount() - (state.lastSteps - state.startSteps);
// force step history to a uint8array // force step history to a uint8array
state.stepHistory = new Uint8Array(state.stepHistory); state.stepHistory = new Uint8Array(state.stepHistory);
// when we exit, write the current state // when we exit, write the current state