The active system store: holds the battery + bluetooth state and subscribes to the battery and connection services itself. The alarm is read through on demand.
More...
|
| static void | set_battery (int level, bool charging) |
| | Save the battery reading and notify.
|
| static void | set_bluetooth (bool connected) |
| | Save the bluetooth state, buzzing the face's policy on a real transition, and notify.
|
| static void | on_battery (BatteryChargeState state) |
| | Battery service handler: unpack the reading and save it.
|
| static void | on_connection (bool connected) |
| | Connection service handler: save the phone link state.
|
|
void | system_store_subscribe (void(*cb)(void)) |
| | Hand it the function to call when something changes (the screen redraw).
|
|
void | system_store_on_reconnect (void(*cb)(void)) |
| | Hand it the function to call when the phone app link comes back after a drop.
|
| void | system_store_init (SystemConfig cfg, const SystemSeed *seed) |
| | Start the store with its rules. Pass seed = NULL for normal use.
|
|
void | system_store_deinit (void) |
| | Stop tracking the battery + connection services.
|
|
int | system_store_battery (void) |
| | How full the battery is from 0 to 100.
|
|
bool | system_store_charging (void) |
| | True while the watch is plugged in.
|
|
bool | system_store_bluetooth (void) |
| | True when the phone link is up.
|
| bool | system_store_next_alarm (time_t *out) |
| | When the wearer's next enabled alarm fires.
|
The active system store: holds the battery + bluetooth state and subscribes to the battery and connection services itself. The alarm is read through on demand.