Skip to content

Commit

Permalink
[SX127x] Fix lower power range of RFO (#1412)
Browse files Browse the repository at this point in the history
  • Loading branch information
jgromes committed Feb 2, 2025
1 parent 33fd649 commit 9e83252
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/modules/SX127x/SX1278.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
4 changes: 2 additions & 2 deletions src/modules/SX127x/SX1278.h
Original file line number Diff line number Diff line change
Expand Up @@ -202,15 +202,15 @@ 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
*/
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.
Expand Down

0 comments on commit 9e83252

Please sign in to comment.