Flashlight brightness control

This commit is contained in:
Riku Isokoski
2021-10-13 13:04:40 +03:00
parent 92aeae73de
commit fd4fbfddb9
4 changed files with 102 additions and 32 deletions

View File

@@ -1,10 +1,10 @@
#pragma once
#include <cstdint>
#include "Screen.h"
#include <lvgl/lvgl.h>
#include "systemtask/SystemTask.h"
#include "components/brightness/BrightnessController.h"
#include "systemtask/SystemTask.h"
#include <cstdint>
#include <lvgl/lvgl.h>
namespace Pinetime {
@@ -20,12 +20,18 @@ namespace Pinetime {
void OnClickEvent(lv_obj_t* obj, lv_event_t event);
private:
void SetIndicators();
void SetColors();
Pinetime::System::SystemTask& systemTask;
Controllers::BrightnessController& brightness;
Controllers::BrightnessController& brightnessController;
Controllers::BrightnessController::Levels brightnessLevel;
lv_obj_t* flashLight;
lv_obj_t* backgroundAction;
bool isOn = true;
lv_obj_t* indicators[3];
bool isOn = false;
};
}
}