Skip to content

Commit 7281fda

Browse files
Improve beam flag parsing with explicit boolean conversion
Co-authored-by: silabs-JulienT <[email protected]>
1 parent 7333deb commit 7281fda

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

applications/zpc/components/zwave_api/src/zwapi_protocol_rx_dispatch.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -425,8 +425,8 @@ void zwave_api_protocol_rx_dispatch(uint8_t *pData, uint16_t len)
425425
txStatusReport.last_route_repeaters[3] = *p++;
426426

427427
// Byte 16, beam and last route speed
428-
txStatusReport.beam_1000ms = (*p) & (1 << 6);
429-
txStatusReport.beam_250ms = (*p) & (1 << 5);
428+
txStatusReport.beam_1000ms = ((*p) & (1 << 6)) != 0;
429+
txStatusReport.beam_250ms = ((*p) & (1 << 5)) != 0;
430430
txStatusReport.last_route_speed = (*p++) & 0x7;
431431

432432
txStatusReport.routing_attempts = *p++;

0 commit comments

Comments
 (0)