Merge pull request #1502 from copoer/master

Fixed stepHistory
pull/1506/head
Gordon Williams 2022-02-23 17:07:26 +00:00 committed by GitHub
commit f7ab9adb56
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 0 deletions

View File

@ -119,6 +119,7 @@ Bangle.on("GPS", function(fix) {
Bangle.on("step", function(steps) {
if (!state.active) return;
if (stats["step"]) stats["step"].emit("changed",stats["step"]);
state.stepHistory[0] += steps-state.lastStepCount;
state.lastStepCount = steps;
});
Bangle.on("HRM", function(h) {