Update BLE controller in Infineat watchface

This commit is contained in:
Diego Miguel 2022-03-02 00:34:39 +01:00
parent 8f54332e5d
commit be16ef0d56
3 changed files with 4 additions and 1 deletions

View File

@ -422,6 +422,7 @@ list(APPEND SOURCE_FILES
## Watch faces ## Watch faces
displayapp/icons/bg_clock.c displayapp/icons/bg_clock.c
displayapp/icons/logo_pine.c
displayapp/screens/WatchFaceAnalog.cpp displayapp/screens/WatchFaceAnalog.cpp
displayapp/screens/WatchFaceDigital.cpp displayapp/screens/WatchFaceDigital.cpp
displayapp/screens/WatchFaceInfineat.cpp displayapp/screens/WatchFaceInfineat.cpp

View File

@ -428,8 +428,9 @@ void WatchFaceInfineat::Refresh() {
} }
bleState = bleController.IsConnected(); bleState = bleController.IsConnected();
bleRadioEnabled = bleController.IsRadioEnabled();
if (bleState.IsUpdated()) { if (bleState.IsUpdated()) {
lv_label_set_text(bleIcon, BleIcon::GetIcon(bleState.Get())); lv_label_set_text(bleIcon, BleIcon::GetIcon(bleRadioEnabled.Get(), bleState.Get()));
lv_obj_align(bleIcon, labelDate, LV_ALIGN_OUT_BOTTOM_MID, 0, 3); lv_obj_align(bleIcon, labelDate, LV_ALIGN_OUT_BOTTOM_MID, 0, 3);
} }

View File

@ -48,6 +48,7 @@ namespace Pinetime {
DirtyValue<uint8_t> batteryPercentRemaining {}; DirtyValue<uint8_t> batteryPercentRemaining {};
DirtyValue<bool> powerPresent {}; DirtyValue<bool> powerPresent {};
DirtyValue<bool> bleState {}; DirtyValue<bool> bleState {};
DirtyValue<bool> bleRadioEnabled {};
DirtyValue<std::chrono::time_point<std::chrono::system_clock, std::chrono::nanoseconds>> currentDateTime {}; DirtyValue<std::chrono::time_point<std::chrono::system_clock, std::chrono::nanoseconds>> currentDateTime {};
DirtyValue<bool> motionSensorOk {}; DirtyValue<bool> motionSensorOk {};
DirtyValue<uint32_t> stepCount {}; DirtyValue<uint32_t> stepCount {};