diff --git a/apps/run/ChangeLog b/apps/run/ChangeLog index 032ebdc1a..401a68de9 100644 --- a/apps/run/ChangeLog +++ b/apps/run/ChangeLog @@ -8,3 +8,4 @@ 0.07: Fix crash if an odd number of active boxes are configured (fix #1473) 0.08: Added support for notifications from exstats. Support all stats from exstats 0.09: Fix broken start/stop if recording not enabled (fix #1561) +0.10: Don't allow the same setting to be chosen for 2 boxes (fix #1578) diff --git a/apps/run/metadata.json b/apps/run/metadata.json index 01a85ed05..51239d297 100644 --- a/apps/run/metadata.json +++ b/apps/run/metadata.json @@ -1,6 +1,6 @@ { "id": "run", "name": "Run", - "version":"0.09", + "version":"0.10", "description": "Displays distance, time, steps, cadence, pace and more for runners.", "icon": "app.png", "tags": "run,running,fitness,outdoors,gps", diff --git a/apps/run/settings.js b/apps/run/settings.js index 29a2f43cc..949f7a235 100644 --- a/apps/run/settings.js +++ b/apps/run/settings.js @@ -42,6 +42,11 @@ value: Math.max(statsIDs.indexOf(settings[boxID]),0), format: v => statsList[v].name, onchange: v => { + for (var i=1;i<=6;i++) + if (settings["B"+i]==statsIDs[v]) { + settings["B"+i]=""; + boxMenu["Box "+i].value=0; + } settings[boxID] = statsIDs[v]; saveSettings(); }, @@ -60,7 +65,7 @@ '': { 'title': 'Run' }, '< Back': back, }; - if (WIDGETS["recorder"]) + if (global.WIDGETS&&WIDGETS["recorder"]) menu[/*LANG*/"Record Run"] = { value : !!settings.record, format : v => v?/*LANG*/"Yes":/*LANG*/"No", @@ -87,7 +92,7 @@ notificationsMenu[/*LANG*/"Dist Pattern"] = { value: Math.max(0,vibPatterns.findIndex((p) => JSON.stringify(p) === JSON.stringify(settings.notify.dist.notifications))), min: 0, max: vibPatterns.length, - format: v => vibPatterns[v]||"Off", + format: v => vibPatterns[v]||/*LANG*/"Off", onchange: v => { settings.notify.dist.notifications = vibTimes[v]; sampleBuzz(vibTimes[v]); @@ -97,7 +102,7 @@ notificationsMenu[/*LANG*/"Step Pattern"] = { value: Math.max(0,vibPatterns.findIndex((p) => JSON.stringify(p) === JSON.stringify(settings.notify.step.notifications))), min: 0, max: vibPatterns.length, - format: v => vibPatterns[v]||"Off", + format: v => vibPatterns[v]||/*LANG*/"Off", onchange: v => { settings.notify.step.notifications = vibTimes[v]; sampleBuzz(vibTimes[v]); @@ -107,7 +112,7 @@ notificationsMenu[/*LANG*/"Time Pattern"] = { value: Math.max(0,vibPatterns.findIndex((p) => JSON.stringify(p) === JSON.stringify(settings.notify.time.notifications))), min: 0, max: vibPatterns.length, - format: v => vibPatterns[v]||"Off", + format: v => vibPatterns[v]||/*LANG*/"Off", onchange: v => { settings.notify.time.notifications = vibTimes[v]; sampleBuzz(vibTimes[v]);