From ab5d93bf04f5c4cae26afa578fb626898101dbb3 Mon Sep 17 00:00:00 2001 From: "info@revskills.de" Date: Sat, 31 Aug 2024 12:59:16 +0200 Subject: [PATCH] Add rgb status bar brightness control, rgb side bar dimming duration and tool light brightness control --- include/leds/side_strip_control.hpp | 3 +- src/gui/MItem_menus.cpp | 47 +++++++++++++++++++ src/gui/MItem_menus.hpp | 30 ++++++++++++ src/gui/screen_menu_enclosure.hpp | 3 +- src/gui/screen_menu_user_interface.hpp | 6 ++- src/guiapi/include/gui_leds.hpp | 16 ++++++- src/guiapi/src/gui_leds.cpp | 14 +++++- src/leds/side_strip_control.cpp | 10 +++- .../config_store/store_definition.hpp | 4 ++ src/puppies/Dwarf.cpp | 2 +- 10 files changed, 126 insertions(+), 9 deletions(-) diff --git a/include/leds/side_strip_control.hpp b/include/leds/side_strip_control.hpp index 2769bc6bf4..c053fc3143 100644 --- a/include/leds/side_strip_control.hpp +++ b/include/leds/side_strip_control.hpp @@ -33,6 +33,8 @@ class SideStripControl { void SetEnable(bool isEnable); void set_dimming_enabled(bool set); + void set_dimming_duration(int duration_sec); + int get_dimming_duration(); /** * @brief Quickly turn off LEDs. @@ -145,7 +147,6 @@ class SideStripControl { freertos::Mutex mutex; // Active State - const int active_timeout_ms = 120 * 1000; std::optional active_start_timestamp; // Custom Color State diff --git a/src/gui/MItem_menus.cpp b/src/gui/MItem_menus.cpp index 0edef23f5e..49dd329eb8 100644 --- a/src/gui/MItem_menus.cpp +++ b/src/gui/MItem_menus.cpp @@ -25,6 +25,7 @@ #include