From d4748161945b3425215c52b3c0e0e94402c979af Mon Sep 17 00:00:00 2001 From: Yegor Shytikov Date: Mon, 13 Jan 2025 15:02:51 -0800 Subject: [PATCH] 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! --- src/modules/LR11x0/LR1120.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/modules/LR11x0/LR1120.cpp b/src/modules/LR11x0/LR1120.cpp index fb627822..d066357a 100644 --- a/src/modules/LR11x0/LR1120.cpp +++ b/src/modules/LR11x0/LR1120.cpp @@ -50,8 +50,8 @@ int16_t LR1120::setFrequency(float freq) { return(this->setFrequency(freq, false)); } -int16_t LR1120::setFrequency(float freq, bool skipCalibration, float band) { - if(!(((freq >= 150.0) && (freq <= 960.0)) || +int16_t LR1120::setFrequency(float freq, bool skipCalibration, float band, bool skipRfValidation) { + if(!skipRfValidation && !(((freq >= 150.0) && (freq <= 960.0)) || ((freq >= 1900.0) && (freq <= 2200.0)) || ((freq >= 2400.0) && (freq <= 2500.0)))) { return(RADIOLIB_ERR_INVALID_FREQUENCY); @@ -146,4 +146,4 @@ int16_t LR1120::setModem(ModemType_t modem) { return(RADIOLIB_ERR_WRONG_MODEM); } -#endif \ No newline at end of file +#endif