-
Notifications
You must be signed in to change notification settings - Fork 2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[ColorControl] Enhanced commands should set EnhancedColorMode to 3 #22580
Conversation
PR #22580: Size comparison from 5caec5a to cc99b49 Increases (24 builds for bl602, bl702, cc13x2_26x2, cyw30739, efr32, esp32, k32w, nrfconnect, psoc6, qpg, telink)
Decreases (5 builds for cc13x2_26x2, esp32)
Full report (37 builds for bl602, bl702, cc13x2_26x2, cyw30739, efr32, esp32, k32w, linux, mbed, nrfconnect, psoc6, qpg, telink)
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Your patch works for that one case but the real issue lies within the function handleModeSwitch
In fact, I see it was patched the same way you are doing before for moveToHueCommand
and I didn't catch it in that PR.
The real fix would add the EnhancedCurrentHue and CurrentSaturation mode (COLOR_MODE_EHSV = 0x03
) in this enum in
src/app/clusters/color-control-server/color-control-server.h
enum ColorMode
{
COLOR_MODE_HSV = 0x00,
COLOR_MODE_CIE_XY = 0x01,
COLOR_MODE_TEMPERATURE = 0x02
};
Check and correct all the calls of handleModeSwitch(endpoint, COLOR_MODE_HSV);
to pass as argument the new COLOR_MODE_EHSV
mode if the command's isEnhanced==true
In handleModeSwitch
, add a check to transpose COLOR_MODE_EHSV
to COLOR_MODE_HSV
for the standard Attributes::ColorMode::Set(endpoint, newColorMode);
Updated PR description |
Thank you |
Accepted for 1.0: spec fix to pass cert |
…roject-chip#22580) * [ColorControl] Set EnhancedColorMode to 3 during enhanced-move-to-hue-and-saturation * [ColorControl] Update handleModeSwitch to set EnhancedColorMode
@andy31415 @woody-apple can we cherry pick this onto SVE-2 branch please ? |
…roject-chip#22580) * [ColorControl] Set EnhancedColorMode to 3 during enhanced-move-to-hue-and-saturation * [ColorControl] Update handleModeSwitch to set EnhancedColorMode
Issue Being Resolved
Change overview
COLOR_MODE_EHSV = 0x03
in ColorMode enumhandleModeSwitch(endpoint, COLOR_MODE_EHSV)
for all commands that are enhancedhandleModeSwitch
will set EnhancedColorMode to 3 if command is enhanced and set ColorMode to 0Testing