Skip to content

Commit

Permalink
Color Control Cluster: EnhancedMoveToHue Command bugfix. (#22187)
Browse files Browse the repository at this point in the history
  • Loading branch information
rcasallas-silabs committed Aug 29, 2022
1 parent 8f72bdb commit ec846a1
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/app/clusters/color-control-server/color-control-server.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,14 @@ using namespace chip::app::Clusters::ColorControl;
* Attributes Definition
*********************************************************/

enum EnhancedColorModeType
{
CurrentHueandCurrentSaturation = 0,
CurrentXandCurrentY = 1,
ColorTemperatureMireds = 2,
EnhancedCurrentHueandCurrentSaturation = 3,
};

ColorControlServer ColorControlServer::instance;

/**********************************************************
Expand Down Expand Up @@ -965,6 +973,8 @@ bool ColorControlServer::moveToHueCommand(EndpointId endpoint, uint16_t hue, uin
{
Attributes::EnhancedCurrentHue::Get(endpoint, &(colorHueTransitionState->initialEnhancedHue));
Attributes::EnhancedCurrentHue::Get(endpoint, &(colorHueTransitionState->currentEnhancedHue));
Attributes::ColorMode::Set(endpoint, CurrentHueandCurrentSaturation);
Attributes::EnhancedColorMode::Set(endpoint, EnhancedCurrentHueandCurrentSaturation);

colorHueTransitionState->finalEnhancedHue = hue;
}
Expand Down

0 comments on commit ec846a1

Please sign in to comment.