commit
2db2bff31f
|
|
@ -29,5 +29,7 @@ Write to correct settings file, fixing settings not working.
|
||||||
0.26: Add ability to zoom in on a single stat by tapping it
|
0.26: Add ability to zoom in on a single stat by tapping it
|
||||||
0.27: Allow setting to alway resume an activity
|
0.27: Allow setting to alway resume an activity
|
||||||
0.28: Add vibration feedback on start/stop
|
0.28: Add vibration feedback on start/stop
|
||||||
0.29: Change the "time" stat to show active time (duration) rather than
|
0.29: Optimise UI: only redraw if we showed a recorder menu and correctly
|
||||||
|
track screen state
|
||||||
|
0.30: Change the "time" stat to show active time (duration) rather than
|
||||||
elapsed time (fix #3802)
|
elapsed time (fix #3802)
|
||||||
|
|
|
||||||
|
|
@ -90,14 +90,18 @@ function onStartStop() {
|
||||||
// an overwrite before we start tracking exstats
|
// an overwrite before we start tracking exstats
|
||||||
if (settings.record && WIDGETS["recorder"]) {
|
if (settings.record && WIDGETS["recorder"]) {
|
||||||
if (running) {
|
if (running) {
|
||||||
screen = "menu";
|
|
||||||
promise = promise.
|
promise = promise.
|
||||||
then(() => WIDGETS["recorder"].setRecording(true, { force : shouldResume?"append":undefined })).
|
|
||||||
then(() => {
|
then(() => {
|
||||||
|
screen = "menu";
|
||||||
|
return WIDGETS["recorder"].setRecording(true, { force : shouldResume?"append":undefined });
|
||||||
|
}).then(() => {
|
||||||
screen = "main";
|
screen = "main";
|
||||||
layout.setUI(); // grab our input handling again
|
if(!shouldResume){
|
||||||
layout.forgetLazyState();
|
// setRecording might have rendered - need to grab UI
|
||||||
layout.render();
|
layout.setUI(); // grab our input handling again
|
||||||
|
layout.forgetLazyState();
|
||||||
|
layout.render();
|
||||||
|
}
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
promise = promise.then(
|
promise = promise.then(
|
||||||
|
|
@ -146,7 +150,7 @@ function zoom(statID) {
|
||||||
.clearRect(R)
|
.clearRect(R)
|
||||||
.setFontAlign(0, 0);
|
.setFontAlign(0, 0);
|
||||||
|
|
||||||
layout.render(layout.bottom);
|
tick();
|
||||||
|
|
||||||
const value = exs.state.active ? stat.getString() : "____";
|
const value = exs.state.active ? stat.getString() : "____";
|
||||||
|
|
||||||
|
|
@ -220,6 +224,20 @@ Bangle.on("GPS", function(fix) {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
const tick = () => {
|
||||||
|
layout.clock.label = locale.time(new Date(),1);
|
||||||
|
switch (screen) {
|
||||||
|
case "main":
|
||||||
|
layout.render();
|
||||||
|
break;
|
||||||
|
case "zoom":
|
||||||
|
layout.render(layout.bottom);
|
||||||
|
break;
|
||||||
|
case "menu":
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
function setScreen(to) {
|
function setScreen(to) {
|
||||||
if (screen === "karvonen") {
|
if (screen === "karvonen") {
|
||||||
require("runplus_karvonen").stop();
|
require("runplus_karvonen").stop();
|
||||||
|
|
@ -238,12 +256,8 @@ function setScreen(to) {
|
||||||
layout.render();
|
layout.render();
|
||||||
layout.lazy = true;
|
layout.lazy = true;
|
||||||
// We always call ourselves once a second to update
|
// We always call ourselves once a second to update
|
||||||
if (!runInterval){
|
if (!runInterval)
|
||||||
runInterval = setInterval(function() {
|
runInterval = setInterval(tick, 1000);
|
||||||
layout.clock.label = locale.time(new Date(),1);
|
|
||||||
if (screen !== "menu") layout.render();
|
|
||||||
}, 1000);
|
|
||||||
}
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case "karvonen":
|
case "karvonen":
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
{
|
{
|
||||||
"id": "runplus",
|
"id": "runplus",
|
||||||
"name": "Run+",
|
"name": "Run+",
|
||||||
"version": "0.29",
|
"version": "0.30",
|
||||||
"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.",
|
"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",
|
"icon": "app.png",
|
||||||
"tags": "run,running,fitness,outdoors,gps,karvonen,karvonnen",
|
"tags": "run,running,fitness,outdoors,gps,karvonen,karvonnen",
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue