Skip to content

Commit

Permalink
cherrypick-Color Control Cluster: EnhancedMoveToHue Command bugfix(pr…
Browse files Browse the repository at this point in the history
  • Loading branch information
stoneM2017 committed Sep 4, 2022
1 parent 76720b3 commit d8a2a8f
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 d8a2a8f

Please sign in to comment.