Skip to content

Commit

Permalink
mylocation: drop dependency on waypoint
Browse files Browse the repository at this point in the history
  • Loading branch information
nxdefiant committed Jun 26, 2023
1 parent 73042fa commit 712d316
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 4 deletions.
2 changes: 1 addition & 1 deletion apps/mylocation/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ next to it - and you can choose your location on a map.

**On Bangle.js** go to `Settings -> Apps -> My Location`

* Select one of the preset Cities, setup through the GPS, waypoints or use the webinterface from the AppLoader
* Select one of the preset Cities, setup through the GPS, waypoints (if installed) or use the webinterface from the AppLoader
* Other Apps can read this information to do calculations based on location
* When the City shows ??? it means the location has been set through the GPS

Expand Down
1 change: 0 additions & 1 deletion apps/mylocation/metadata.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
"tags": "tool,utility",
"supports": ["BANGLEJS", "BANGLEJS2"],
"interface": "interface.html",
"dependencies" : { "waypoints":"type" },
"storage": [
{"name":"mylocation.settings.js","url":"settings.js"}
],
Expand Down
9 changes: 7 additions & 2 deletions apps/mylocation/settings.js
Original file line number Diff line number Diff line change
Expand Up @@ -93,9 +93,14 @@ function showMainMenu() {
}
}
},
/*LANG*/'Set From GPS': ()=>{ setFromGPS(); },
/*LANG*/'Set From Waypoint': ()=>{ setFromWaypoint(); },
/*LANG*/'Set From GPS': ()=>{ setFromGPS(); }
};
try {
require("waypoints");
mainmenu[/*LANG*/'Set From Waypoint'] = ()=>{ setFromWaypoint(); };
} catch(err) {
// waypoints not installed, thats ok
}
return E.showMenu(mainmenu);
}

Expand Down

0 comments on commit 712d316

Please sign in to comment.