diff --git a/src/app/clusters/color-control-server/color-control-server.cpp b/src/app/clusters/color-control-server/color-control-server.cpp index 4c662e8213ecb8..d7d0c9d11232ad 100644 --- a/src/app/clusters/color-control-server/color-control-server.cpp +++ b/src/app/clusters/color-control-server/color-control-server.cpp @@ -589,7 +589,7 @@ void ColorControlServer::handleModeSwitch(EndpointId endpoint, EnhancedColorMode uint8_t colorModeTransition; - if (static_cast(oldColorMode) == newColorMode) + if (oldColorMode == static_cast(newColorMode)) { return; } @@ -627,7 +627,7 @@ void ColorControlServer::handleModeSwitch(EndpointId endpoint, EnhancedColorMode computePwmFromTemp(endpoint); break; - // for the following cases, there is no transition. + // No transition needed for the following cases case ColorControlServer::Conversion::HSV_TO_HSV: case ColorControlServer::Conversion::CIE_XY_TO_CIE_XY: case ColorControlServer::Conversion::TEMPERATURE_TO_TEMPERATURE: @@ -636,6 +636,7 @@ void ColorControlServer::handleModeSwitch(EndpointId endpoint, EnhancedColorMode } } + /** * @brief calculates transition time frame currant sate and rate *