Loading...
Searching...
No Matches
location_store.h File Reference

Active location store. It owns the appmessage coords channel (the same phone geolocation the weather rides on), so a face hands it the rules, optionally seeds it, then reads lat/lon back. There's no poll timer. Coords arrive alongside weather. More...

#include <pebble.h>

Go to the source code of this file.

Data Structures

struct  LocationConfig
 The rules a face hands the store. More...
struct  LocationSeed
 Optional prefill, or pinned coords when live = false. On a live store a seed takes the place of restoring the last real fix, and shows until the phone sends coordinates. A seed is never saved, so the fix on flash stays as it was for the next launch without one. More...

Functions

void location_store_init (LocationConfig cfg, const LocationSeed *seed)
 Start the store with its rules. Pass seed = NULL for normal use.
void location_store_subscribe (void(*cb)(void))
 Hand it the function to call when the coordinates change (the screen redraw).
const char * location_store_lat (void)
 The latitude string, or empty if we have not got one yet.
const char * location_store_lon (void)
 The longitude string, or empty if we have not got one yet.

Detailed Description

Active location store. It owns the appmessage coords channel (the same phone geolocation the weather rides on), so a face hands it the rules, optionally seeds it, then reads lat/lon back. There's no poll timer. Coords arrive alongside weather.