Pebble App Framework
v4.6.0
How It Works
CLI
Device API
Phone API
C Coverage
TS Coverage
GitHub
Theme
Pebble App Framework: Device API
Toggle main menu visibility
Loading...
Searching...
No Matches
location_store.h
Go to the documentation of this file.
1
9
#pragma once
10
#include <pebble.h>
11
16
20
typedef
struct
21
{
22
bool
live
;
23
uint32_t
persist_key
;
24
}
LocationConfig
;
25
31
typedef
struct
32
{
33
const
char
*
lat
;
34
const
char
*
lon
;
35
}
LocationSeed
;
36
43
void
location_store_init
(
LocationConfig
cfg,
const
LocationSeed
*seed);
44
46
void
location_store_subscribe
(
void
(*cb)(
void
));
47
49
const
char
*
location_store_lat
(
void
);
50
52
const
char
*
location_store_lon
(
void
);
53
location_store_init
void location_store_init(LocationConfig cfg, const LocationSeed *seed)
Start the store with its rules. Pass seed = NULL for normal use.
Definition
location_store.c:108
location_store_subscribe
void location_store_subscribe(void(*cb)(void))
Hand it the function to call when the coordinates change (the screen redraw).
Definition
location_store.c:103
location_store_lon
const char * location_store_lon(void)
The longitude string, or empty if we have not got one yet.
Definition
location_store.c:144
location_store_lat
const char * location_store_lat(void)
The latitude string, or empty if we have not got one yet.
Definition
location_store.c:143
LocationConfig
The rules a face hands the store.
Definition
location_store.h:21
LocationConfig::persist_key
uint32_t persist_key
Slot for the last good fix so the face owns the key instead of the store.
Definition
location_store.h:23
LocationConfig::live
bool live
True subscribes the coordinates channel and false just keeps the fake data for screenshots.
Definition
location_store.h:22
LocationSeed
Optional prefill, or pinned coords when live = false. On a live store a seed takes the place of resto...
Definition
location_store.h:32
LocationSeed::lon
const char * lon
Longitude string.
Definition
location_store.h:34
LocationSeed::lat
const char * lat
Latitude string.
Definition
location_store.h:33
src
c
pebble
io
stores
location_store.h
Generated by
1.18.0