[SX126x] Fixed typo
This commit is contained in:
parent
14302537ee
commit
f1c9423035
2 changed files with 8 additions and 8 deletions
|
@ -116,7 +116,7 @@ int16_t SX126x::beginFSK(float br, float freqDev, float rxBw, uint16_t preambleL
|
|||
|
||||
// initialize configuration variables (will be overwritten during public settings configuration)
|
||||
this->bitRate = 21333; // 48.0 kbps
|
||||
this->freqencyDev = 52428; // 50.0 kHz
|
||||
this->frequencyDev = 52428; // 50.0 kHz
|
||||
this->rxBandwidth = RADIOLIB_SX126X_GFSK_RX_BW_156_2;
|
||||
this->rxBandwidthKhz = 156.2;
|
||||
this->pulseShape = RADIOLIB_SX126X_GFSK_FILTER_GAUSS_0_5;
|
||||
|
@ -871,10 +871,10 @@ int16_t SX126x::setFrequencyDeviation(float freqDev) {
|
|||
uint32_t freqDevRaw = (uint32_t)(((newFreqDev * 1000.0) * (float)((uint32_t)(1) << 25)) / (RADIOLIB_SX126X_CRYSTAL_FREQ * 1000000.0));
|
||||
|
||||
// check modulation parameters
|
||||
this->freqencyDev = freqDevRaw;
|
||||
this->frequencyDev = freqDevRaw;
|
||||
|
||||
// update modulation parameters
|
||||
return(setModulationParamsFSK(this->bitRate, this->pulseShape, this->rxBandwidth, this->freqencyDev));
|
||||
return(setModulationParamsFSK(this->bitRate, this->pulseShape, this->rxBandwidth, this->frequencyDev));
|
||||
}
|
||||
|
||||
int16_t SX126x::setBitRate(float br) {
|
||||
|
@ -895,7 +895,7 @@ int16_t SX126x::setBitRate(float br) {
|
|||
this->bitRate = brRaw;
|
||||
|
||||
// update modulation parameters
|
||||
return(setModulationParamsFSK(this->bitRate, this->pulseShape, this->rxBandwidth, this->freqencyDev));
|
||||
return(setModulationParamsFSK(this->bitRate, this->pulseShape, this->rxBandwidth, this->frequencyDev));
|
||||
}
|
||||
|
||||
int16_t SX126x::setRxBandwidth(float rxBw) {
|
||||
|
@ -905,7 +905,7 @@ int16_t SX126x::setRxBandwidth(float rxBw) {
|
|||
}
|
||||
|
||||
// check modulation parameters
|
||||
/*if(2 * this->freqencyDev + this->bitRate > rxBw * 1000.0) {
|
||||
/*if(2 * this->frequencyDev + this->bitRate > rxBw * 1000.0) {
|
||||
return(RADIOLIB_ERR_INVALID_MODULATION_PARAMETERS);
|
||||
}*/
|
||||
this->rxBandwidthKhz = rxBw;
|
||||
|
@ -958,7 +958,7 @@ int16_t SX126x::setRxBandwidth(float rxBw) {
|
|||
}
|
||||
|
||||
// update modulation parameters
|
||||
return(setModulationParamsFSK(this->bitRate, this->pulseShape, this->rxBandwidth, this->freqencyDev));
|
||||
return(setModulationParamsFSK(this->bitRate, this->pulseShape, this->rxBandwidth, this->frequencyDev));
|
||||
}
|
||||
|
||||
int16_t SX126x::setRxBoostedGainMode(bool rxbgm, bool persist) {
|
||||
|
@ -1026,7 +1026,7 @@ int16_t SX126x::setDataShaping(uint8_t sh) {
|
|||
}
|
||||
|
||||
// update modulation parameters
|
||||
return(setModulationParamsFSK(this->bitRate, this->pulseShape, this->rxBandwidth, this->freqencyDev));
|
||||
return(setModulationParamsFSK(this->bitRate, this->pulseShape, this->rxBandwidth, this->frequencyDev));
|
||||
}
|
||||
|
||||
int16_t SX126x::setSyncWord(uint8_t* syncWord, uint8_t len) {
|
||||
|
|
|
@ -1067,7 +1067,7 @@ class SX126x: public PhysicalLayer {
|
|||
float bandwidthKhz = 0;
|
||||
bool ldroAuto = true;
|
||||
|
||||
uint32_t bitRate = 0, freqencyDev = 0;
|
||||
uint32_t bitRate = 0, frequencyDev = 0;
|
||||
uint8_t rxBandwidth = 0, pulseShape = 0, crcTypeFSK = 0, syncWordLength = 0, addrComp = 0, whitening = 0, packetType = 0;
|
||||
uint16_t preambleLengthFSK = 0;
|
||||
float rxBandwidthKhz = 0;
|
||||
|
|
Loading…
Add table
Reference in a new issue