pull/1302/head
StevenCellist 2024-10-28 14:21:28 +01:00
commit 19b09a0de1
3 zmienionych plików z 15 dodań i 1 usunięć

Wyświetl plik

@ -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;
}

Wyświetl plik

@ -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->lrFhssGridNonFcc = dr.lrFhss.narrowGrid ? RADIOLIB_SX126X_LR_FHSS_GRID_STEP_NON_FCC : RADIOLIB_SX126X_LR_FHSS_GRID_STEP_FCC;
}
return(state);

Wyświetl plik

@ -123,7 +123,7 @@ int16_t SX126x::buildLRFHSSPacket(const uint8_t* in, size_t in_len, uint8_t* out
// interleave the payload into output buffer
uint16_t step = 0;
while(step * step < nb_bits) {
while((size_t)(step * step) < nb_bits) {
// probably the silliest sqrt() I ever saw
step++;
}