Skip to content

Commit ddc8750

Browse files
committed
addressed review comments
1 parent 4fdadff commit ddc8750

File tree

28 files changed

+45
-37
lines changed

28 files changed

+45
-37
lines changed

examples/all-clusters-app/all-clusters-common/all-clusters-app.matter

+1-1
Original file line numberDiff line numberDiff line change
@@ -5460,7 +5460,7 @@ cluster ColorControl = 768 {
54605460
enum DriftCompensationEnum : enum8 {
54615461
kNone = 0;
54625462
kOtherOrUnknown = 1;
5463-
kTemperaturemonitoring = 2;
5463+
kTemperatureMonitoring = 2;
54645464
kOpticalLuminanceMonitoringAndFeedback = 3;
54655465
kOpticalColorMonitoringAndFeedback = 4;
54665466
}

examples/all-clusters-minimal-app/all-clusters-common/all-clusters-minimal-app.matter

+1-1
Original file line numberDiff line numberDiff line change
@@ -4008,7 +4008,7 @@ cluster ColorControl = 768 {
40084008
enum DriftCompensationEnum : enum8 {
40094009
kNone = 0;
40104010
kOtherOrUnknown = 1;
4011-
kTemperaturemonitoring = 2;
4011+
kTemperatureMonitoring = 2;
40124012
kOpticalLuminanceMonitoringAndFeedback = 3;
40134013
kOpticalColorMonitoringAndFeedback = 4;
40144014
}

examples/chef/devices/rootnode_colortemperaturelight_hbUnzYVeyn.matter

+1-1
Original file line numberDiff line numberDiff line change
@@ -1433,7 +1433,7 @@ cluster ColorControl = 768 {
14331433
enum DriftCompensationEnum : enum8 {
14341434
kNone = 0;
14351435
kOtherOrUnknown = 1;
1436-
kTemperaturemonitoring = 2;
1436+
kTemperatureMonitoring = 2;
14371437
kOpticalLuminanceMonitoringAndFeedback = 3;
14381438
kOpticalColorMonitoringAndFeedback = 4;
14391439
}

examples/chef/devices/rootnode_extendedcolorlight_8lcaaYJVAa.matter

+1-1
Original file line numberDiff line numberDiff line change
@@ -1534,7 +1534,7 @@ cluster ColorControl = 768 {
15341534
enum DriftCompensationEnum : enum8 {
15351535
kNone = 0;
15361536
kOtherOrUnknown = 1;
1537-
kTemperaturemonitoring = 2;
1537+
kTemperatureMonitoring = 2;
15381538
kOpticalLuminanceMonitoringAndFeedback = 3;
15391539
kOpticalColorMonitoringAndFeedback = 4;
15401540
}

examples/common/imgui_ui/windows/light.cpp

+6-6
Original file line numberDiff line numberDiff line change
@@ -155,14 +155,14 @@ void Light::Render()
155155
ImGui::Text("Color Control:");
156156
ImGui::Indent();
157157
const char * mode = // based on ColorMode attribute: spec 3.2.7.9
158-
(mColorMode == chip::app::Clusters::ColorControl::ColorModeEnum::kCurrentHueAndCurrentSaturation) ? "Hue/Saturation"
159-
: (mColorMode == chip::app::Clusters::ColorControl::ColorModeEnum::kCurrentXAndCurrentY) ? "X/Y"
160-
: (mColorMode == chip::app::Clusters::ColorControl::ColorModeEnum::kColorTemperatureMireds) ? "Temperature/Mireds"
158+
(mColorMode == ColorControl::ColorModeEnum::kCurrentHueAndCurrentSaturation) ? "Hue/Saturation"
159+
: (mColorMode == ColorControl::ColorModeEnum::kCurrentXAndCurrentY) ? "X/Y"
160+
: (mColorMode == ColorControl::ColorModeEnum::kColorTemperatureMireds) ? "Temperature/Mireds"
161161
: "UNKNOWN";
162162

163163
ImGui::Text("Mode: %s", mode);
164164

165-
if (mColorMode == chip::app::Clusters::ColorControl::ColorModeEnum::kCurrentHueAndCurrentSaturation)
165+
if (mColorMode == ColorControl::ColorModeEnum::kCurrentHueAndCurrentSaturation)
166166
{
167167
const float hueDegrees = (mColorHue * 360.0f) / 254.0f;
168168
const float saturationPercent = 100.0f * (mColorSaturation / 254.0f);
@@ -173,12 +173,12 @@ void Light::Render()
173173
ImGui::ColorButton("LightColor", HueSaturationToColor(hueDegrees, saturationPercent), 0 /* ImGuiColorEditFlags_* */,
174174
ImVec2(80, 80));
175175
}
176-
else if (mColorMode == chip::app::Clusters::ColorControl::ColorModeEnum::kCurrentXAndCurrentY)
176+
else if (mColorMode == ColorControl::ColorModeEnum::kCurrentXAndCurrentY)
177177
{
178178
ImGui::Text("Current X: %d", mColorX);
179179
ImGui::Text("Current Y: %d", mColorY);
180180
}
181-
else if (mColorMode == chip::app::Clusters::ColorControl::ColorModeEnum::kColorTemperatureMireds)
181+
else if (mColorMode == ColorControl::ColorModeEnum::kColorTemperatureMireds)
182182
{
183183
ImGui::Text("Color Temperature Mireds: %d", mColorTemperatureMireds);
184184
}

examples/light-switch-app/light-switch-common/light-switch-app.matter

+1-1
Original file line numberDiff line numberDiff line change
@@ -2211,7 +2211,7 @@ cluster ColorControl = 768 {
22112211
enum DriftCompensationEnum : enum8 {
22122212
kNone = 0;
22132213
kOtherOrUnknown = 1;
2214-
kTemperaturemonitoring = 2;
2214+
kTemperatureMonitoring = 2;
22152215
kOpticalLuminanceMonitoringAndFeedback = 3;
22162216
kOpticalColorMonitoringAndFeedback = 4;
22172217
}

examples/light-switch-app/qpg/zap/switch.matter

+1-1
Original file line numberDiff line numberDiff line change
@@ -2008,7 +2008,7 @@ cluster ColorControl = 768 {
20082008
enum DriftCompensationEnum : enum8 {
20092009
kNone = 0;
20102010
kOtherOrUnknown = 1;
2011-
kTemperaturemonitoring = 2;
2011+
kTemperatureMonitoring = 2;
20122012
kOpticalLuminanceMonitoringAndFeedback = 3;
20132013
kOpticalColorMonitoringAndFeedback = 4;
20142014
}

examples/lighting-app/bouffalolab/data_model/lighting-app-ethernet.matter

+1-1
Original file line numberDiff line numberDiff line change
@@ -1573,7 +1573,7 @@ cluster ColorControl = 768 {
15731573
enum DriftCompensationEnum : enum8 {
15741574
kNone = 0;
15751575
kOtherOrUnknown = 1;
1576-
kTemperaturemonitoring = 2;
1576+
kTemperatureMonitoring = 2;
15771577
kOpticalLuminanceMonitoringAndFeedback = 3;
15781578
kOpticalColorMonitoringAndFeedback = 4;
15791579
}

examples/lighting-app/bouffalolab/data_model/lighting-app-thread.matter

+1-1
Original file line numberDiff line numberDiff line change
@@ -1697,7 +1697,7 @@ cluster ColorControl = 768 {
16971697
enum DriftCompensationEnum : enum8 {
16981698
kNone = 0;
16991699
kOtherOrUnknown = 1;
1700-
kTemperaturemonitoring = 2;
1700+
kTemperatureMonitoring = 2;
17011701
kOpticalLuminanceMonitoringAndFeedback = 3;
17021702
kOpticalColorMonitoringAndFeedback = 4;
17031703
}

examples/lighting-app/bouffalolab/data_model/lighting-app-wifi.matter

+1-1
Original file line numberDiff line numberDiff line change
@@ -1608,7 +1608,7 @@ cluster ColorControl = 768 {
16081608
enum DriftCompensationEnum : enum8 {
16091609
kNone = 0;
16101610
kOtherOrUnknown = 1;
1611-
kTemperaturemonitoring = 2;
1611+
kTemperatureMonitoring = 2;
16121612
kOpticalLuminanceMonitoringAndFeedback = 3;
16131613
kOpticalColorMonitoringAndFeedback = 4;
16141614
}

examples/lighting-app/lighting-common/lighting-app.matter

+1-1
Original file line numberDiff line numberDiff line change
@@ -2021,7 +2021,7 @@ cluster ColorControl = 768 {
20212021
enum DriftCompensationEnum : enum8 {
20222022
kNone = 0;
20232023
kOtherOrUnknown = 1;
2024-
kTemperaturemonitoring = 2;
2024+
kTemperatureMonitoring = 2;
20252025
kOpticalLuminanceMonitoringAndFeedback = 3;
20262026
kOpticalColorMonitoringAndFeedback = 4;
20272027
}

examples/lighting-app/qpg/zap/light.matter

+1-1
Original file line numberDiff line numberDiff line change
@@ -1636,7 +1636,7 @@ cluster ColorControl = 768 {
16361636
enum DriftCompensationEnum : enum8 {
16371637
kNone = 0;
16381638
kOtherOrUnknown = 1;
1639-
kTemperaturemonitoring = 2;
1639+
kTemperatureMonitoring = 2;
16401640
kOpticalLuminanceMonitoringAndFeedback = 3;
16411641
kOpticalColorMonitoringAndFeedback = 4;
16421642
}

examples/lighting-app/silabs/data_model/lighting-thread-app.matter

+1-1
Original file line numberDiff line numberDiff line change
@@ -1725,7 +1725,7 @@ cluster ColorControl = 768 {
17251725
enum DriftCompensationEnum : enum8 {
17261726
kNone = 0;
17271727
kOtherOrUnknown = 1;
1728-
kTemperaturemonitoring = 2;
1728+
kTemperatureMonitoring = 2;
17291729
kOpticalLuminanceMonitoringAndFeedback = 3;
17301730
kOpticalColorMonitoringAndFeedback = 4;
17311731
}

examples/lighting-app/silabs/data_model/lighting-wifi-app.matter

+1-1
Original file line numberDiff line numberDiff line change
@@ -2016,7 +2016,7 @@ cluster ColorControl = 768 {
20162016
enum DriftCompensationEnum : enum8 {
20172017
kNone = 0;
20182018
kOtherOrUnknown = 1;
2019-
kTemperaturemonitoring = 2;
2019+
kTemperatureMonitoring = 2;
20202020
kOpticalLuminanceMonitoringAndFeedback = 3;
20212021
kOpticalColorMonitoringAndFeedback = 4;
20222022
}

examples/lighting-app/tizen/src/DBusInterface.cpp

+3-4
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ void DBusInterface::SetCurrentLevel(uint8_t value)
9292
light_app_level_control_set_current_level(mIfaceLevelControl, value);
9393
}
9494

95-
void DBusInterface::SetColorMode(chip::app::Clusters::ColorControl::ColorModeEnum colorMode)
95+
void DBusInterface::SetColorMode(chip::app::Clusters::ColorControl::ColorMode colorMode)
9696
{
9797
InternalSetGuard guard(this);
9898
if (light_app_color_control_get_color_mode(mIfaceColorControl) != chip::to_underlying(colorMode))
@@ -217,12 +217,11 @@ void DBusInterface::InitOnOff()
217217
void DBusInterface::InitColor()
218218
{
219219
{
220-
chip::app::Clusters::ColorControl::ColorModeEnum value =
221-
chip::app::Clusters::ColorControl::ColorModeEnum::kCurrentHueAndCurrentSaturation;
220+
auto value = 0;
222221
auto status = Clusters::ColorControl::Attributes::ColorMode::Get(mEndpointId, &value);
223222
VerifyOrReturn(status == Protocols::InteractionModel::Status::Success,
224223
ChipLogError(NotSpecified, "Error getting ColorMode: 0x%x", to_underlying(status)));
225-
light_app_color_control_set_color_mode(mIfaceColorControl, static_cast<guchar>(value));
224+
light_app_color_control_set_color_mode(mIfaceColorControl, value);
226225
}
227226
{
228227
uint16_t value = 0;

examples/lighting-app/tizen/src/DBusInterface.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ class DBusInterface
3939
void Identify(uint16_t time);
4040
void SetOnOff(bool on);
4141
void SetCurrentLevel(uint8_t value);
42-
void SetColorMode(chip::app::Clusters::ColorControl::ColorModeEnum colorMode);
42+
void SetColorMode(chip::app::Clusters::ColorControl::ColorMode colorMode);
4343
void SetColorTemperature(uint16_t value);
4444

4545
private:

examples/lighting-app/tizen/src/main.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ void MatterPostAttributeChangeCallback(const chip::app::ConcreteAttributePath &
103103
switch (attributePath.mAttributeId)
104104
{
105105
case Clusters::ColorControl::Attributes::ColorMode::Id:
106-
sDBusInterface.SetColorMode(static_cast<Clusters::ColorControl::ColorModeEnum>(*value));
106+
sDBusInterface.SetColorMode(static_cast<Clusters::ColorControl::ColorMode>(*value));
107107
break;
108108
case Clusters::ColorControl::Attributes::ColorTemperatureMireds::Id:
109109
VerifyOrDie(size == sizeof(uint16_t));

examples/placeholder/linux/apps/app1/config.matter

+2-2
Original file line numberDiff line numberDiff line change
@@ -5577,7 +5577,7 @@ cluster ColorControl = 768 {
55775577
enum DriftCompensationEnum : enum8 {
55785578
kNone = 0;
55795579
kOtherOrUnknown = 1;
5580-
kTemperaturemonitoring = 2;
5580+
kTemperatureMonitoring = 2;
55815581
kOpticalLuminanceMonitoringAndFeedback = 3;
55825582
kOpticalColorMonitoringAndFeedback = 4;
55835583
}
@@ -5905,7 +5905,7 @@ cluster ColorControl = 768 {
59055905
enum DriftCompensationEnum : enum8 {
59065906
kNone = 0;
59075907
kOtherOrUnknown = 1;
5908-
kTemperaturemonitoring = 2;
5908+
kTemperatureMonitoring = 2;
59095909
kOpticalLuminanceMonitoringAndFeedback = 3;
59105910
kOpticalColorMonitoringAndFeedback = 4;
59115911
}

examples/placeholder/linux/apps/app2/config.matter

+2-2
Original file line numberDiff line numberDiff line change
@@ -5534,7 +5534,7 @@ cluster ColorControl = 768 {
55345534
enum DriftCompensationEnum : enum8 {
55355535
kNone = 0;
55365536
kOtherOrUnknown = 1;
5537-
kTemperaturemonitoring = 2;
5537+
kTemperatureMonitoring = 2;
55385538
kOpticalLuminanceMonitoringAndFeedback = 3;
55395539
kOpticalColorMonitoringAndFeedback = 4;
55405540
}
@@ -5862,7 +5862,7 @@ cluster ColorControl = 768 {
58625862
enum DriftCompensationEnum : enum8 {
58635863
kNone = 0;
58645864
kOtherOrUnknown = 1;
5865-
kTemperaturemonitoring = 2;
5865+
kTemperatureMonitoring = 2;
58665866
kOpticalLuminanceMonitoringAndFeedback = 3;
58675867
kOpticalColorMonitoringAndFeedback = 4;
58685868
}

examples/virtual-device-app/virtual-device-common/virtual-device-app.matter

+1-1
Original file line numberDiff line numberDiff line change
@@ -2872,7 +2872,7 @@ cluster ColorControl = 768 {
28722872
enum DriftCompensationEnum : enum8 {
28732873
kNone = 0;
28742874
kOtherOrUnknown = 1;
2875-
kTemperaturemonitoring = 2;
2875+
kTemperatureMonitoring = 2;
28762876
kOpticalLuminanceMonitoringAndFeedback = 3;
28772877
kOpticalColorMonitoringAndFeedback = 4;
28782878
}

src/app/common/CompatEnumNames.h

+9
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,15 @@ using StepMode = StepModeEnum;
8080
using LevelControlOptions = OptionsBitmap;
8181
} // namespace LevelControl
8282

83+
namespace ColorControl {
84+
// https://github.com/project-chip/connectedhomeip/pull/33612 renamed this
85+
using ColorMode = ColorModeEnum;
86+
using ColorTemperature = ColorTemperatureMireds;
87+
using ColorCapabilities = ColorCapabilitiesBitmap;
88+
using ColorLoopUpdateFlags = UpdateFlagsBitmap;
89+
using ColorLoopAction = ColorLoopActionEnum;
90+
} // namespace ColorControl
91+
8392
namespace RefrigeratorAlarm {
8493
// https://github.com/project-chip/connectedhomeip/pull/31517 renamed this
8594
using AlarmMap = AlarmBitmap;

src/app/zap-templates/zcl/data-model/chip/color-control-cluster.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ limitations under the License.
8686
<cluster code="0x0300"/>
8787
<item name="None" value="0x00"/>
8888
<item name="OtherOrUnknown" value="0x01"/>
89-
<item name="Temperaturemonitoring" value="0x02"/>
89+
<item name="TemperatureMonitoring" value="0x02"/>
9090
<item name="OpticalLuminanceMonitoringAndFeedback" value="0x03"/>
9191
<item name="OpticalColorMonitoringAndFeedback" value="0x04"/>
9292
</enum>

src/controller/data_model/controller-clusters.matter

+1-1
Original file line numberDiff line numberDiff line change
@@ -6933,7 +6933,7 @@ cluster ColorControl = 768 {
69336933
enum DriftCompensationEnum : enum8 {
69346934
kNone = 0;
69356935
kOtherOrUnknown = 1;
6936-
kTemperaturemonitoring = 2;
6936+
kTemperatureMonitoring = 2;
69376937
kOpticalLuminanceMonitoringAndFeedback = 3;
69386938
kOpticalColorMonitoringAndFeedback = 4;
69396939
}

src/controller/python/chip/clusters/Objects.py

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.h

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

zzz_generated/app-common/app-common/zap-generated/cluster-enums-check.h

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

zzz_generated/app-common/app-common/zap-generated/cluster-enums.h

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)