radio settings now work on real sx1262 hw

pull/117/head
geeksville 2020-04-29 19:04:59 -07:00
rodzic f69ddf168b
commit 2982e197e0
2 zmienionych plików z 5 dodań i 0 usunięć

Wyświetl plik

@ -128,6 +128,7 @@ platform = nordicnrf52
board = ppr
framework = arduino
debug_tool = jlink
build_type = debug ; I'm debugging with ICE a lot now
build_flags =
${env.build_flags} -Wno-unused-variable -Isrc/nrf52
src_filter =

Wyświetl plik

@ -22,6 +22,8 @@ bool SX1262Interface::init()
bool useRegulatorLDO = false; // Seems to depend on the connection to pin 9/DCC_SW - if an inductor DCDC?
applyModemConfig();
if (power > 22) // This chip has lower power limits than some
power = 22;
int res = lora.begin(freq, bw, sf, cr, syncWord, power, currentLimit, preambleLength, tcxoVoltage, useRegulatorLDO);
DEBUG_MSG("LORA init result %d\n", res);
@ -58,6 +60,8 @@ bool SX1262Interface::reconfigure()
err = lora.setFrequency(freq);
assert(err == ERR_NONE);
if (power > 22) // This chip has lower power limits than some
power = 22;
err = lora.setOutputPower(power);
assert(err == ERR_NONE);