diff --git a/src/W800_SDK_v1.00.10/app/gfx/watch_face.c b/src/W800_SDK_v1.00.10/app/gfx/watch_face.c index 2efebdd..3fb71d6 100644 --- a/src/W800_SDK_v1.00.10/app/gfx/watch_face.c +++ b/src/W800_SDK_v1.00.10/app/gfx/watch_face.c @@ -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; +} diff --git a/src/W800_SDK_v1.00.10/app/gfx/watch_face.h b/src/W800_SDK_v1.00.10/app/gfx/watch_face.h index c6fae7b..336b09b 100644 --- a/src/W800_SDK_v1.00.10/app/gfx/watch_face.h +++ b/src/W800_SDK_v1.00.10/app/gfx/watch_face.h @@ -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 *