summaryrefslogtreecommitdiff
path: root/src/displayapp/DisplayApp.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/displayapp/DisplayApp.cpp')
-rw-r--r--src/displayapp/DisplayApp.cpp30
1 files changed, 4 insertions, 26 deletions
diff --git a/src/displayapp/DisplayApp.cpp b/src/displayapp/DisplayApp.cpp
index f6d27477..32280615 100644
--- a/src/displayapp/DisplayApp.cpp
+++ b/src/displayapp/DisplayApp.cpp
@@ -49,7 +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 "displayapp/screens/settings/SettingBluetooth.h"
#include "libs/lv_conf.h"
@@ -60,28 +60,6 @@ namespace {
static inline bool in_isr(void) {
return (SCB->ICSR & SCB_ICSR_VECTACTIVE_Msk) != 0;
}
-
- TouchEvents ConvertGesture(Pinetime::Drivers::Cst816S::Gestures gesture) {
- switch (gesture) {
- case Pinetime::Drivers::Cst816S::Gestures::SingleTap:
- return TouchEvents::Tap;
- case Pinetime::Drivers::Cst816S::Gestures::LongPress:
- return TouchEvents::LongTap;
- case Pinetime::Drivers::Cst816S::Gestures::DoubleTap:
- return TouchEvents::DoubleTap;
- case Pinetime::Drivers::Cst816S::Gestures::SlideRight:
- return TouchEvents::SwipeRight;
- case Pinetime::Drivers::Cst816S::Gestures::SlideLeft:
- return TouchEvents::SwipeLeft;
- case Pinetime::Drivers::Cst816S::Gestures::SlideDown:
- return TouchEvents::SwipeDown;
- case Pinetime::Drivers::Cst816S::Gestures::SlideUp:
- return TouchEvents::SwipeUp;
- case Pinetime::Drivers::Cst816S::Gestures::None:
- default:
- return TouchEvents::None;
- }
- }
}
DisplayApp::DisplayApp(Drivers::St7789& lcd,
@@ -227,7 +205,7 @@ void DisplayApp::Refresh() {
if (state != States::Running) {
break;
}
- auto gesture = ConvertGesture(touchHandler.GestureGet());
+ auto gesture = touchHandler.GestureGet();
if (gesture == TouchEvents::None) {
break;
}
@@ -434,8 +412,8 @@ 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);
+ case Apps::SettingBluetooth:
+ currentScreen = std::make_unique<Screens::SettingBluetooth>(this, settingsController);
ReturnApp(Apps::Settings, FullRefreshDirections::Down, TouchEvents::SwipeDown);
break;
case Apps::BatteryInfo: