mirror of https://github.com/espruino/BangleApps
gpsmagcourse: settings changes
parent
fab9e85cc3
commit
78fd64bf3f
|
@ -42,7 +42,6 @@ On Bangle.js 2 a click on the widget does reset the built-in compass.
|
|||
- GPS on
|
||||
|
||||
## TODO:
|
||||
- Add Settings
|
||||
- Document settings with defaults
|
||||
- Check magnav dependency in settings
|
||||
- note magnav silently downgrade
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
{
|
||||
"id": "gpsmagcourse",
|
||||
"name": "GPS Compass heading switcher",
|
||||
"shortName":"GPS/Comp. course",
|
||||
"name": "GPS Compass course switcher",
|
||||
"shortName":"GPS/Compass course",
|
||||
"icon": "app.png",
|
||||
"version":"0.01",
|
||||
"description": "Replace GPS heading with compass heading when speed is slow or standing still to avoid the heading from jumping around randomly.",
|
||||
|
@ -11,7 +11,8 @@
|
|||
"readme": "README.md",
|
||||
"storage": [
|
||||
{"name":"gpsmagcourse.boot.js","url":"boot.js"},
|
||||
{"name":"gpsmagcourse.wid.js","url":"widget.js"}
|
||||
{"name":"gpsmagcourse.wid.js","url":"widget.js"},
|
||||
{"name":"gpsmagcourse.settings.js","url":"settings.js"}
|
||||
],
|
||||
"data": [{"name":"gpsmagcourse.json"}]
|
||||
}
|
||||
|
|
|
@ -27,9 +27,9 @@
|
|||
settings.tiltCompensation = false;
|
||||
}
|
||||
}
|
||||
const compassSrcOpts = ["off", "built-in"];
|
||||
const compassSrcOpts = [/*LANG*/"off", /*LANG*/"built-in"];
|
||||
if (magnavInstalled) {
|
||||
compassSrcOpts.push("magnav");
|
||||
compassSrcOpts.push(/*LANG*/"magnav");
|
||||
}
|
||||
|
||||
function writeSettings() {
|
||||
|
@ -37,11 +37,11 @@
|
|||
}
|
||||
|
||||
const menu = {
|
||||
"" : { "title" : /*LANG*/"GPS/Comp. course" },
|
||||
"" : { "title" : /*LANG*/"GPS/Com.course" },
|
||||
"< Back" : () => back(),
|
||||
/*LANG*/'Speed threshold': {
|
||||
value: settings.speed,
|
||||
min: 1, max: 20,
|
||||
min: 1, max: 20, step: 0.5,
|
||||
onchange: v => {
|
||||
settings.speed = v;
|
||||
writeSettings();
|
||||
|
@ -67,7 +67,7 @@
|
|||
/*LANG*/'Show Widget': {
|
||||
value: settings.showWidget,
|
||||
min: 0, max: 2,
|
||||
format: v => ["Never", "Active", "GPS on"][v],
|
||||
format: v => [/*LANG*/"Never", /*LANG*/"Active", /*LANG*/"GPS on"][v],
|
||||
onchange: v => {
|
||||
settings.showWidget = v;
|
||||
writeSettings();
|
||||
|
@ -88,4 +88,4 @@
|
|||
|
||||
// Show the menu
|
||||
E.showMenu(menu);
|
||||
})(load);
|
||||
})
|
||||
|
|
Loading…
Reference in New Issue