Skip to content

Commit b163057

Browse files
author
Hasnain Virk
committed
Verifying datarate bug fix
A patch was missed from the feature PR. verify_channel_DR() in LoRaPHY class had a loop with uninitialized loop counter.
1 parent 636ced8 commit b163057

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

features/lorawan/lorastack/phy/LoRaPHY.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,7 @@ bool LoRaPHY::verify_channel_DR(uint8_t nb_channels, uint16_t* channel_mask,
159159
return false;
160160
}
161161

162-
for (uint8_t i; i < phy_params.max_channel_cnt; i++) {
162+
for (uint8_t i = 0; i < phy_params.max_channel_cnt; i++) {
163163
if (mask_bit_test(channel_mask, i)) {
164164
// Check datarate validity for enabled channels
165165
if (val_in_range(dr, (channels[i].dr_range.fields.min & 0x0F),

0 commit comments

Comments
 (0)