diff options
| author | Avamander <avamander@gmail.com> | 2021-12-09 20:20:29 (GMT) |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-12-09 20:20:29 (GMT) |
| commit | e8c1302cd65dbd804d152227ae76aa786d6f0b60 (patch) | |
| tree | 572ece371e587fb6e5c3b531473a528305ba1809 /src/displayapp/DisplayApp.cpp | |
| parent | 5f50f0e538e20ede353b388148b706319da161ce (diff) | |
| parent | b946b8d156175309ab778038dab75ec7996c05bc (diff) | |
Merge branch 'develop' into patch-weather
Diffstat (limited to 'src/displayapp/DisplayApp.cpp')
| -rw-r--r-- | src/displayapp/DisplayApp.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/displayapp/DisplayApp.cpp b/src/displayapp/DisplayApp.cpp index 8015518..0a675c8 100644 --- a/src/displayapp/DisplayApp.cpp +++ b/src/displayapp/DisplayApp.cpp @@ -29,6 +29,7 @@ #include "displayapp/screens/FlashLight.h" #include "displayapp/screens/BatteryInfo.h" #include "displayapp/screens/Steps.h" +#include "displayapp/screens/PassKey.h" #include "displayapp/screens/Error.h" #include "drivers/Cst816s.h" @@ -214,6 +215,9 @@ void DisplayApp::Refresh() { } else { LoadApp(Apps::Alarm, DisplayApp::FullRefreshDirections::None); } + case Messages::ShowPairingKey: + LoadApp(Apps::PassKey, DisplayApp::FullRefreshDirections::Up); + break; case Messages::TouchEvent: { if (state != States::Running) { break; @@ -351,6 +355,11 @@ void DisplayApp::LoadApp(Apps app, DisplayApp::FullRefreshDirections direction) ReturnApp(Apps::Clock, FullRefreshDirections::Down, TouchEvents::None); break; + case Apps::PassKey: + currentScreen = std::make_unique<Screens::PassKey>(this, bleController.GetPairingKey()); + ReturnApp(Apps::Clock, FullRefreshDirections::Down, TouchEvents::SwipeDown); + break; + case Apps::Notifications: currentScreen = std::make_unique<Screens::Notifications>( this, notificationManager, systemTask->nimble().alertService(), motorController, Screens::Notifications::Modes::Normal); |
