From 5efdeedd67f1ea015887d3cd82559acfba7a6c03 Mon Sep 17 00:00:00 2001 From: jgromes Date: Sun, 6 Nov 2022 22:51:21 +0100 Subject: [PATCH] [SX1262] Fixed allowed output power range (-9 dBm minimum). --- src/modules/SX126x/SX1262.cpp | 2 +- src/modules/SX126x/SX1262.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/modules/SX126x/SX1262.cpp b/src/modules/SX126x/SX1262.cpp index 076f2a77..1a2a60d3 100644 --- a/src/modules/SX126x/SX1262.cpp +++ b/src/modules/SX126x/SX1262.cpp @@ -82,7 +82,7 @@ int16_t SX1262::setFrequency(float freq, bool calibrate) { } int16_t SX1262::setOutputPower(int8_t power) { - RADIOLIB_CHECK_RANGE(power, -17, 22, RADIOLIB_ERR_INVALID_OUTPUT_POWER); + RADIOLIB_CHECK_RANGE(power, -9, 22, RADIOLIB_ERR_INVALID_OUTPUT_POWER); // get current OCP configuration uint8_t ocp = 0; diff --git a/src/modules/SX126x/SX1262.h b/src/modules/SX126x/SX1262.h index fc6e221d..cac19280 100644 --- a/src/modules/SX126x/SX1262.h +++ b/src/modules/SX126x/SX1262.h @@ -96,7 +96,7 @@ class SX1262: public SX126x { int16_t setFrequency(float freq, bool calibrate); /*! - \brief Sets output power. Allowed values are in range from -17 to 22 dBm. + \brief Sets output power. Allowed values are in range from -9 to 22 dBm. This method is virtual to allow override from the SX1261 class. \param power Output power to be set in dBm.