No bound checks on frequency deviation if ~FSK
This commit is contained in:
parent
8c37da0720
commit
befba28629
1 changed files with 3 additions and 1 deletions
|
@ -506,7 +506,9 @@ int16_t CC1101::setFrequencyDeviation(float freqDev) {
|
||||||
newFreqDev = 1.587;
|
newFreqDev = 1.587;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (_modulation != RADIOLIB_CC1101_MOD_FORMAT_ASK_OOK) {
|
||||||
RADIOLIB_CHECK_RANGE(newFreqDev, 1.587, 380.8, RADIOLIB_ERR_INVALID_FREQUENCY_DEVIATION);
|
RADIOLIB_CHECK_RANGE(newFreqDev, 1.587, 380.8, RADIOLIB_ERR_INVALID_FREQUENCY_DEVIATION);
|
||||||
|
}
|
||||||
|
|
||||||
// set mode to standby
|
// set mode to standby
|
||||||
SPIsendCommand(RADIOLIB_CC1101_CMD_IDLE);
|
SPIsendCommand(RADIOLIB_CC1101_CMD_IDLE);
|
||||||
|
|
Loading…
Add table
Reference in a new issue