summaryrefslogtreecommitdiff
path: root/src/main.cpp
diff options
context:
space:
mode:
authorReinhold Gschweicher <pyro4hell@gmail.com>2022-01-30 13:31:13 (GMT)
committerJF <JF002@users.noreply.github.com>2022-02-19 19:46:45 (GMT)
commit407908686ac252615f35e5175fcb0c2fd19cce69 (patch)
tree359348c01176e3a15340820e6cbdf1cf6025dfcc /src/main.cpp
parentf829427c4186ec003d51c689c6831d076f3b0b69 (diff)
Provide reference to BrightnessController in DisplayApp
For the simulator I need a way to get to the brightnessController object and handle the set brightness-levels accoringly. This is done by the constructor expecting a brightnessController object instead of initializing one itself
Diffstat (limited to 'src/main.cpp')
-rw-r--r--src/main.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/main.cpp b/src/main.cpp
index 81d297f..fa492d0 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -33,6 +33,7 @@
#include "components/battery/BatteryController.h"
#include "components/ble/BleController.h"
#include "components/ble/NotificationManager.h"
+#include "components/brightness/BrightnessController.h"
#include "components/motor/MotorController.h"
#include "components/datetime/DateTimeController.h"
#include "components/heartrate/HeartRateController.h"
@@ -114,6 +115,7 @@ Pinetime::Controllers::TimerController timerController;
Pinetime::Controllers::AlarmController alarmController {dateTimeController};
Pinetime::Controllers::TouchHandler touchHandler(touchPanel, lvgl);
Pinetime::Controllers::ButtonHandler buttonHandler;
+Pinetime::Controllers::BrightnessController brightnessController {};
Pinetime::Applications::DisplayApp displayApp(lcd,
lvgl,
@@ -129,6 +131,7 @@ Pinetime::Applications::DisplayApp displayApp(lcd,
motionController,
timerController,
alarmController,
+ brightnessController,
touchHandler);
Pinetime::System::SystemTask systemTask(spi,