Update RadioLib
This commit is contained in:
parent
a8257c0cb2
commit
16bc3e2b42
46 changed files with 1102 additions and 97 deletions
|
|
@ -69,7 +69,15 @@ int16_t SX1279::beginFSK(float freq, float br, float freqDev, float rxBw, int8_t
|
|||
}
|
||||
|
||||
int16_t SX1279::setFrequency(float freq) {
|
||||
RADIOLIB_CHECK_RANGE(freq, 137.0f, 960.0f, RADIOLIB_ERR_INVALID_FREQUENCY);
|
||||
// NOTE: The datasheet specifies Band 2 as 410-480 MHz, but the hardware has been
|
||||
// verified to work down to ~395 MHz. The lower bound is set here to 395 MHz to
|
||||
// accommodate real-world use cases (e.g. TinyGS satellites, radiosondes) while
|
||||
// adding a small margin below the 400 MHz practical limit.
|
||||
if(!(((freq >= 137.0f) && (freq <= 160.0f)) ||
|
||||
((freq >= 395.0f) && (freq <= 480.0f)) ||
|
||||
((freq >= 779.0f) && (freq <= 960.0f)))) {
|
||||
return(RADIOLIB_ERR_INVALID_FREQUENCY);
|
||||
}
|
||||
|
||||
// set frequency and if successful, save the new setting
|
||||
int16_t state = SX127x::setFrequencyRaw(freq);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue