ttn-esp32 icon indicating copy to clipboard operation
ttn-esp32 copied to clipboard

fix configPower for sx1272

Open FrancoLiberali opened this issue 3 years ago • 0 comments

The function configPower is not compiling when using CFG_sx1272_radio. The error is the following:

ttn-esp32/src/lmic/radio.c: In function 'configPower':
ttn-esp32/src/lmic/radio.c:673:15: error: 'eff_pw' may be used uninitialized in this function [-Werror=maybe-uninitialized]
     } else if (eff_pw >= 14) {
               ^
cc1: some warnings being treated as errors

To fix it, I followed the logic that I saw it is executed when using CFG_sx1276_radio, where the value of eff_pw depends of req_pw and no of its own value.

FrancoLiberali avatar Jul 29 '22 13:07 FrancoLiberali