Change color model to fix white channel issues (#1895)

This commit is contained in:
Oxan van Leeuwen
2021-07-08 11:37:47 +02:00
committed by GitHub
parent fd4b7d4588
commit f9797825ad
13 changed files with 200 additions and 83 deletions
+7
View File
@@ -44,6 +44,12 @@ class LightCall {
LightCall &set_brightness(float brightness);
/// Set the brightness property if the light supports brightness.
LightCall &set_brightness_if_supported(float brightness);
/// Set the color brightness of the light from 0.0 (no color) to 1.0 (fully on)
LightCall &set_color_brightness(optional<float> brightness);
/// Set the color brightness of the light from 0.0 (no color) to 1.0 (fully on)
LightCall &set_color_brightness(float brightness);
/// Set the color brightness property if the light supports RGBW.
LightCall &set_color_brightness_if_supported(float brightness);
/** Set the red RGB value of the light from 0.0 to 1.0.
*
* Note that this only controls the color of the light, not its brightness.
@@ -146,6 +152,7 @@ class LightCall {
optional<uint32_t> transition_length_;
optional<uint32_t> flash_length_;
optional<float> brightness_;
optional<float> color_brightness_;
optional<float> red_;
optional<float> green_;
optional<float> blue_;