[LR11x0] Added setDatarate for LR-FHSS

This commit is contained in:
jgromes 2024-10-28 14:04:48 +01:00
parent 1c0019ad18
commit f8b66b1cb5

View file

@ -1078,7 +1078,12 @@ int16_t LR11x0::setDataRate(DataRate_t dr) {
state = this->setCodingRate(dr.lora.codingRate);
} else if(type == RADIOLIB_LR11X0_PACKET_TYPE_LR_FHSS) {
// set the basic config
state = this->setLrFhssConfig(dr.lrFhss.bw, dr.lrFhss.cr);
RADIOLIB_ASSERT(state);
// set hopping grid
this->lrFhssGrid = dr.lrFhss.narrowGrid ? RADIOLIB_LR11X0_LR_FHSS_GRID_STEP_NON_FCC : RADIOLIB_LR11X0_LR_FHSS_GRID_STEP_FCC;
}