Skip to content

Commit

Permalink
Color Control Cluster: EnhancedMoveToHue Command bugfix. (project-chi…
Browse files Browse the repository at this point in the history
  • Loading branch information
rcasallas-silabs authored and step0035 committed Sep 2, 2022
1 parent f3cc59b commit df08e87
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 df08e87

Please sign in to comment.