Update SX1262.cpp

This commit is contained in:
S5NC 2024-04-05 11:59:31 +01:00 committed by GitHub
parent 9047d4fe4b
commit 6f03d77dad
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -5,9 +5,9 @@ SX1262::SX1262(Module* mod) : SX126x(mod) {
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
int16_t state = SX126x::begin(cr, syncWord, preambleLength, tcxoVoltage, useRegulatorLDO, rampTime);
int16_t state = SX126x::begin(cr, syncWord, preambleLength, tcxoVoltage, useRegulatorLDO);
RADIOLIB_ASSERT(state);
// 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);
}
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
int16_t state = SX126x::beginFSK(br, freqDev, rxBw, preambleLength, tcxoVoltage, useRegulatorLDO);
RADIOLIB_ASSERT(state);
@ -41,7 +41,7 @@ int16_t SX1262::beginFSK(float freq, float br, float freqDev, float rxBw, int8_t
state = SX126x::fixPaClamping();
RADIOLIB_ASSERT(state);
state = setOutputPower(power);
state = setOutputPower(power, rampTime);
RADIOLIB_ASSERT(state);
return(state);
@ -110,6 +110,7 @@ int16_t SX1262::setOutputPower(int8_t power, uint8_t rampTime) {
RADIOLIB_ASSERT(state);
// set output power and PA ramp time
// fixme: perform check to see if rampTime is in valid range?
state = SX126x::setTxParams(power, rampTime);
RADIOLIB_ASSERT(state);