Update SX1262.cpp
This commit is contained in:
parent
9047d4fe4b
commit
6f03d77dad
1 changed files with 5 additions and 4 deletions
|
@ -5,9 +5,9 @@ SX1262::SX1262(Module* mod) : SX126x(mod) {
|
||||||
chipType = RADIOLIB_SX1262_CHIP_TYPE;
|
chipType = RADIOLIB_SX1262_CHIP_TYPE;
|
||||||
}
|
}
|
||||||
|
|
||||||
int16_t SX1262::begin(float freq, float bw, uint8_t sf, uint8_t cr, uint8_t syncWord, int8_t power, uint16_t preambleLength, float tcxoVoltage, bool useRegulatorLDO, int8_t rampTime) {
|
int16_t SX1262::begin(float freq, float bw, uint8_t sf, uint8_t cr, uint8_t syncWord, int8_t power, uint16_t preambleLength, float tcxoVoltage, bool useRegulatorLDO, uint8_t rampTime) {
|
||||||
// execute common part
|
// execute common part
|
||||||
int16_t state = SX126x::begin(cr, syncWord, preambleLength, tcxoVoltage, useRegulatorLDO, rampTime);
|
int16_t state = SX126x::begin(cr, syncWord, preambleLength, tcxoVoltage, useRegulatorLDO);
|
||||||
RADIOLIB_ASSERT(state);
|
RADIOLIB_ASSERT(state);
|
||||||
|
|
||||||
// configure publicly accessible settings
|
// configure publicly accessible settings
|
||||||
|
@ -29,7 +29,7 @@ int16_t SX1262::begin(float freq, float bw, uint8_t sf, uint8_t cr, uint8_t sync
|
||||||
return(state);
|
return(state);
|
||||||
}
|
}
|
||||||
|
|
||||||
int16_t SX1262::beginFSK(float freq, float br, float freqDev, float rxBw, int8_t power, uint16_t preambleLength, float tcxoVoltage, bool useRegulatorLDO) {
|
int16_t SX1262::beginFSK(float freq, float br, float freqDev, float rxBw, int8_t power, uint16_t preambleLength, float tcxoVoltage, bool useRegulatorLDO, uint8_t rampTime)) {
|
||||||
// execute common part
|
// execute common part
|
||||||
int16_t state = SX126x::beginFSK(br, freqDev, rxBw, preambleLength, tcxoVoltage, useRegulatorLDO);
|
int16_t state = SX126x::beginFSK(br, freqDev, rxBw, preambleLength, tcxoVoltage, useRegulatorLDO);
|
||||||
RADIOLIB_ASSERT(state);
|
RADIOLIB_ASSERT(state);
|
||||||
|
@ -41,7 +41,7 @@ int16_t SX1262::beginFSK(float freq, float br, float freqDev, float rxBw, int8_t
|
||||||
state = SX126x::fixPaClamping();
|
state = SX126x::fixPaClamping();
|
||||||
RADIOLIB_ASSERT(state);
|
RADIOLIB_ASSERT(state);
|
||||||
|
|
||||||
state = setOutputPower(power);
|
state = setOutputPower(power, rampTime);
|
||||||
RADIOLIB_ASSERT(state);
|
RADIOLIB_ASSERT(state);
|
||||||
|
|
||||||
return(state);
|
return(state);
|
||||||
|
@ -110,6 +110,7 @@ int16_t SX1262::setOutputPower(int8_t power, uint8_t rampTime) {
|
||||||
RADIOLIB_ASSERT(state);
|
RADIOLIB_ASSERT(state);
|
||||||
|
|
||||||
// set output power and PA ramp time
|
// set output power and PA ramp time
|
||||||
|
// fixme: perform check to see if rampTime is in valid range?
|
||||||
state = SX126x::setTxParams(power, rampTime);
|
state = SX126x::setTxParams(power, rampTime);
|
||||||
RADIOLIB_ASSERT(state);
|
RADIOLIB_ASSERT(state);
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue