Skip to content

Commit 3c4c635

Browse files
committed
Regen zap, update code to reflect the updated return from Feature::Get
1 parent 17efda7 commit 3c4c635

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

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

+1-1
Original file line numberDiff line numberDiff line change
@@ -4456,7 +4456,7 @@ provisional cluster EnergyEvse = 153 {
44564456
}
44574457

44584458
/** This cluster provides an interface to specify preferences for how devices should consume energy. */
4459-
cluster EnergyPreference = 155 {
4459+
provisional cluster EnergyPreference = 155 {
44604460
revision 1;
44614461

44624462
enum EnergyPriorityEnum : enum8 {

src/app/clusters/energy-preference-server/energy-preference-server.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ CHIP_ERROR EnergyPrefAttrAccess::Read(const ConcreteReadAttributePath & aPath, A
5454
VerifyOrDie(aPath.mClusterId == EnergyPreference::Id);
5555
EndpointId endpoint = aPath.mEndpointId;
5656
uint32_t ourFeatureMap;
57-
const bool featureMapIsGood = FeatureMap::Get(aPath.mEndpointId, &ourFeatureMap) == EMBER_ZCL_STATUS_SUCCESS;
57+
const bool featureMapIsGood = FeatureMap::Get(aPath.mEndpointId, &ourFeatureMap) == Status::Success;
5858
const bool balanceSupported = featureMapIsGood && ((ourFeatureMap & to_underlying(Feature::kEnergyBalance)) != 0);
5959
const bool lowPowerSupported = featureMapIsGood && ((ourFeatureMap & to_underlying(Feature::kLowPowerModeSensitivity)) != 0);
6060

@@ -171,7 +171,7 @@ Status MatterEnergyPreferenceClusterServerPreAttributeChangedCallback(const Conc
171171
EndpointId endpoint = attributePath.mEndpointId;
172172
Delegate * delegate = GetDelegate();
173173
uint32_t ourFeatureMap;
174-
const bool featureMapIsGood = FeatureMap::Get(attributePath.mEndpointId, &ourFeatureMap) == EMBER_ZCL_STATUS_SUCCESS;
174+
const bool featureMapIsGood = FeatureMap::Get(attributePath.mEndpointId, &ourFeatureMap) == Status::Success;
175175
const bool balanceSupported = featureMapIsGood && ((ourFeatureMap & to_underlying(Feature::kEnergyBalance)) != 0);
176176
const bool lowPowerSupported = featureMapIsGood && ((ourFeatureMap & to_underlying(Feature::kLowPowerModeSensitivity)) != 0);
177177

0 commit comments

Comments
 (0)