diff --git a/src/modules/LR11x0/LR1110.cpp b/src/modules/LR11x0/LR1110.cpp index a540ce5c..4dbce1b2 100644 --- a/src/modules/LR11x0/LR1110.cpp +++ b/src/modules/LR11x0/LR1110.cpp @@ -48,6 +48,10 @@ int16_t LR1110::setFrequency(float freq, bool calibrate, float band) { return(LR11x0::setRfFrequency((uint32_t)(freq*1000000.0f))); } +int16_t LR1110::setOutputPower(int8_t power) { + return(this->setOutputPower(power, false)); +} + int16_t LR1110::setOutputPower(int8_t power, bool forceHighPower) { // determine whether to use HP or LP PA and check range accordingly bool useHp = forceHighPower || (power > 14); diff --git a/src/modules/LR11x0/LR1110.h b/src/modules/LR11x0/LR1110.h index 636724e6..e122f00e 100644 --- a/src/modules/LR11x0/LR1110.h +++ b/src/modules/LR11x0/LR1110.h @@ -73,16 +73,22 @@ class LR1110: public LR11x0 { \returns \ref status_codes */ int16_t setFrequency(float freq, bool calibrate, float band = 4); + + /*! + \brief Sets output power. Allowed values are in range from -9 to 22 dBm (high-power PA) or -17 to 14 dBm (low-power PA). + \param power Output power to be set in dBm, output PA is determined automatically preferring the low-power PA. + \returns \ref status_codes + */ + int16_t setOutputPower(int8_t power); /*! \brief Sets output power. Allowed values are in range from -9 to 22 dBm (high-power PA) or -17 to 14 dBm (low-power PA). \param power Output power to be set in dBm. \param forceHighPower Force using the high-power PA. If set to false, PA will be determined automatically based on configured output power, preferring the low-power PA. If set to true, only high-power PA will be used. - Defaults to false. \returns \ref status_codes */ - int16_t setOutputPower(int8_t power, bool forceHighPower = false); + int16_t setOutputPower(int8_t power, bool forceHighPower); #if !RADIOLIB_GODMODE private: