Active health store. It subscribes to the watch's health service itself and holds the readings, so a face just hands it the rules, optionally seeds it, then reads the numbers back. More...
#include <pebble.h>Go to the source code of this file.
Data Structures | |
| struct | HealthConfig |
| The rules a face hands the store. More... | |
| struct | HealthSeed |
| Optional prefill, or pinned readings when live = false. More... | |
Functions | |
| void | health_store_init (HealthConfig cfg, const HealthSeed *seed) |
| Start the store with its rules. Pass seed = NULL for normal use. | |
| void | health_store_subscribe (void(*cb)(void)) |
| Hand it the function to call when the numbers change (the screen redraw). | |
| uint8_t * | health_store_hr_history (void) |
| The last hour of heart rate readings, one per minute (a 60 slot buffer). The store fills it on each update. The little charts read it back out. | |
| const uint16_t * | health_store_step_hourly (void) |
| Today's steps split into per-hour buckets, one slot per hour from midnight (24 slots). The bar chart reads it back out. | |
| int | health_store_step_hours (void) |
| How many of the hourly step buckets hold a real value (0 to 24). Steps count 0 as a real reading (a quiet hour), so a chart needs the count rather than a no-data marker. | |
| int | health_store_hr (void) |
| The heart rate in beats per minute, or -1 if we have not got one yet. | |
| int | health_store_steps (void) |
| The steps taken so far today, or -1 if we have not got one yet. | |
| int | health_store_calories (void) |
| The active calories so far today, or -1 if we have not got one yet. | |
| int | health_store_sleep_min (void) |
| The minutes of sleep, or -1 if we have not got one yet. | |
| int | health_store_active_min (void) |
| The active minutes so far today, or -1 if we have not got one yet. | |
| int | health_store_distance_m (void) |
| Today's walked distance in meters, or 0 if we cannot read it. | |
Active health store. It subscribes to the watch's health service itself and holds the readings, so a face just hands it the rules, optionally seeds it, then reads the numbers back.