mirror of
https://github.com/meshtastic/firmware.git
synced 2025-06-08 06:02:05 +00:00
Rename REGULATORY_GAIN to REGULATORY_GAIN_LORA to allow for other RF gain controls
For example, Wi-Fi or BLE gain control (#3962) Signed-off-by: Andrew Yong <me@ndoo.sg>
This commit is contained in:
parent
537814df58
commit
08e1c2f681
@ -83,8 +83,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||||||
|
|
||||||
// Total system gain in dBm to subtract from Tx power to remain within regulatory ERP limit for non-licensed operators
|
// Total system gain in dBm to subtract from Tx power to remain within regulatory ERP limit for non-licensed operators
|
||||||
// This value should be set in variant.h and is PA gain + antenna gain (if system ships with an antenna)
|
// This value should be set in variant.h and is PA gain + antenna gain (if system ships with an antenna)
|
||||||
#ifndef REGULATORY_GAIN
|
#ifndef REGULATORY_GAIN_LORA
|
||||||
#define REGULATORY_GAIN 0
|
#define REGULATORY_GAIN_LORA 0
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// -----------------------------------------------------------------------------
|
// -----------------------------------------------------------------------------
|
||||||
|
@ -478,8 +478,8 @@ void RadioInterface::applyModemConfig()
|
|||||||
|
|
||||||
power = loraConfig.tx_power;
|
power = loraConfig.tx_power;
|
||||||
|
|
||||||
if ((power == 0) || ((power + REGULATORY_GAIN > myRegion->powerLimit) && !devicestate.owner.is_licensed))
|
if ((power == 0) || ((power + REGULATORY_GAIN_LORA > myRegion->powerLimit) && !devicestate.owner.is_licensed))
|
||||||
power = myRegion->powerLimit - REGULATORY_GAIN;
|
power = myRegion->powerLimit - REGULATORY_GAIN_LORA;
|
||||||
|
|
||||||
if (power == 0)
|
if (power == 0)
|
||||||
power = 17; // Default to this power level if we don't have a valid regional power limit (powerLimit of myRegion defaults
|
power = 17; // Default to this power level if we don't have a valid regional power limit (powerLimit of myRegion defaults
|
||||||
|
@ -144,12 +144,12 @@ static const uint8_t SCK = PIN_SPI_SCK;
|
|||||||
#define SX126X_DIO3_TCXO_VOLTAGE 1.8
|
#define SX126X_DIO3_TCXO_VOLTAGE 1.8
|
||||||
#ifdef EBYTE_E22_900M30S
|
#ifdef EBYTE_E22_900M30S
|
||||||
// 10dB PA gain and 30dB rated output; based on PA output table from Ebyte Robin <sales06@ebyte.com>
|
// 10dB PA gain and 30dB rated output; based on PA output table from Ebyte Robin <sales06@ebyte.com>
|
||||||
#define REGULATORY_GAIN 10
|
#define REGULATORY_GAIN_LORA 10
|
||||||
#define SX126X_MAX_POWER 20
|
#define SX126X_MAX_POWER 20
|
||||||
#endif
|
#endif
|
||||||
#ifdef EBYTE_E22_900M33S
|
#ifdef EBYTE_E22_900M33S
|
||||||
// 25dB PA gain and 33dB rated output; based on TX Power Curve from E22-900M33S_UserManual_EN_v1.0.pdf
|
// 25dB PA gain and 33dB rated output; based on TX Power Curve from E22-900M33S_UserManual_EN_v1.0.pdf
|
||||||
#define REGULATORY_GAIN 25
|
#define REGULATORY_GAIN_LORA 25
|
||||||
#define SX126X_MAX_POWER 8
|
#define SX126X_MAX_POWER 8
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
Reference in New Issue
Block a user