Skip to content

Commit 1502cd6

Browse files
Add code comment, fix typo in test command
1 parent 61d0fa1 commit 1502cd6

File tree

2 files changed

+11
-1
lines changed

2 files changed

+11
-1
lines changed

src/app/clusters/color-control-server/color-control-server.cpp

+10
Original file line numberDiff line numberDiff line change
@@ -2693,10 +2693,15 @@ bool ColorControlServer::moveColorTempCommand(app::CommandHandler * commandObj,
26932693
return true;
26942694
}
26952695

2696+
// Per spec, colorTemperatureMinimumMireds field is limited to ColorTempPhysicalMinMireds and
2697+
// when colorTemperatureMinimumMireds field is 0, ColorTempPhysicalMinMireds shall be used (always >= to 0)
26962698
if (colorTemperatureMinimum < tempPhysicalMin)
26972699
{
26982700
colorTemperatureMinimum = tempPhysicalMin;
26992701
}
2702+
2703+
// Per spec, colorTemperatureMaximumMireds field is limited to ColorTempPhysicalMaxMireds and
2704+
// when colorTemperatureMaximumMireds field is 0, ColorTempPhysicalMaxMireds shall be used
27002705
if ((colorTemperatureMaximum == 0) || (colorTemperatureMaximum > tempPhysicalMax))
27012706
{
27022707
colorTemperatureMaximum = tempPhysicalMax;
@@ -2804,10 +2809,15 @@ bool ColorControlServer::stepColorTempCommand(app::CommandHandler * commandObj,
28042809
Attributes::ColorTempPhysicalMinMireds::Get(endpoint, &tempPhysicalMin);
28052810
Attributes::ColorTempPhysicalMaxMireds::Get(endpoint, &tempPhysicalMax);
28062811

2812+
// Per spec, colorTemperatureMinimumMireds field is limited to ColorTempPhysicalMinMireds and
2813+
// when colorTemperatureMinimumMireds field is 0, ColorTempPhysicalMinMireds shall be used (always >= to 0)
28072814
if (colorTemperatureMinimum < tempPhysicalMin)
28082815
{
28092816
colorTemperatureMinimum = tempPhysicalMin;
28102817
}
2818+
2819+
// Per spec, colorTemperatureMaximumMireds field is limited to ColorTempPhysicalMaxMireds and
2820+
// when colorTemperatureMaximumMireds field is 0, ColorTempPhysicalMaxMireds shall be used
28112821
if ((colorTemperatureMaximum == 0) || (colorTemperatureMaximum > tempPhysicalMax))
28122822
{
28132823
colorTemperatureMaximum = tempPhysicalMax;

src/app/tests/suites/certification/Test_TC_CC_6_2.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -373,7 +373,7 @@ tests:
373373
arguments:
374374
values:
375375
- name: "MoveMode"
376-
value: 1
376+
value: 3
377377
- name: "Rate"
378378
value: 65535
379379
- name: "ColorTemperatureMinimumMireds"

0 commit comments

Comments
 (0)