mirror of
https://github.com/meshtastic/firmware.git
synced 2025-12-21 10:12:50 +00:00
Use LORA_DIO1 as RadioLib GPIO for SX127x chips (#2290)
* When channel is active, first try receiving that packet Afterwards we'll try transmitting again * Remove setStandby in startSend Already done in isChannelActive() * Set LORA_DIO1 as RadioLib GPIO for SX127x * LORA_DIO1 for Heltec v1, overlaps with GPS_TX Set to RADIOLIB_NC for now * If receive was not successful, startReceive doesn't trigger the interrupt So we have to go back to transmitting anyway --------- Co-authored-by: Ben Meadors <benmmeadors@gmail.com>
This commit is contained in:
@@ -218,8 +218,9 @@ void RadioLibInterface::onNotify(uint32_t notification)
|
||||
setTransmitDelay(); // currently Rx/Tx-ing: reset random delay
|
||||
} else {
|
||||
if (isChannelActive()) { // check if there is currently a LoRa packet on the channel
|
||||
// LOG_DEBUG("Channel is active: set random delay\n");
|
||||
setTransmitDelay(); // reset random delay
|
||||
// LOG_DEBUG("Channel is active, try receiving first.\n");
|
||||
startReceive(); // try receiving this packet, afterwards we'll be trying to transmit again
|
||||
setTransmitDelay();
|
||||
} else {
|
||||
// Send any outgoing packets we have ready
|
||||
meshtastic_MeshPacket *txp = txQueue.dequeue();
|
||||
@@ -388,8 +389,6 @@ void RadioLibInterface::startSend(meshtastic_MeshPacket *txp)
|
||||
LOG_WARN("startSend is dropping tx packet because we are disabled\n");
|
||||
packetPool.release(txp);
|
||||
} else {
|
||||
setStandby(); // Cancel any already in process receives
|
||||
|
||||
configHardwareForSend(); // must be after setStandby
|
||||
|
||||
size_t numbytes = beginSending(txp);
|
||||
|
||||
Reference in New Issue
Block a user