Skip to content

Commit e810b61

Browse files
committed
Update optional parameters of Step command and matched spec naming. Improved checking on Auto feature when receiving smart mode.
1 parent 4c1a862 commit e810b61

File tree

12 files changed

+50
-29
lines changed

12 files changed

+50
-29
lines changed

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

+2-2
Original file line numberDiff line numberDiff line change
@@ -3233,8 +3233,8 @@ server cluster FanControl = 514 {
32333233

32343234
request struct StepRequest {
32353235
DirectionEnum direction = 0;
3236-
boolean wrap = 1;
3237-
boolean lowestOff = 2;
3236+
optional boolean wrap = 1;
3237+
optional boolean lowestOff = 2;
32383238
}
32393239

32403240
command Step(StepRequest): DefaultSuccess = 0;

examples/chef/devices/rootnode_thermostat_bm3fb8dhYi.matter

+2-2
Original file line numberDiff line numberDiff line change
@@ -1333,8 +1333,8 @@ client cluster FanControl = 514 {
13331333

13341334
request struct StepRequest {
13351335
DirectionEnum direction = 0;
1336-
boolean wrap = 1;
1337-
boolean lowestOff = 2;
1336+
optional boolean wrap = 1;
1337+
optional boolean lowestOff = 2;
13381338
}
13391339

13401340
/** The Step command speeds up or slows down the fan, in steps. */

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

+3-2
Original file line numberDiff line numberDiff line change
@@ -125,8 +125,9 @@ MatterFanControlClusterServerPreAttributeChangedCallback(const ConcreteAttribute
125125
{
126126
FanModeSequenceType fanModeSequence;
127127
FanModeSequence::Get(attributePath.mEndpointId, &fanModeSequence);
128-
if ((fanModeSequence == FanModeSequenceType::kOffLowHighAuto) ||
129-
(fanModeSequence == FanModeSequenceType::kOffLowMedHighAuto))
128+
if (SupportsAuto(attributePath.mEndpointId) &&
129+
((fanModeSequence == FanModeSequenceType::kOffLowHighAuto) ||
130+
(fanModeSequence == FanModeSequenceType::kOffLowMedHighAuto)))
130131
{
131132
*value = static_cast<uint8_t>(FanModeType::kAuto);
132133
}

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

+3-3
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ limitations under the License.
2424
<field name="Rocking" mask="0x04" />
2525
<field name="Wind" mask="0x08" />
2626
<field name="Step" mask="0x10" />
27-
<field name="Airflow-Direction" mask="0x20" />
27+
<field name="Airflow Direction" mask="0x20" />
2828
</bitmap>
2929

3030
<enum name="FanModeType" type="ENUM8">
@@ -105,8 +105,8 @@ limitations under the License.
105105
<command source="client" code="0x00" name="Step" optional="true">
106106
<description>The Step command speeds up or slows down the fan, in steps.</description>
107107
<arg name="Direction" type="DirectionEnum"/>
108-
<arg name="Wrap" type="boolean"/>
109-
<arg name="LowestOff" type="boolean"/>
108+
<arg name="Wrap" type="boolean" optional="true"/>
109+
<arg name="LowestOff" type="boolean" optional="true"/>
110110
</command>
111111

112112
</cluster>

src/controller/data_model/controller-clusters.matter

+2-2
Original file line numberDiff line numberDiff line change
@@ -3603,8 +3603,8 @@ client cluster FanControl = 514 {
36033603

36043604
request struct StepRequest {
36053605
DirectionEnum direction = 0;
3606-
boolean wrap = 1;
3607-
boolean lowestOff = 2;
3606+
optional boolean wrap = 1;
3607+
optional boolean lowestOff = 2;
36083608
}
36093609

36103610
/** The Step command speeds up or slows down the fan, in steps. */

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

+4-4
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.mm

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

src/darwin/Framework/CHIP/zap-generated/MTRClusters.mm

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

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

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

src/darwin/Framework/CHIP/zap-generated/MTRCommandPayloadsObjc.mm

+2-2
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-objects.h

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

zzz_generated/darwin-framework-tool/zap-generated/cluster/Commands.h

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

0 commit comments

Comments
 (0)