@@ -77,12 +77,13 @@ CHIP_ERROR EnergyPrefAttrAccess::Read(const ConcreteReadAttributePath & aPath, A
77
77
char buffer[64 ];
78
78
Optional<MutableCharSpan> label{ MutableCharSpan (buffer) };
79
79
if ((err = gsDelegate->GetEnergyBalanceAtIndex (endpoint, index , step, label)) == CHIP_NO_ERROR)
80
- {
81
- BalanceStruct::Type balance = { step,
82
- label.HasValue () ? Optional<CharSpan>(label.Value ()) : Optional<CharSpan>() };
83
- ReturnErrorOnFailure (encoder.Encode (balance));
84
- index ++;
85
- }
80
+ {
81
+ BalanceStruct::Type balance = { step,
82
+ label.HasValue () ? Optional<CharSpan>(label.Value ())
83
+ : Optional<CharSpan>() };
84
+ ReturnErrorOnFailure (encoder.Encode (balance));
85
+ index ++;
86
+ }
86
87
} while (err == CHIP_NO_ERROR);
87
88
88
89
if (err == CHIP_ERROR_NOT_FOUND)
@@ -135,16 +136,17 @@ CHIP_ERROR EnergyPrefAttrAccess::Read(const ConcreteReadAttributePath & aPath, A
135
136
char buffer[64 ];
136
137
Optional<MutableCharSpan> label{ MutableCharSpan (buffer) };
137
138
if ((err = gsDelegate->GetLowPowerModeSensitivityAtIndex (endpoint, index , step, label)) == CHIP_NO_ERROR)
138
- {
139
- BalanceStruct::Type balance = { step,
140
- label.HasValue () ? Optional<CharSpan>(label.Value ()) : Optional<CharSpan>() };
141
- ReturnErrorOnFailure (encoder.Encode (balance));
142
- index ++;
143
- }
139
+ {
140
+ BalanceStruct::Type balance = { step,
141
+ label.HasValue () ? Optional<CharSpan>(label.Value ())
142
+ : Optional<CharSpan>() };
143
+ ReturnErrorOnFailure (encoder.Encode (balance));
144
+ index ++;
145
+ }
144
146
} while (err == CHIP_NO_ERROR);
145
147
if (err == CHIP_ERROR_NOT_FOUND)
146
148
{
147
- return CHIP_NO_ERROR;
149
+ return CHIP_NO_ERROR;
148
150
}
149
151
return err;
150
152
});
0 commit comments