forked from haui/InfiniTime_mirror
Compare commits
1 commit
main
...
restore-br
Author | SHA1 | Date | |
---|---|---|---|
3b3701c1b5 |
|
@ -15,7 +15,7 @@ namespace {
|
|||
}
|
||||
|
||||
FlashLight::FlashLight(System::SystemTask& systemTask, Controllers::BrightnessController& brightnessController)
|
||||
: systemTask {systemTask}, brightnessController {brightnessController} {
|
||||
: systemTask {systemTask}, brightnessController {brightnessController}, backupBrightnessLevel {brightnessController.Level()} {
|
||||
|
||||
brightnessController.Set(Controllers::BrightnessController::Levels::Low);
|
||||
|
||||
|
@ -52,6 +52,7 @@ FlashLight::FlashLight(System::SystemTask& systemTask, Controllers::BrightnessCo
|
|||
FlashLight::~FlashLight() {
|
||||
lv_obj_clean(lv_scr_act());
|
||||
lv_obj_set_style_local_bg_color(lv_scr_act(), LV_OBJ_PART_MAIN, LV_STATE_DEFAULT, LV_COLOR_BLACK);
|
||||
brightnessController.Set(backupBrightnessLevel);
|
||||
systemTask.PushMessage(Pinetime::System::Messages::EnableSleeping);
|
||||
}
|
||||
|
||||
|
|
|
@ -27,7 +27,7 @@ namespace Pinetime {
|
|||
Controllers::BrightnessController& brightnessController;
|
||||
|
||||
Controllers::BrightnessController::Levels brightnessLevel = Controllers::BrightnessController::Levels::High;
|
||||
|
||||
Controllers::BrightnessController::Levels backupBrightnessLevel;
|
||||
lv_obj_t* flashLight;
|
||||
lv_obj_t* backgroundAction;
|
||||
lv_obj_t* indicators[3];
|
||||
|
|
Loading…
Reference in a new issue