Skip to content

Commit

Permalink
[LR11x0] Fix virtual method hiding (#679)
Browse files Browse the repository at this point in the history
  • Loading branch information
jgromes committed Apr 14, 2024
1 parent 7bb747f commit 4a6e182
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
4 changes: 4 additions & 0 deletions src/modules/LR11x0/LR1110.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
10 changes: 8 additions & 2 deletions src/modules/LR11x0/LR1110.h
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit 4a6e182

Please sign in to comment.