From 2ed76ac55615a720dbcbf2ac828ad3060a252273 Mon Sep 17 00:00:00 2001 From: JF Date: Sun, 15 Mar 2020 18:03:11 +0100 Subject: Encapsulate brightness controll into the class BrightnessController. Add a new app to configure the brightness. --- src/DisplayApp/DisplayApp.h | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'src/DisplayApp/DisplayApp.h') diff --git a/src/DisplayApp/DisplayApp.h b/src/DisplayApp/DisplayApp.h index eaad1baa..ccbca4c3 100644 --- a/src/DisplayApp/DisplayApp.h +++ b/src/DisplayApp/DisplayApp.h @@ -7,6 +7,7 @@ #include #include #include +#include #include #include #include "Fonts/lcdfont14.h" @@ -37,7 +38,7 @@ namespace Pinetime { void Start(); void PushMessage(Messages msg); - enum class Apps {None, Launcher, Clock, Test, Meter, Gauge}; + enum class Apps {None, Launcher, Clock, Test, Meter, Gauge, Brightness}; void StartApp(Apps app); private: @@ -64,15 +65,13 @@ namespace Pinetime { TouchEvents OnTouchEvent(); std::unique_ptr currentScreen; - static constexpr uint8_t pinLcdBacklight1 = 14; - static constexpr uint8_t pinLcdBacklight2 = 22; - static constexpr uint8_t pinLcdBacklight3 = 23; bool isClock = true; Pinetime::System::SystemTask& systemTask; Apps nextApp = Apps::None; bool onClockApp = false; // TODO find a better way to know that we should handle gestures and button differently for the Clock app. + Controllers::BrightnessController brightnessController; }; } } -- cgit v1.2.3-70-g09d2