[SX126x] Removed setOptimalHiPowerPaConfig
This commit is contained in:
parent
2ef331ed9c
commit
f316920bab
4 changed files with 0 additions and 35 deletions
|
@ -84,12 +84,6 @@ int16_t SX1262::setOutputPower(int8_t power) {
|
|||
int16_t state = readRegister(SX126X_REG_OCP_CONFIGURATION, &ocp, 1);
|
||||
RADIOLIB_ASSERT(state);
|
||||
|
||||
// this function sets the optimal PA settings
|
||||
// and adjusts power based on the PA settings chosen
|
||||
// so that output power matches requested power.
|
||||
state = SX126x::setOptimalHiPowerPaConfig(&power);
|
||||
RADIOLIB_ASSERT(state);
|
||||
|
||||
// set output power
|
||||
// TODO power ramp time configuration
|
||||
state = SX126x::setTxParams(power);
|
||||
|
|
|
@ -77,10 +77,6 @@ int16_t SX1268::setOutputPower(int8_t power) {
|
|||
int16_t state = readRegister(SX126X_REG_OCP_CONFIGURATION, &ocp, 1);
|
||||
RADIOLIB_ASSERT(state);
|
||||
|
||||
// enable optimal PA - this changes the value of power.
|
||||
state = SX126x::setOptimalHiPowerPaConfig(&power);
|
||||
RADIOLIB_ASSERT(state);
|
||||
|
||||
// set output power
|
||||
// TODO power ramp time configuration
|
||||
state = SX126x::setTxParams(power);
|
||||
|
|
|
@ -1229,30 +1229,6 @@ int16_t SX126x::setTxParams(uint8_t power, uint8_t rampTime) {
|
|||
return(SPIwriteCommand(SX126X_CMD_SET_TX_PARAMS, data, 2));
|
||||
}
|
||||
|
||||
int16_t SX126x::setOptimalHiPowerPaConfig(int8_t * inOutPower) {
|
||||
// set PA config for optimal consumption as described in section 13-21 of SX1268 datasheet v1.1
|
||||
// the final column of Table 13-21 suggests that the value passed in SetTxParams
|
||||
// is actually scaled depending on the parameters of setPaConfig
|
||||
int16_t state;
|
||||
if (*inOutPower >= 21) {
|
||||
state = SX126x::setPaConfig(0x04, SX126X_PA_CONFIG_SX1262_8, SX126X_PA_CONFIG_HP_MAX/*0x07*/);
|
||||
}
|
||||
else if (*inOutPower >= 18) {
|
||||
state = SX126x::setPaConfig(0x03, SX126X_PA_CONFIG_SX1262_8, 0x05);
|
||||
// datasheet instructs request 22 dBm for 20 dBm actual output power
|
||||
*inOutPower += 2;
|
||||
} else if (*inOutPower >= 15) {
|
||||
state = SX126x::setPaConfig(0x02, SX126X_PA_CONFIG_SX1262_8, 0x03);
|
||||
// datasheet instructs request 22 dBm for 17 dBm actual output power
|
||||
*inOutPower += 5;
|
||||
} else {
|
||||
state = SX126x::setPaConfig(0x02, SX126X_PA_CONFIG_SX1262_8, 0x02);
|
||||
// datasheet instructs request 22 dBm for 14 dBm actual output power.
|
||||
*inOutPower += 8;
|
||||
}
|
||||
return state;
|
||||
}
|
||||
|
||||
int16_t SX126x::setPacketMode(uint8_t mode, uint8_t len) {
|
||||
// check active modem
|
||||
if(getPacketType() != SX126X_PACKET_TYPE_GFSK) {
|
||||
|
|
|
@ -853,7 +853,6 @@ class SX126x: public PhysicalLayer {
|
|||
|
||||
int16_t startReceiveCommon();
|
||||
int16_t setFrequencyRaw(float freq);
|
||||
int16_t setOptimalHiPowerPaConfig(int8_t* inOutPower);
|
||||
int16_t setPacketMode(uint8_t mode, uint8_t len);
|
||||
int16_t setHeaderType(uint8_t headerType, size_t len = 0xFF);
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue