diff options
author | Jean-François Milants <jf@codingfield.com> | 2022-02-20 15:25:24 +0100 |
---|---|---|
committer | Jean-François Milants <jf@codingfield.com> | 2022-02-20 15:25:24 +0100 |
commit | 40cdb547727d99ff140a029ae30980001e4a68f6 (patch) | |
tree | 6cb5444d40f1d22c1ae14b7eca30cec59c0fa467 /src/displayapp/DisplayApp.cpp | |
parent | 69e4ab6be101e7993035b56db75f5c32eda713ac (diff) | |
parent | 319030d9e16e833cf8bff569a9ecfa452165ea27 (diff) |
Merge branch 'airplane-mode' of https://github.com/evergreen22/InfiniTime into evergreen22-airplane-mode
# Conflicts:
# src/CMakeLists.txt
# src/displayapp/Apps.h
# src/displayapp/DisplayApp.cpp
# src/displayapp/Messages.h
# src/displayapp/screens/settings/Settings.cpp
Diffstat (limited to 'src/displayapp/DisplayApp.cpp')
-rw-r--r-- | src/displayapp/DisplayApp.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/displayapp/DisplayApp.cpp b/src/displayapp/DisplayApp.cpp index fdd1682b..25ae9ad6 100644 --- a/src/displayapp/DisplayApp.cpp +++ b/src/displayapp/DisplayApp.cpp @@ -49,6 +49,7 @@ #include "displayapp/screens/settings/SettingSetTime.h" #include "displayapp/screens/settings/SettingChimes.h" #include "displayapp/screens/settings/SettingShakeThreshold.h" +#include "displayapp/screens/settings/SettingAirplaneMode.h" #include "libs/lv_conf.h" @@ -292,6 +293,9 @@ void DisplayApp::Refresh() { case Messages::BleFirmwareUpdateStarted: LoadApp(Apps::FirmwareUpdate, DisplayApp::FullRefreshDirections::Down); break; + case Messages::AirplaneModeToggle: + PushMessageToSystemTask(System::Messages::AirplaneModeToggle); + break; case Messages::UpdateDateTime: // Added to remove warning // What should happen here? @@ -430,6 +434,10 @@ void DisplayApp::LoadApp(Apps app, DisplayApp::FullRefreshDirections direction) currentScreen = std::make_unique<Screens::SettingShakeThreshold>(this, settingsController, motionController, *systemTask); ReturnApp(Apps::Settings, FullRefreshDirections::Down, TouchEvents::SwipeDown); break; + case Apps::SettingAirplaneMode: + currentScreen = std::make_unique<Screens::SettingAirplaneMode>(this, settingsController); + ReturnApp(Apps::Settings, FullRefreshDirections::Down, TouchEvents::SwipeDown); + break; case Apps::BatteryInfo: currentScreen = std::make_unique<Screens::BatteryInfo>(this, batteryController); ReturnApp(Apps::Settings, FullRefreshDirections::Down, TouchEvents::SwipeDown); |