From f8b66b1cb5936b12b0a5212a041a67b653636471 Mon Sep 17 00:00:00 2001 From: jgromes Date: Mon, 28 Oct 2024 14:04:48 +0100 Subject: [PATCH] [LR11x0] Added setDatarate for LR-FHSS --- src/modules/LR11x0/LR11x0.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/modules/LR11x0/LR11x0.cpp b/src/modules/LR11x0/LR11x0.cpp index 6d41e3e2..f87a7f88 100644 --- a/src/modules/LR11x0/LR11x0.cpp +++ b/src/modules/LR11x0/LR11x0.cpp @@ -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; }