Fix potential overflow in rssi_read_cnt

master
Ismael Gomez 3 years ago
parent 420d6a6a98
commit 8fff7f6646

@ -687,7 +687,7 @@ void phy_common::update_measurements(uint32_t cc_idx,
rx_gain_offset = get_radio()->get_rx_gain() + args->rx_gain_offset;
}
rssi_read_cnt++;
if (rssi_read_cnt == 1000) {
if (rssi_read_cnt >= 1000) {
rssi_read_cnt = 0;
}
}

Loading…
Cancel
Save