[PHY] Added coding rate to data rate struct

This commit is contained in:
jgromes 2023-09-12 19:06:30 +02:00
parent 44ffce1725
commit 7dec9477ae
4 changed files with 13 additions and 0 deletions

View file

@ -975,6 +975,10 @@ int16_t SX126x::setDataRate(DataRate_t dr) {
// set the bandwidth
state = this->setBandwidth(dr.lora.bandwidth);
RADIOLIB_ASSERT(state);
// set the coding rate
state = this->setCodingRate(dr.lora.codingRate);
}
return(state);

View file

@ -238,6 +238,10 @@ int16_t SX1272::setDataRate(DataRate_t dr) {
// set the bandwidth
state = this->setBandwidth(dr.lora.bandwidth);
RADIOLIB_ASSERT(state);
// set the coding rate
state = this->setCodingRate(dr.lora.codingRate);
}
return(state);

View file

@ -252,6 +252,10 @@ int16_t SX1278::setDataRate(DataRate_t dr) {
// set the bandwidth
state = this->setBandwidth(dr.lora.bandwidth);
RADIOLIB_ASSERT(state);
// set the coding rate
state = this->setCodingRate(dr.lora.codingRate);
}
return(state);

View file

@ -8,6 +8,7 @@
struct LoRaRate_t {
uint8_t spreadingFactor;
float bandwidth;
uint8_t codingRate;
};
// data rate structure interpretation in case FSK is used