diff --git a/apps/pace/ChangeLog b/apps/pace/ChangeLog index 687ac8bc0..66e01974e 100644 --- a/apps/pace/ChangeLog +++ b/apps/pace/ChangeLog @@ -1,3 +1,4 @@ 0.01: New app! 0.02: Show elapsed time on pause screen 0.03: Avoid initial GPS skew and allow reset of time/splits +0.04: Bump exstats module - show active time, not elapsed diff --git a/apps/pace/metadata.json b/apps/pace/metadata.json index 6d098a66e..4a31a6802 100644 --- a/apps/pace/metadata.json +++ b/apps/pace/metadata.json @@ -1,7 +1,7 @@ { "id": "pace", "name": "Pace", - "version": "0.03", + "version": "0.04", "description": "Show pace and time running splits", "icon": "app.png", "tags": "run,running,fitness,outdoors", diff --git a/apps/run/ChangeLog b/apps/run/ChangeLog index af75a9aee..568132798 100644 --- a/apps/run/ChangeLog +++ b/apps/run/ChangeLog @@ -18,3 +18,4 @@ 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 +0.20: Bump exstats module - show active time, not elapsed diff --git a/apps/run/metadata.json b/apps/run/metadata.json index 126d8fcf0..4c2179c37 100644 --- a/apps/run/metadata.json +++ b/apps/run/metadata.json @@ -1,6 +1,6 @@ { "id": "run", "name": "Run", - "version": "0.19", + "version": "0.20", "description": "Displays distance, time, steps, cadence, pace and more for runners. The **Run+** app for Bangle.js 2 provides additional features.", "icon": "app.png", "tags": "run,running,fitness,outdoors,gps", diff --git a/apps/runplus/ChangeLog b/apps/runplus/ChangeLog index 645f6cf76..2bd62b83c 100644 --- a/apps/runplus/ChangeLog +++ b/apps/runplus/ChangeLog @@ -28,3 +28,5 @@ Write to correct settings file, fixing settings not working. 0.25: Fix step count bug when runs are resumed after a long time 0.26: Add ability to zoom in on a single stat by tapping it 0.27: Allow setting to alway resume an activity +0.28: Change the "time" stat to show active time (duration) rather than + elapsed time (fix #3802) diff --git a/apps/runplus/metadata.json b/apps/runplus/metadata.json index fe59050db..dab94890b 100644 --- a/apps/runplus/metadata.json +++ b/apps/runplus/metadata.json @@ -1,7 +1,7 @@ { "id": "runplus", "name": "Run+", - "version": "0.27", + "version": "0.28", "description": "Displays distance, time, steps, cadence, pace and more for runners. Based on the Run app, but extended with additional screens for heart rate interval training and individual stat focus.", "icon": "app.png", "tags": "run,running,fitness,outdoors,gps,karvonen,karvonnen", diff --git a/modules/exstats.js b/modules/exstats.js index 4229ae990..f5b9c6fff 100644 --- a/modules/exstats.js +++ b/modules/exstats.js @@ -229,7 +229,7 @@ exports.getStats = function(statIDs, options) { if (statIDs.includes("time")) { stats["time"]={ title : "Time", - getValue : function() { return Date.now()-state.startTime; }, + getValue : function() { return state.duration; }, getString : function() { return formatTime(this.getValue()) }, }; } @@ -317,12 +317,12 @@ exports.getStats = function(statIDs, options) { if (needHRM) Bangle.setHRMPower(true,"exs"); if (needBaro) Bangle.setBarometerPower(true,"exs"); setInterval(function() { // run once a second.... - if (stats["time"]) stats["time"].emit("changed",stats["time"]); if (!state.active) return; // called once a second var now = Date.now(); state.duration += now - state.lastTime; // in ms state.lastTime = now; + if (stats["time"]) stats["time"].emit("changed",stats["time"]); // set cadence -> steps over last minute state.stepsPerMin = Math.round(60000 * E.sum(state.stepHistory) / Math.min(state.duration,60000)); if (stats["caden"]) stats["caden"].emit("changed",stats["caden"]); @@ -335,7 +335,7 @@ exports.getStats = function(statIDs, options) { state.BPM = 0; if (stats["bpm"]) stats["bpm"].emit("changed",stats["bpm"]); } - if (state.notify.time.increment > 0 && state.notify.time.next <= now) { + if (state.notify.time.increment > 0 && state.notify.time.next <= state.duration) { state.notify.time.next = state.notify.time.next + state.notify.time.increment; stats["time"].emit("notify",stats["time"]); }