[LLCC68] Update to 5.0.0

This commit is contained in:
jgromes 2021-11-14 11:43:32 +01:00
parent 8e134a7980
commit a6d901d577

View file

@ -6,23 +6,23 @@ LLCC68::LLCC68(Module* mod) : SX1262(mod) {
}
int16_t LLCC68::setBandwidth(float bw) {
RADIOLIB_CHECK_RANGE(bw, 100.0, 510.0, ERR_INVALID_BANDWIDTH);
RADIOLIB_CHECK_RANGE(bw, 100.0, 510.0, RADIOLIB_ERR_INVALID_BANDWIDTH);
return(SX1262::setBandwidth(bw));
}
int16_t LLCC68::setSpreadingFactor(uint8_t sf) {
switch(SX126x::_bw) {
case SX126X_LORA_BW_125_0:
RADIOLIB_CHECK_RANGE(sf, 5, 9, ERR_INVALID_SPREADING_FACTOR);
case RADIOLIB_SX126X_LORA_BW_125_0:
RADIOLIB_CHECK_RANGE(sf, 5, 9, RADIOLIB_ERR_INVALID_SPREADING_FACTOR);
break;
case SX126X_LORA_BW_250_0:
RADIOLIB_CHECK_RANGE(sf, 5, 10, ERR_INVALID_SPREADING_FACTOR);
case RADIOLIB_SX126X_LORA_BW_250_0:
RADIOLIB_CHECK_RANGE(sf, 5, 10, RADIOLIB_ERR_INVALID_SPREADING_FACTOR);
break;
case SX126X_LORA_BW_500_0:
RADIOLIB_CHECK_RANGE(sf, 5, 11, ERR_INVALID_SPREADING_FACTOR);
case RADIOLIB_SX126X_LORA_BW_500_0:
RADIOLIB_CHECK_RANGE(sf, 5, 11, RADIOLIB_ERR_INVALID_SPREADING_FACTOR);
break;
default:
return(ERR_INVALID_SPREADING_FACTOR);
return(RADIOLIB_ERR_INVALID_SPREADING_FACTOR);
}
return(SX1262::setSpreadingFactor(sf));