設定ファイルから色々できるといいなぁ...
Closed this issue · 1 comments
github-actions commented
設定ファイルから色々できるといいなぁ...
Line 61 in 4e03086
void setup(void) override {
// configure
static constexpr BrightnessSetting brightnessSetting[N] = { // TODO: 設定ファイルから色々できるといいなぁ...
{ .visibleLux = 50.0f , .brightness = 20 },
{ .visibleLux = 120.0f , .brightness = 100 },
{ .visibleLux = 180.0f , .brightness = 200 },
{ .visibleLux = FLT_MAX, .brightness = 255 },
};
this->resource.config.operate([&](GlobalConfig<FixedConfig::ConfigAllocateSize>& config){
// fps
auto fps = GlobalConfigDefaultValues::UiTaskFps;
config.read(GlobalConfigKeys::UiTaskFps, fps);
this->setFps(fps);
// auto brightness
auto holdMs = GlobalConfigDefaultValues::BrightnessHoldMs;
auto transitionMs = GlobalConfigDefaultValues::BrightnessTransitionMs;
config.read(GlobalConfigKeys::UiTaskFps, holdMs);
config.read(GlobalConfigKeys::UiTaskFps, transitionMs);
this->brightness.configure(true, holdMs, transitionMs, brightnessSetting);
});
// initialize lcd
this->lcd.setTextSize(1);
5874979dbc4ee830782d541d6690d2b511926274
github-actions commented
Closed in 100e443