int system_store_battery(void)
How full the battery is from 0 to 100.
Definition system_store.c:142
bool system_store_bluetooth(void)
True when the phone link is up.
Definition system_store.c:144
bool system_store_next_alarm(time_t *out)
When the wearer's next enabled alarm fires.
Definition system_store.c:146
void system_store_deinit(void)
Stop tracking the battery + connection services.
Definition system_store.c:136
bool system_store_charging(void)
True while the watch is plugged in.
Definition system_store.c:143
void(*) BtVibePolicy(bool connected)
Called on a real bluetooth transition (a change, not the first reading), so the face can buzz however...
Definition system_store.h:26
void system_store_init(SystemConfig cfg, const SystemSeed *seed)
Start the store with its rules. Pass seed = NULL for normal use.
Definition system_store.c:103
void system_store_on_reconnect(void(*cb)(void))
Hand it the function to call when the phone app link comes back after a drop.
Definition system_store.c:98
void system_store_subscribe(void(*cb)(void))
Hand it the function to call when something changes (the screen redraw).
Definition system_store.c:93
The rules a face hands the store.
Definition system_store.h:32
bool live
True subscribes the services and false just keeps the fake data for screenshots.
Definition system_store.h:33
BtVibePolicy vibe
Buzz policy for a bluetooth change, or NULL for silent.
Definition system_store.h:34
Optional prefill, or pinned state when live = false.
Definition system_store.h:41
int battery
Battery level from 0 to 100.
Definition system_store.h:42
bool charging
True when plugged in.
Definition system_store.h:43
bool bluetooth
True when the phone link is up.
Definition system_store.h:44
time_t next_alarm
When the next alarm fires, or 0 for none.
Definition system_store.h:45