Skip to content
This repository has been archived by the owner on Jun 11, 2019. It is now read-only.
/ gps-monitor Public archive

๐Ÿ—บ Keep an eye on your GPS without blocking your app

License

Notifications You must be signed in to change notification settings

brnkl/gps-monitor

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

36 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

mangoh-gps-monitor ๐ŸŒŽ๐ŸŽฏ๐Ÿ—บ

Designed to work with MangOH boards. Tested on MangOH Red with Legato 17.11. May work with other boards as well.

Motivation ๐Ÿค”

Monitoring GPS location is cool, but blocking up other important calls is way less cool, and multi-threaded programming is arguably not that cool either. This app will keep an eye on your GPS location and allow other apps to request the location.

Setup ๐Ÿ› 

You are free to copy and runs this code however you would like, however we recommend using a Git submodule to stay up to date.

Cloning

Be sure you clone the submodules as well using git clone --recurse-submodules -j8 https://github.com/brnkl/mangoh-gps-monitor

Building

Only tested on the WP85, so we have not included a Make recipe for other WP series chips yet. Using another chip? Submit a pull request or issue!

  • WP85: make wp85

Bindings ๐Ÿ‘‹

To use this app, setup the required Legato IPC bindings.

myClientApp.adef

...
bindings:
{
  myClientApp.myComponent.brnkl_gps -> gpsMonitor.brnkl_gps
}
...

Component.cdef

...
requires:
{
  api:
  {
    brnkl_gps.api
  }
}
...

Note that you will need to include this interface in your system definition (.sdef file), or tell mkapp/mksys where to find it with the -i argument. An absolute path works too but this can be a pain depending on how your project is setup.

Example Usage โŒจ๏ธ

myApp.c

double lat, lon, horizAccuracy;
uint64_t lastReading;
le_result r = brnkl_gps_getLocation(&lat, &lon, &horizAccuracy, &lastReading);
LE_DEBUG("GPS reading %s", r == LE_OK ? "succeeded" : "failed");

That's it!

About

๐Ÿ—บ Keep an eye on your GPS without blocking your app

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published