From 8ee5e781e76a9db005e2a74a299d6cd24e46b8d0 Mon Sep 17 00:00:00 2001 From: jacqueline Date: Tue, 29 Aug 2023 12:09:58 +1000 Subject: Use gamma correction for display brightness --- src/drivers/include/display.hpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src/drivers/include') diff --git a/src/drivers/include/display.hpp b/src/drivers/include/display.hpp index 23bbbab9..3e667be7 100644 --- a/src/drivers/include/display.hpp +++ b/src/drivers/include/display.hpp @@ -37,6 +37,7 @@ class Display { ~Display(); auto SetDisplayOn(bool) -> void; + auto SetBrightness(uint_fast8_t) -> void; /* Driver callback invoked by LVGL when there is new data to display. */ void OnLvglFlush(lv_disp_drv_t* disp_drv, @@ -54,7 +55,7 @@ class Display { std::unique_ptr worker_task_; bool display_on_; - uint32_t brightness_; + uint_fast8_t brightness_; lv_disp_draw_buf_t buffers_; lv_disp_drv_t driver_; @@ -74,6 +75,8 @@ class Display { void SendTransaction(TransactionType type, const uint8_t* data, size_t length); + + auto SetDutyCycle(uint_fast8_t) -> void; }; } // namespace drivers -- cgit v1.2.3