|
| #define | ACTIVITY_SETTINGS_UPDATE_MIN 15 |
| | Interval between saves of today's metrics to the settings file, in minutes.
|
| |
| #define | ACTIVITY_SESSION_UPDATE_MIN 15 |
| | Interval between recomputations of the activity sessions, in minutes.
|
| |
| #define | ACTIVITY_SCALAR_MAX UINT32_MAX |
| | Maximum value of ActivityScalarStore.
|
| |
| #define | ACTIVITY_STEP_AVERAGES_MINUTES (PBL_MIN_PER_DAY / ACTIVITY_NUM_METRIC_AVERAGES) |
| | Minutes covered by each step average.
|
| |
| #define | ACTIVITY_STEP_AVERAGES_PER_KEY 4 |
| | Step averages stored per settings key.
|
| |
| #define | ACTIVITY_STEP_AVERAGES_KEYS_PER_DAY (ACTIVITY_NUM_METRIC_AVERAGES / ACTIVITY_STEP_AVERAGES_PER_KEY) |
| | Settings keys holding one day of step averages.
|
| |
| #define | ACTIVITY_ACTIVE_MINUTE_MIN_STEPS 40 |
| | Minimum steps in a minute for it to be an active minute.
|
| |
| #define | ACTIVITY_LAST_SLEEP_MINUTE_OF_DAY (21 * PBL_MIN_PER_HOUR) |
| | Minute of the day (9pm) after which an ending sleep session counts as the next day's.
|
| |
| #define | ACTIVITY_DEFAULT_HR_ON_TIME_SEC (60) |
| | Default length of a background heart rate measurement window, in seconds.
|
| |
| #define | ACTIVITY_HR_EARLY_ABORT_SEC (40) |
| | Time into a heart rate window after which it is aborted without any valid reading, in seconds.
|
| |
| #define | ACTIVITY_MIN_NUM_GOOD_SAMPLES_SHORT_CIRCUIT (10) |
| | Good quality heart rate samples after which the window ends early.
|
| |
| #define | ACTIVITY_MIN_NUM_EXCELLENT_SAMPLES_SHORT_CIRCUIT (5) |
| | Excellent quality heart rate samples after which the window ends early.
|
| |
| #define | ACTIVITY_MIN_NUM_GOOD_SPO2_SAMPLES_SHORT_CIRCUIT (2) |
| | Good quality SpO2 samples after which the window ends early.
|
| |
| #define | ACTIVITY_DEFAULT_SPO2_ON_TIME_SEC (90) |
| | Maximum length of a background SpO2 measurement window, in seconds.
|
| |
| #define | ACTIVITY_SPO2_EARLY_ABORT_SEC (45) |
| | Time into a SpO2 window after which it is aborted if no sample was accepted, in seconds.
|
| |
| #define | ACTIVITY_SPO2_ACTIVITY_INTERVAL_SEC (5 * PBL_SEC_PER_MIN) |
| | Interval between SpO2 attempts during a detected activity, in seconds.
|
| |
| #define | ACTIVITY_SPO2_ACTIVITY_ATTEMPT_SEC (35) |
| | Duration of a SpO2 attempt during a detected activity, in seconds.
|
| |
| #define | ACTIVITY_SPO2_ACTIVITY_BACKOFF_SEC (PBL_SEC_PER_MIN) |
| | Heart rate time after a failed SpO2 attempt before retrying, in seconds.
|
| |
| #define | ACTIVITY_MIN_NUM_SAMPLES_FOR_HR_ZONE (5) |
| | Minimum heart rate samples in a minute to report a zone above zone 0.
|
| |
| #define | ACTIVITY_HRM_SUBSCRIPTION_ON_PERIOD_SEC (1) |
| | Heart rate subscription interval while sampling, in seconds.
|
| |
| #define | ACTIVITY_HRM_SUBSCRIPTION_OFF_PERIOD_SEC (PBL_SEC_PER_DAY) |
| | Heart rate subscription interval while idle, in seconds.
|
| |
| #define | ACTIVITY_HRM_OFFWRIST_STALE_SEC (15 * PBL_SEC_PER_MIN) |
| | Age after which the cached off-wrist status is stale, in seconds.
|
| |
| #define | ACTIVITY_MAX_HR_SAMPLES (3 * PBL_SEC_PER_MIN) |
| | Maximum number of heart rate samples kept to compute the median.
|
| |
| #define | ACTIVITY_DAG_PER_KG 100 |
| | Decagrams per kilogram.
|
| |
| #define | ACTIVITY_SETTINGS_FILE_NAME "activity" |
| | Name of the activity settings file.
|
| |
| #define | ACTIVITY_SETTINGS_FILE_LEN 0x4000 |
| | Size of the activity settings file, in bytes.
|
| |
| #define | ACTIVITY_SETTINGS_CURRENT_VERSION 3 |
| | Version of the activity settings file.
|
| |
| #define | ACTIVITY_SLEEP_SESSION_LOGGING_VERSION 1 |
| | Version of the legacy sleep session data logging records (before FW 3.11).
|
| |
| #define | ACTIVITY_SESSION_LOGGING_VERSION 3 |
| | Version of the activity session data logging records.
|
| |
|
| ActivityState * | activity_private_state (void) |
| | Get the activity state.
|
| |
| bool | activity_is_hrm_present (void) |
| | Check whether a heart rate monitor is present.
|
| |
| SettingsFile * | activity_private_settings_open (void) |
| | Open the activity settings file.
|
| |
| void | activity_private_settings_close (SettingsFile *file) |
| | Close the activity settings file.
|
| |
| bool | activity_test_reset (bool reset_settings, bool tracking_on, const ActivitySettingsValueHistory *sleep_history, const ActivitySettingsValueHistory *step_history) |
| | Reinitialize the activity service (test apps).
|
| |
| void | activity_sessions_prv_init (SettingsFile *file, time_t utc_now) |
| | Load the stored activity sessions.
|
| |
| time_t | activity_sessions_prv_get_sleep_window_start_utc (time_t now_utc) |
| | Get the start of the sleep day containing a time.
|
| |
| void | activity_sessions_prv_get_sleep_bounds_utc (time_t now_utc, time_t *enter_utc, time_t *exit_utc) |
| | Get the sleep bounds of the current day.
|
| |
| void | activity_sessions_prv_remove_out_of_range_activity_sessions (time_t utc_sec, bool remove_ongoing) |
| | Remove sessions older than today or in the future.
|
| |
| bool | activity_sessions_prv_is_sleep_activity (ActivitySessionType activity_type) |
| | Check whether a session type is sleep related.
|
| |
| bool | activity_sessions_is_session_type_ongoing (ActivitySessionType activity_type) |
| | Check whether a session of a type is ongoing.
|
| |
| void | activity_sessions_prv_add_activity_session (ActivitySession *session) |
| | Register a new session, or update an existing one.
|
| |
| void | activity_sessions_prv_delete_activity_session (ActivitySession *session) |
| | Delete a session.
|
| |
| void | activity_sessions_prv_minute_handler (time_t utc_sec) |
| | Run the once a minute session maintenance.
|
| |
| void | activity_sessions_prv_send_activity_session_to_data_logging (ActivitySession *session) |
| | Send a session to data logging.
|
| |
| void | activity_metrics_prv_init (SettingsFile *file, time_t utc_now) |
| | Initialize all metrics from the settings file.
|
| |
| void | activity_metrics_prv_get_metric_info (ActivityMetric metric, ActivityMetricInfo *info) |
| | Get the storage information of a metric.
|
| |
| void | activity_metrics_prv_minute_handler (time_t utc_sec) |
| | Run the once a minute metrics maintenance.
|
| |
| uint32_t | activity_metrics_prv_get_distance_mm (void) |
| | Get the distance covered today.
|
| |
| uint32_t | activity_metrics_prv_get_resting_calories (void) |
| | Get the resting calories burned today.
|
| |
| uint32_t | activity_metrics_prv_get_active_calories (void) |
| | Get the active calories burned today.
|
| |
| void | activity_metrics_prv_get_median_hr_bpm (int32_t *median_out, int32_t *heart_rate_total_weight_x100_out) |
| | Get the median heart rate since the last reset.
|
| |
| HRZone | activity_metrics_prv_get_hr_zone (void) |
| | Get the heart rate zone since the last reset.
|
| |
| void | activity_metrics_prv_reset_hr_stats (void) |
| | Reset the median heart rate and the heart rate zone.
|
| |
| void | activity_metrics_prv_get_spo2_sample (uint8_t *percent_out, uint8_t *quality_out) |
| | Consume the pending SpO2 reading for the current minute record.
|
| |
| void | activity_metrics_prv_add_median_hr_sample (PebbleHRMEvent *hrm_event, time_t now_utc, time_t now_uptime) |
| | Add a heart rate sample to the median.
|
| |
| void | activity_metrics_prv_set_hrm_worn_status (time_t now_utc, bool is_offwrist) |
| | Record the worn status reported by the HRM.
|
| |
| bool | activity_metrics_prv_is_hrm_offwrist (time_t now_utc) |
| | Check whether the HRM recently reported the watch off-wrist.
|
| |
| uint32_t | activity_metrics_prv_get_steps (void) |
| | Get the steps taken today.
|
| |
| ActivityScalarStore | activity_metrics_prv_steps_per_minute (void) |
| | Get the steps taken in the past minute.
|
| |
| void | activity_metrics_prv_set_metric (ActivityMetric metric, enum pbl_weekday day, int32_t value) |
| | Set a metric's value, on behalf of the phone (health database).
|
| |
| void | activity_metrics_set_metric_exact (ActivityMetric metric, int32_t value) |
| | Force today's value of a metric, possibly decreasing it (QEMU and test injection).
|
| |