Closed mmt-10 closed 1 year ago
@mmt-10 The representation of spec "null" for an 8-bit unsigned integer/enum value in MatterPostAttributeChangeCallback is 0xFF
.
"null" does not mean "0"; it means "not a value". The spec reserves some value space of this purpose, note: 0xFF is not a valid value for a nullable enum8 or uint8 or anything derived from them.
@bzbarsky-apple Thank you for your reply. I understand it.
When I read PercentSetting
after FanMode
was set Auto
, PercentSetting
is 0
.
However, MatterPostAttributeChangeCallback is 0xFF
.
So, I confused.
When I read PercentSetting after FanMode was set Auto, PercentSetting is 0.
That is strange... How are you reading it, exactly?
Reproduction steps
FanMode
Attribute onFanControl
Cluster to Auto(0x05)FanMode
was set toAuto
, then void MatterFanControlClusterServerAttributeChangedCallback(const app::ConcreteAttributePath & attributePath) setPercentSetting
to NULL. However,void MatterPostAttributeChangeCallback(const chip::app::ConcreteAttributePath & attributePath, uint8_t type, uint16_t size, uint8_t * value)
*value
is0xFF
.As my understanding,
*value
should be0x00
. How do I resolve it?Bug prevalence
always
GitHub hash of the SDK that was being used
commit 8f66f4215bc0708efc8cc73bda80620e67d8955f (HEAD, tag: v1.1.0.1)
Platform
core
Platform Version(s)
No response
Type
Common Cluster Logic
Anything else?
No response