You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Fix beam_250ms and beam_1000ms flags always set to true
Problem: The beam_250ms and beam_1000ms fields in zwapi_tx_report_t
are incorrectly parsed from the Z-Wave module response, causing both
flags to always be reported as true regardless of whether beaming was
actually used during transmission.
Root Cause: In
applications/zpc/components/zwave_api/src/zwapi_protocol_rx_dispatch.c
at lines 428-429, the code uses bitwise OR (|) operator instead of
bitwise AND (&) operator when extracting beam flags from the received
byte. The OR operator sets the bits instead of testing them, resulting
in non-zero (true) values regardless of the actual bit state in the
received data.
These buggy lines were introduced in ver_1.0.2_cert-123-g914bebeb30.
Solution: Changed the bitwise operations to correctly test the bit flags:
txStatusReport.beam_1000ms = (*p & (1 << 6)) != 0; // Test bit 6
txStatusReport.beam_250ms = (*p & (1 << 5)) != 0; // Test bit 5
Testing: Added comprehensive test cases covering all beam flag
combinations to verify the flags now correctly reflect the actual
beaming usage from the Z-Wave module response.
Co-authored-by: 198982749+Copilot@users.noreply.github.com
Origin: #150
Thanks-to: Umer Qureshi @umer-iapts
Relate-to: #149
Bug-SiliconLabs: UIC-1061
Bug-SiliconLabs: UIC-1294
0 commit comments