Merge pull request #623 from rfquack/master

No bound checks on frequency deviation if ~OOK
This commit is contained in:
Jan Gromeš 2022-11-27 18:36:29 +01:00 committed by GitHub
commit b9a7116113
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -506,7 +506,10 @@ int16_t CC1101::setFrequencyDeviation(float freqDev) {
newFreqDev = 1.587;
}
// check range unless 0 (special value)
if (freqDev != 0) {
RADIOLIB_CHECK_RANGE(newFreqDev, 1.587, 380.8, RADIOLIB_ERR_INVALID_FREQUENCY_DEVIATION);
}
// set mode to standby
SPIsendCommand(RADIOLIB_CC1101_CMD_IDLE);