[LR11x0] Skip frequency range verification ()

* Update LR1120.cpp

LR1120 can set the frequency of the documented range. So, allowing another frequency was tested with the LR1121 Lyligo board, which works. Thanks!

* Update LR1120.h

* add RADIOLIB_CHECK_PARAMS

* remove  skipRfValidation parameter

* Fix formating
This commit is contained in:
Yegor Shytikov 2025-01-14 11:56:03 -08:00 committed by GitHub
parent 04b96873a3
commit 4f1d367c93
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -51,11 +51,13 @@ int16_t LR1120::setFrequency(float freq) {
}
int16_t LR1120::setFrequency(float freq, bool skipCalibration, float band) {
#if RADIOLIB_CHECK_PARAMS
if(!(((freq >= 150.0) && (freq <= 960.0)) ||
((freq >= 1900.0) && (freq <= 2200.0)) ||
((freq >= 2400.0) && (freq <= 2500.0)))) {
return(RADIOLIB_ERR_INVALID_FREQUENCY);
}
#endif
// check if we need to recalibrate image
int16_t state;
@ -146,4 +148,4 @@ int16_t LR1120::setModem(ModemType_t modem) {
return(RADIOLIB_ERR_WRONG_MODEM);
}
#endif
#endif