[SX127x] Fix lower power range of RFO (#1412)

This commit is contained in:
jgromes 2025-02-02 10:10:13 +01:00
parent 33fd649288
commit 9e832526a5
2 changed files with 4 additions and 4 deletions

View file

@ -344,9 +344,9 @@ int16_t SX1278::checkOutputPower(int8_t power, int8_t* clipped, bool useRfo) {
if(useRfo) {
// RFO output
if(clipped) {
*clipped = RADIOLIB_MAX(-3, RADIOLIB_MIN(15, power));
*clipped = RADIOLIB_MAX(-4, RADIOLIB_MIN(15, power));
}
RADIOLIB_CHECK_RANGE(power, -3, 15, RADIOLIB_ERR_INVALID_OUTPUT_POWER);
RADIOLIB_CHECK_RANGE(power, -4, 15, RADIOLIB_ERR_INVALID_OUTPUT_POWER);
} else {
// PA_BOOST output, check high-power operation
if(clipped) {

View file

@ -202,7 +202,7 @@ class SX1278: public SX127x {
int16_t checkDataRate(DataRate_t dr) override;
/*!
\brief Sets transmission output power. Allowed values range from -3 to 15 dBm (RFO pin) or +2 to +17 dBm (PA_BOOST pin).
\brief Sets transmission output power. Allowed values range from -4 to 15 dBm (RFO pin) or +2 to +17 dBm (PA_BOOST pin).
High power +20 dBm operation is also supported, on the PA_BOOST pin. Defaults to PA_BOOST.
\param power Transmission output power in dBm.
\returns \ref status_codes
@ -210,7 +210,7 @@ class SX1278: public SX127x {
int16_t setOutputPower(int8_t power) override;
/*!
\brief Sets transmission output power. Allowed values range from -3 to 15 dBm (RFO pin) or +2 to +17 dBm (PA_BOOST pin).
\brief Sets transmission output power. Allowed values range from -4 to 15 dBm (RFO pin) or +2 to +17 dBm (PA_BOOST pin).
High power +20 dBm operation is also supported, on the PA_BOOST pin.
\param power Transmission output power in dBm.
\param useRfo Whether to use the RFO (true) or the PA_BOOST (false) pin for the RF output.