fix some random compiler warnings (#9596)

This commit is contained in:
Thomas Göttgens
2026-02-11 06:43:05 -06:00
committed by GitHub
co-authored by GitHub
parent 75f3d123f3
commit f96a8593f2
4 changed files with 12 additions and 7 deletions
+2 -2
View File
@@ -943,9 +943,9 @@ void RadioInterface::limitPower(int8_t loraMaxPower)
}
} else if (!devicestate.owner.is_licensed) {
// we have an array of PA gain values. Find the highest power setting that works.
for (int radio_dbm = 0; radio_dbm < num_pa_points; radio_dbm++) {
for (int radio_dbm = 0; radio_dbm < (int)num_pa_points; radio_dbm++) {
if (((radio_dbm + tx_gain[radio_dbm]) > power) ||
((radio_dbm == (num_pa_points - 1)) && ((radio_dbm + tx_gain[radio_dbm]) <= power))) {
((radio_dbm == (int)(num_pa_points - 1)) && ((radio_dbm + tx_gain[radio_dbm]) <= power))) {
// we've exceeded the power limit, or hit the max we can do
LOG_INFO("Requested Tx power: %d dBm; Device LoRa Tx gain: %d dB", power, tx_gain[radio_dbm]);
power -= tx_gain[radio_dbm];