runplus: vibrate on start/stop

master
Rob Pilling 2025-04-17 22:32:01 +01:00
parent cc051726cc
commit acce9d071a
4 changed files with 13 additions and 1 deletions

View File

@ -28,3 +28,4 @@ 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: Add vibration feedback on start/stop

View File

@ -27,6 +27,7 @@ let settings = Object.assign({
B6: "caden",
paceLength: 1000,
alwaysResume: false,
vibrate: false,
notify: {
dist: {
value: 0,
@ -59,6 +60,8 @@ function setStatus(running) {
// Called to start/stop running
function onStartStop() {
if (settings.vibrate) Bangle.buzz(250);
if (screen === "karvonen") {
// start/stop on the karvonen screen reverts us to the main screen
setScreen("main");

View File

@ -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",

View File

@ -18,6 +18,7 @@
B6: "caden",
paceLength: 1000, // TODO: Default to either 1km or 1mi based on locale
alwaysResume: false,
vibrate: false,
notify: {
dist: {
increment: 0,
@ -80,6 +81,13 @@
saveSettings();
},
};
menu[/*LANG*/"Start/stop vibrate"] = {
value : settings.vibrate,
onchange : v => {
settings.vibrate = v;
saveSettings();
},
};
var notificationsMenu = {
'< Back': function() { E.showMenu(menu) },
}