Added new functions to the watch face API such as watch_face_set_step_count_indicator or watch_face_is_in_use
This commit is contained in:
parent
61f7e21cb3
commit
6a9639700b
@ -469,7 +469,7 @@ void watch_face_set_bluetooth_indicator(WatchFace_t * const watchFace, Bluetooth
|
||||
_set_bluetooth_indicator(watchFace);
|
||||
}
|
||||
|
||||
void watch_face_set_step_count(WatchFace_t * const watchFace, uint32_t step_count)
|
||||
void watch_face_set_step_count_indicator(WatchFace_t * const watchFace, uint32_t step_count)
|
||||
{
|
||||
if(!watchFace)
|
||||
{
|
||||
@ -524,3 +524,14 @@ void watch_face_force_sync(WatchFace_t *const watchFace)
|
||||
|
||||
update_watch_hands_angles(watchFace, 0);
|
||||
}
|
||||
|
||||
bool watch_face_is_in_use(WatchFace_t * const watchFace)
|
||||
{
|
||||
if(!watchFace)
|
||||
{
|
||||
LV_LOG_ERROR("NULL pointer given !");
|
||||
return false;
|
||||
}
|
||||
|
||||
return watchFace->display != NULL;
|
||||
}
|
||||
|
@ -125,7 +125,13 @@ void watch_face_set_battery_indicator(WatchFace_t * const watchFace, uint8_t lev
|
||||
*/
|
||||
void watch_face_set_bluetooth_indicator(WatchFace_t * const watchFace, BluetoothState_e bluetoothState);
|
||||
|
||||
void watch_face_set_step_count(WatchFace_t * const watchFace, uint32_t step_count);
|
||||
/**
|
||||
* @brief Shows the current step count passed as parameter on the watch face.
|
||||
*
|
||||
* @param watchFace a pointer to the watch face context structure.
|
||||
* @param step_count the step count to show on the watch face.
|
||||
*/
|
||||
void watch_face_set_step_count_indicator(WatchFace_t * const watchFace, uint32_t step_count);
|
||||
|
||||
/**
|
||||
* @brief Forces the watch face to sync up with the RTC by calling the provided date_time_cb
|
||||
@ -134,6 +140,15 @@ void watch_face_set_step_count(WatchFace_t * const watchFace, uint32_t step_coun
|
||||
*/
|
||||
void watch_face_force_sync(WatchFace_t * const watchFace);
|
||||
|
||||
/**
|
||||
* @brief Returns true if the watch face screen is currently being used and displayed.
|
||||
*
|
||||
* @param watchFace a pointer to the watch face context structure.
|
||||
* @return true if the watch face screen is being used
|
||||
* @return false if the watch face screen is not being used/displayed currently
|
||||
*/
|
||||
bool watch_face_is_in_use(WatchFace_t * const watchFace);
|
||||
|
||||
/**
|
||||
* @brief Frees all resources used by the WatchFace object
|
||||
*
|
||||
|
Loading…
Reference in New Issue
Block a user