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
This commit is contained in:
James A. Jerkins
2021-12-23 20:30:14 -06:00
parent 3b0b48020d
commit 319030d9e1
23 changed files with 307 additions and 99 deletions

View File

@@ -261,7 +261,7 @@ void SystemTask::Work() {
displayApp.PushMessage(Pinetime::Applications::Display::Messages::GoToRunning);
heartRateApp.PushMessage(Pinetime::Applications::HeartRateTask::Messages::WakeUp);
if (!bleController.IsConnected()) {
if (bleController.GetConnectState() == Controllers::Ble::ConnectStates::Disconnected) {
nimbleController.RestartFastAdv();
}
@@ -424,7 +424,9 @@ void SystemTask::Work() {
motorController.RunForDuration(35);
displayApp.PushMessage(Pinetime::Applications::Display::Messages::ShowPairingKey);
break;
case Messages::AirplaneModeToggle:
nimbleController.SwitchAirplaneMode(settingsController.GetAirplaneMode());
break;
default:
break;
}