kopia lustrzana https://github.com/jgromes/RadioLib
Merge branch 'master' of https://github.com/jgromes/RadioLib
commit
19b09a0de1
|
@ -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;
|
||||
|
||||
}
|
||||
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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++;
|
||||
}
|
||||
|
|
Ładowanie…
Reference in New Issue