From 5fb31d8b07071db27bb331ea2912c199a626cd36 Mon Sep 17 00:00:00 2001 From: Pavel Moravec Date: Tue, 10 Jan 2023 21:14:48 +0100 Subject: [PATCH] Fix power limitations on 20dBm TX iGate --- src/TaskRadiolib.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/TaskRadiolib.cpp b/src/TaskRadiolib.cpp index f71dbb7..125c6d0 100644 --- a/src/TaskRadiolib.cpp +++ b/src/TaskRadiolib.cpp @@ -100,6 +100,10 @@ bool RadiolibTask::setup(System &system) { } } + if (config.power > 17 && config.tx_enable) { + radio->setCurrentLimit(140); + } + preambleDurationMilliSec = ((uint64_t)(preambleLength + 4) << (config.spreadingFactor + 10 /* to milli-sec */)) / config.signalBandwidth; _stateInfo = "";