Skip to content

Commit

Permalink
test error resolved
Browse files Browse the repository at this point in the history
  • Loading branch information
Thirsrin committed Aug 6, 2024
1 parent d06bbaa commit 1aa0637
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -589,7 +589,7 @@ void ColorControlServer::handleModeSwitch(EndpointId endpoint, EnhancedColorMode

uint8_t colorModeTransition;

if (static_cast<EnhancedColorModeEnum>(oldColorMode) == newColorMode)
if (oldColorMode == static_cast<ColorModeEnum>(newColorMode))
{
return;
}
Expand Down Expand Up @@ -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:
Expand All @@ -636,6 +636,7 @@ void ColorControlServer::handleModeSwitch(EndpointId endpoint, EnhancedColorMode
}
}


/**
* @brief calculates transition time frame currant sate and rate
*
Expand Down

0 comments on commit 1aa0637

Please sign in to comment.