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.cpp42
1 files changed, 2 insertions, 40 deletions
diff --git a/src/displayapp/DisplayApp.cpp b/src/displayapp/DisplayApp.cpp
index 574f964..a03f4cf 100644
--- a/src/displayapp/DisplayApp.cpp
+++ b/src/displayapp/DisplayApp.cpp
@@ -7,7 +7,6 @@
#include "components/motion/MotionController.h"
#include "components/motor/MotorController.h"
#include "displayapp/screens/ApplicationList.h"
-#include "displayapp/screens/Brightness.h"
#include "displayapp/screens/Clock.h"
#include "displayapp/screens/FirmwareUpdate.h"
#include "displayapp/screens/FirmwareValidation.h"
@@ -24,7 +23,6 @@
#include "displayapp/screens/settings/QuickSettings.h"
#include "displayapp/screens/settings/Settings.h"
#include "displayapp/screens/settings/SettingTimeFormat.h"
-#include "displayapp/screens/settings/SettingWakeUp.h"
#include "displayapp/screens/settings/SettingDisplay.h"
#include "libs/lv_conf.h"
@@ -119,7 +117,6 @@ void DisplayApp::Process(void* instance) {
void DisplayApp::InitHw() {
brightnessController.Init();
- brightnessController.Set(settingsController.GetBrightness());
}
void DisplayApp::Refresh() {
@@ -142,28 +139,6 @@ void DisplayApp::Refresh() {
Messages msg;
if (xQueueReceive(msgQueue, &msg, queueTimeout)) {
switch (msg) {
- case Messages::DimScreen:
- // Backup brightness is the brightness to return to after dimming or sleeping
- brightnessController.Backup();
- brightnessController.Set(Controllers::BrightnessController::Levels::Low);
- break;
- case Messages::RestoreBrightness:
- brightnessController.Restore();
- break;
- case Messages::GoToSleep:
- while (brightnessController.Level() != Controllers::BrightnessController::Levels::Off) {
- brightnessController.Lower();
- vTaskDelay(100);
- }
- lcd.DisplayOff();
- PushMessageToSystemTask(Pinetime::System::Messages::OnDisplayTaskSleeping);
- state = States::Idle;
- break;
- case Messages::GoToRunning:
- lcd.DisplayOn();
- brightnessController.Restore();
- state = States::Running;
- break;
case Messages::UpdateTimeOut:
PushMessageToSystemTask(System::Messages::UpdateTimeOut);
break;
@@ -194,16 +169,11 @@ void DisplayApp::Refresh() {
case TouchEvents::SwipeRight:
LoadApp(Apps::QuickSettings, DisplayApp::FullRefreshDirections::RightAnim);
break;
- case TouchEvents::DoubleTap:
- PushMessageToSystemTask(System::Messages::GoToSleep);
- break;
default:
break;
}
} else if (returnTouchEvent == gesture) {
LoadApp(returnToApp, returnDirection);
- brightnessController.Set(settingsController.GetBrightness());
- brightnessController.Backup();
}
} else {
touchHandler.CancelTap();
@@ -211,12 +181,8 @@ void DisplayApp::Refresh() {
} break;
case Messages::ButtonPushed:
if (!currentScreen->OnButtonPushed()) {
- if (currentApp == Apps::Clock) {
- PushMessageToSystemTask(System::Messages::GoToSleep);
- } else {
+ if (currentApp != Apps::Clock) {
LoadApp(returnToApp, returnDirection);
- brightnessController.Set(settingsController.GetBrightness());
- brightnessController.Backup();
}
}
break;
@@ -325,7 +291,7 @@ void DisplayApp::LoadApp(Apps app, DisplayApp::FullRefreshDirections direction)
// Settings
case Apps::QuickSettings:
currentScreen = std::make_unique<Screens::QuickSettings>(
- this, batteryController, dateTimeController, brightnessController, motorController, settingsController);
+ this, batteryController, dateTimeController, motorController, settingsController);
ReturnApp(Apps::Clock, FullRefreshDirections::LeftAnim, TouchEvents::SwipeLeft);
break;
case Apps::Settings:
@@ -336,10 +302,6 @@ void DisplayApp::LoadApp(Apps app, DisplayApp::FullRefreshDirections direction)
currentScreen = std::make_unique<Screens::SettingTimeFormat>(this, settingsController);
ReturnApp(Apps::Settings, FullRefreshDirections::Down, TouchEvents::SwipeDown);
break;
- case Apps::SettingWakeUp:
- currentScreen = std::make_unique<Screens::SettingWakeUp>(this, settingsController);
- ReturnApp(Apps::Settings, FullRefreshDirections::Down, TouchEvents::SwipeDown);
- break;
case Apps::SettingDisplay:
currentScreen = std::make_unique<Screens::SettingDisplay>(this, settingsController);
ReturnApp(Apps::Settings, FullRefreshDirections::Down, TouchEvents::SwipeDown);