mirror of
https://github.com/meshtastic/firmware.git
synced 2026-01-18 15:57:24 +00:00
new sending kinda works
This commit is contained in:
@@ -91,6 +91,8 @@ void RadioLibInterface::loop()
|
||||
if (wasPending) {
|
||||
pending = ISR_NONE; // If the flag was set, it is _guaranteed_ the ISR won't be running, because it masked itself
|
||||
|
||||
DEBUG_MSG("Handling a LORA interrupt %d!\n", wasPending);
|
||||
|
||||
if (wasPending == ISR_TX)
|
||||
handleTransmitInterrupt();
|
||||
else if (wasPending == ISR_RX)
|
||||
@@ -193,7 +195,7 @@ void RadioLibInterface::startSend(MeshPacket *txp)
|
||||
size_t numbytes = beginSending(txp);
|
||||
|
||||
int res = iface.startTransmit(radiobuf, numbytes);
|
||||
assert(res);
|
||||
assert(res == ERR_NONE);
|
||||
|
||||
// Must be done AFTER, starting transmit, because startTransmit clears (possibly stale) interrupt pending register bits
|
||||
enableInterrupt(isrTxLevel0);
|
||||
|
||||
@@ -27,7 +27,7 @@ bool SX1262Interface::init()
|
||||
int res = lora.begin(freq, bw, sf, cr, syncWord, power, currentLimit, preambleLength, tcxoVoltage, useRegulatorLDO);
|
||||
DEBUG_MSG("LORA init result %d\n", res);
|
||||
|
||||
if (res != ERR_NONE)
|
||||
if (res == ERR_NONE)
|
||||
res = lora.setCRC(SX126X_LORA_CRC_ON);
|
||||
|
||||
return res == ERR_NONE;
|
||||
|
||||
Reference in New Issue
Block a user