Fixed setFrequencyRaw and setTCXO ignoring module status (#78)
This commit is contained in:
parent
58b56ec3a2
commit
4729b8518b
1 changed files with 2 additions and 5 deletions
|
@ -1042,9 +1042,7 @@ int16_t SX126x::setTCXO(float voltage, uint32_t delay) {
|
||||||
data[3] = (uint8_t)(delayValue & 0xFF);
|
data[3] = (uint8_t)(delayValue & 0xFF);
|
||||||
|
|
||||||
// enable TCXO control on DIO3
|
// enable TCXO control on DIO3
|
||||||
SPIwriteCommand(SX126X_CMD_SET_DIO3_AS_TCXO_CTRL, data, 4);
|
return(SPIwriteCommand(SX126X_CMD_SET_DIO3_AS_TCXO_CTRL, data, 4));
|
||||||
|
|
||||||
return(ERR_NONE);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
int16_t SX126x::setDio2AsRfSwitch(bool enable) {
|
int16_t SX126x::setDio2AsRfSwitch(bool enable) {
|
||||||
|
@ -1252,8 +1250,7 @@ int16_t SX126x::clearDeviceErrors() {
|
||||||
int16_t SX126x::setFrequencyRaw(float freq) {
|
int16_t SX126x::setFrequencyRaw(float freq) {
|
||||||
// calculate raw value
|
// calculate raw value
|
||||||
uint32_t frf = (freq * (uint32_t(1) << SX126X_DIV_EXPONENT)) / SX126X_CRYSTAL_FREQ;
|
uint32_t frf = (freq * (uint32_t(1) << SX126X_DIV_EXPONENT)) / SX126X_CRYSTAL_FREQ;
|
||||||
setRfFrequency(frf);
|
return(setRfFrequency(frf));
|
||||||
return(ERR_NONE);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
int16_t SX126x::fixSensitivity() {
|
int16_t SX126x::fixSensitivity() {
|
||||||
|
|
Loading…
Add table
Reference in a new issue