[SX126x] Fix image calibration (#1051)
This commit is contained in:
parent
5d741779a1
commit
a387b3b706
1 changed files with 6 additions and 1 deletions
|
@ -1841,8 +1841,13 @@ int16_t SX126x::setRfFrequency(uint32_t frf) {
|
|||
return(this->mod->SPIwriteStream(RADIOLIB_SX126X_CMD_SET_RF_FREQUENCY, data, 4));
|
||||
}
|
||||
|
||||
int16_t SX126x::calibrateImage(float freqMin, float freqMax) {
|
||||
int16_t SX126x::calibrateImageRejection(float freqMin, float freqMax) {
|
||||
// calculate the calibration coefficients and calibrate image
|
||||
uint8_t data[] = { (uint8_t)floor((freqMin - 1.0f) / 4.0f), (uint8_t)ceil((freqMax + 1.0f) / 4.0f) };
|
||||
return(this->calibrateImage(data));
|
||||
}
|
||||
|
||||
int16_t SX126x::calibrateImage(uint8_t* data) {
|
||||
int16_t state = this->mod->SPIwriteStream(RADIOLIB_SX126X_CMD_CALIBRATE_IMAGE, data, 2);
|
||||
|
||||
// if something failed, show the device errors
|
||||
|
|
Loading…
Add table
Reference in a new issue