override new RadioLib's default current limit value (60 mA) to the previous value of 100mA

This commit is contained in:
Vladislav Osmanov
2021-09-08 14:30:52 +03:00
parent c8269d67c3
commit 1a671f2877
4 changed files with 23 additions and 0 deletions

View File

@@ -53,6 +53,12 @@ bool SX1262Interface::init()
int res = lora.begin(freq, bw, sf, cr, syncWord, power, preambleLength, tcxoVoltage, useRegulatorLDO);
DEBUG_MSG("SX1262 init result %d\n", res);
// current limit was removed from module' ctor
// override default value (60 mA)
res = lora.setCurrentLimit(currentLimit);
DEBUG_MSG("Current limit set to %f\n", currentLimit);
DEBUG_MSG("Current limit set result %d\n", res);
#ifdef SX1262_TXEN
// lora.begin sets Dio2 as RF switch control, which is not true if we are manually controlling RX and TX
if (res == ERR_NONE)