PebbleOS
Loading...
Searching...
No Matches
Functions
workout_service.h File Reference
#include "activity.h"
#include "hr_util.h"
#include <kernel/events.h>
#include <stdbool.h>

Functions

void workout_service_init (void)
 Initialize the workout service.
 
void workout_service_frontend_opened (void)
 Signal that the workout app was opened.
 
void workout_service_frontend_closed (void)
 Signal that the workout app was closed.
 
void workout_service_health_event_handler (PebbleHealthEvent *event)
 Handle a health event (movement and heart rate updates).
 
void workout_service_activity_event_handler (PebbleActivityEvent *event)
 Handle an activity event.
 
void workout_service_workout_event_handler (PebbleWorkoutEvent *event)
 Handle a workout event.
 
bool workout_service_is_workout_ongoing (void)
 Check whether a workout is ongoing.
 
void workout_service_set_hrm_paused (bool paused)
 Pause or resume the workout's heart rate sampling.
 
bool workout_service_is_workout_type_supported (ActivitySessionType type)
 Check whether a session type can be a workout.
 
bool workout_service_start_workout (ActivitySessionType type)
 Start a workout.
 
bool workout_service_pause_workout (bool should_be_paused)
 Pause or resume the current workout.
 
bool workout_service_stop_workout (void)
 Stop the current workout.
 
bool workout_service_takeover_activity_session (ActivitySession *session)
 Turn a detected activity session into a workout.
 
bool workout_service_is_paused (void)
 Check whether the current workout is paused.
 
bool workout_service_get_current_workout_type (ActivitySessionType *type_out)
 Get the type of the current workout.
 
bool workout_service_get_current_workout_info (int32_t *steps_out, int32_t *duration_s_out, int32_t *distance_m_out, int32_t *current_bpm_out, HRZone *current_hr_zone_out)
 Get the current workout metrics.