fixed gateway LoRa startReceive() too early

This commit is contained in:
Timm Bogner 2023-03-16 13:24:44 -05:00
parent 96f7245b89
commit 90263bb368

View File

@ -582,8 +582,7 @@ void asyncReleaseLoRa(bool first_run)
transmitLoRa(&loraBroadcast, &LORABBuffer.buffer[tx_buffer_position], LORABBuffer.len - tx_buffer_position); transmitLoRa(&loraBroadcast, &LORABBuffer.buffer[tx_buffer_position], LORABBuffer.len - tx_buffer_position);
TxFin: TxFin:
if (LORABBuffer.len + LORA1Buffer.len +LORA2Buffer.len > 0) if (LORABBuffer.len + LORA1Buffer.len +LORA2Buffer.len > 0)
DBG("LoRa airtime: " + String(millis() - tx_start_time) + "ms"); //radio.startReceive();
radio.startReceive();
LORABBuffer.len = 0; LORABBuffer.len = 0;
LORA1Buffer.len = 0; LORA1Buffer.len = 0;
LORA2Buffer.len = 0; LORA2Buffer.len = 0;
@ -618,7 +617,7 @@ crcResult handleLoRa()
} }
else else
{ {
DBG("LoRa airtime: " + String(millis() - tx_start_time) + "ms");
radio.startReceive(); // return to listen mode radio.startReceive(); // return to listen mode
enableInterrupt = true; enableInterrupt = true;
transmitFlag = false; transmitFlag = false;