mirror of
https://github.com/meshtastic/firmware.git
synced 2025-06-25 22:20:27 +00:00
radio settings now work on real sx1262 hw
This commit is contained in:
parent
f69ddf168b
commit
2982e197e0
@ -128,6 +128,7 @@ platform = nordicnrf52
|
|||||||
board = ppr
|
board = ppr
|
||||||
framework = arduino
|
framework = arduino
|
||||||
debug_tool = jlink
|
debug_tool = jlink
|
||||||
|
build_type = debug ; I'm debugging with ICE a lot now
|
||||||
build_flags =
|
build_flags =
|
||||||
${env.build_flags} -Wno-unused-variable -Isrc/nrf52
|
${env.build_flags} -Wno-unused-variable -Isrc/nrf52
|
||||||
src_filter =
|
src_filter =
|
||||||
|
@ -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?
|
bool useRegulatorLDO = false; // Seems to depend on the connection to pin 9/DCC_SW - if an inductor DCDC?
|
||||||
|
|
||||||
applyModemConfig();
|
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);
|
int res = lora.begin(freq, bw, sf, cr, syncWord, power, currentLimit, preambleLength, tcxoVoltage, useRegulatorLDO);
|
||||||
DEBUG_MSG("LORA init result %d\n", res);
|
DEBUG_MSG("LORA init result %d\n", res);
|
||||||
|
|
||||||
@ -58,6 +60,8 @@ bool SX1262Interface::reconfigure()
|
|||||||
err = lora.setFrequency(freq);
|
err = lora.setFrequency(freq);
|
||||||
assert(err == ERR_NONE);
|
assert(err == ERR_NONE);
|
||||||
|
|
||||||
|
if (power > 22) // This chip has lower power limits than some
|
||||||
|
power = 22;
|
||||||
err = lora.setOutputPower(power);
|
err = lora.setOutputPower(power);
|
||||||
assert(err == ERR_NONE);
|
assert(err == ERR_NONE);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user