5#ifndef BRIGHTNESS_HANDLE_H
6#define BRIGHTNESS_HANDLE_H
brightness_t get_brightness()
Return the current brightness value.
Definition: brightness_handle.cpp:42
uint32_t when_last_update_brightness()
Get time in milliseconds when brightness was last updated.
Definition: brightness_handle.cpp:102
brightness_t get_saved_brightness()
Return the saved brightness level. This should be the prefered option in all computations.
Definition: brightness_handle.cpp:69
void set_max_brightness(const brightness_t brg)
Set the new max brightness.
Definition: brightness_handle.cpp:48
brightness_t get_max_user_brightness()
Return the maximum allowed brightness for the user modes.
Definition: brightness_handle.cpp:46
void force_brightness_user_callback()
force an update call to the user brightness callback
Definition: brightness_handle.cpp:93
void update_brightness(const brightness_t newBrightness, const bool shouldSkipUserCallbacks)
update the internal brightness values
Definition: brightness_handle.cpp:73
brightness_t get_max_brightness()
Return the maximum allowed brightness.
Definition: brightness_handle.cpp:44
brightness_t get_scaled_saved_brightness()
Return the saved brightness level, with the user brightness scale applied. This is the level that the...
Definition: brightness_handle.cpp:71
void set_user_brightness_scale(const float scale)
Scale the brightness available to the user modes, without changing the saved brightness....
Definition: brightness_handle.cpp:55
void update_saved_brightness()
Update the saved brightness value with the current brightness.
Definition: brightness_handle.cpp:61
bool get_color_override(uint32_t &color)
Get the color that replaces the battery level color, if any.
Definition: brightness_handle.cpp:177
void set_color_override(const uint8_t red, const uint8_t green, const uint8_t blue)
Replace the battery level color of the indicator by a fixed color. The indicator animations (charge,...
Definition: brightness_handle.cpp:169
bool should_indicator_be_visible()
indicates if the indicator should be visible or not
Definition: brightness_handle.cpp:143
uint8_t get_brightness_level()
Get the brightness of the RGB indicator. Indicator level can be 0 : indicator and alerts displayed at...
Definition: brightness_handle.cpp:141
void clear_color_override()
Restore the default (battery level) color of the indicator.
Definition: brightness_handle.cpp:175
void set_brightness_level(const uint8_t level)
Set the brightness of the RGB indicator. Indicator level can be 0 : indicator and alerts displayed at...
Definition: brightness_handle.cpp:112
Program scope.
Definition: control_fixed_modes.hpp:14
uint16_t brightness_t
Define the type of the brightness parameters.
Definition: constants.h:151
Define the system hardware constants.