[PHY] Added coding rate to data rate struct
This commit is contained in:
parent
44ffce1725
commit
7dec9477ae
4 changed files with 13 additions and 0 deletions
|
@ -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);
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -8,6 +8,7 @@
|
|||
struct LoRaRate_t {
|
||||
uint8_t spreadingFactor;
|
||||
float bandwidth;
|
||||
uint8_t codingRate;
|
||||
};
|
||||
|
||||
// data rate structure interpretation in case FSK is used
|
||||
|
|
Loading…
Add table
Reference in a new issue