Skip to content

Commit

Permalink
[SX126x] Added setDatarate for LR-FHSS
Browse files Browse the repository at this point in the history
  • Loading branch information
jgromes committed Oct 28, 2024
1 parent f8b66b1 commit e2fd3f7
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/modules/SX126x/SX126x.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1048,6 +1048,15 @@ int16_t SX126x::setDataRate(DataRate_t dr) {

// set the coding rate
state = this->setCodingRate(dr.lora.codingRate);

} else if(modem == RADIOLIB_SX126X_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_SX126X_LR_FHSS_GRID_STEP_NON_FCC : RADIOLIB_SX126X_LR_FHSS_GRID_STEP_FCC;

}

return(state);
Expand Down

0 comments on commit e2fd3f7

Please sign in to comment.