Fix mixup between ColorMode and ColorCapability (#2121)

This commit is contained in:
Oxan van Leeuwen 2021-08-04 02:32:42 +02:00 committed by GitHub
parent 20f7eb7327
commit ceb0564ebf
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -179,7 +179,7 @@ class LightColorValues {
/// Convert these light color values to an CWWW representation with the given parameters.
void as_cwww(float color_temperature_cw, float color_temperature_ww, float *cold_white, float *warm_white,
float gamma = 0, bool constant_brightness = false) const {
if (this->color_mode_ & ColorMode::COLD_WARM_WHITE) {
if (this->color_mode_ & ColorCapability::COLD_WARM_WHITE) {
const float cw_level = gamma_correct(this->cold_white_, gamma);
const float ww_level = gamma_correct(this->warm_white_, gamma);
const float white_level = gamma_correct(this->state_ * this->brightness_, gamma);