diff options
| author | James A. Jerkins <evergreen@jamesjerkinscomputer.com> | 2021-12-24 02:30:14 (GMT) |
|---|---|---|
| committer | James A. Jerkins <evergreen@jamesjerkinscomputer.com> | 2021-12-24 02:30:14 (GMT) |
| commit | 319030d9e16e833cf8bff569a9ecfa452165ea27 (patch) | |
| tree | ae2890204710ac41fd7f637ac1c367c09f671009 /src/displayapp/screens/PineTimeStyle.cpp | |
| parent | 3b0b48020d96353fc6cd114aa80fc2fec98363a3 (diff) | |
Add airplane mode feature
Implements 'Airplane mode' feature to disable and enable bluetooth/ble
Adds airplaneMode as a non-persisted setting
Adds a setting menu for switching airplane mode on and off
Displays an airplane symbol on the Digital watch face and the
PineTimeStyle watch face when airplane mode is enabled
Always enables bluetooth/ble on boot (disable airplane mode)
Alphabetizes the settings menu options
Style cleanups
Closes #632
Diffstat (limited to 'src/displayapp/screens/PineTimeStyle.cpp')
| -rw-r--r-- | src/displayapp/screens/PineTimeStyle.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/displayapp/screens/PineTimeStyle.cpp b/src/displayapp/screens/PineTimeStyle.cpp index d436869..e7b1f39 100644 --- a/src/displayapp/screens/PineTimeStyle.cpp +++ b/src/displayapp/screens/PineTimeStyle.cpp @@ -208,10 +208,10 @@ void PineTimeStyle::SetBatteryIcon() { } void PineTimeStyle::AlignIcons() { - if (notificationState.Get() && bleState.Get()) { + if (notificationState.Get() && bleState.Get() != Pinetime::Controllers::Ble::ConnectStates::Disconnected) { lv_obj_align(bleIcon, sidebar, LV_ALIGN_IN_TOP_MID, 8, 25); lv_obj_align(notificationIcon, sidebar, LV_ALIGN_IN_TOP_MID, -8, 25); - } else if (notificationState.Get() && !bleState.Get()) { + } else if (notificationState.Get() && bleState.Get() == Pinetime::Controllers::Ble::ConnectStates::Disconnected) { lv_obj_align(notificationIcon, sidebar, LV_ALIGN_IN_TOP_MID, 0, 25); } else { lv_obj_align(bleIcon, sidebar, LV_ALIGN_IN_TOP_MID, 0, 25); @@ -234,7 +234,7 @@ void PineTimeStyle::Refresh() { } } - bleState = bleController.IsConnected(); + bleState = bleController.GetConnectState(); if (bleState.IsUpdated()) { lv_label_set_text(bleIcon, BleIcon::GetIcon(bleState.Get())); AlignIcons(); |
