mirror of
https://github.com/liquidraver/ZephCore.git
synced 2026-09-12 11:55:42 +00:00
close the 5ms race window before TX
This commit is contained in:
@@ -466,6 +466,14 @@ bool LoRaRadioBase::startSendRaw(const uint8_t *bytes, int len)
|
||||
return false;
|
||||
}
|
||||
|
||||
/* Last-moment hardware check before killing active RX.
|
||||
* Closes the race between the Dispatcher's isReceiving() guard
|
||||
* and hwCancelReceive() — if a preamble arrived in that gap,
|
||||
* abort TX and let the Dispatcher re-queue. */
|
||||
if (hwIsPreambleDetected()) {
|
||||
return false;
|
||||
}
|
||||
|
||||
_board->onBeforeTransmit();
|
||||
atomic_set(&_tx_active, 1);
|
||||
atomic_set(&_in_recv_mode, 0);
|
||||
|
||||
Reference in New Issue
Block a user