* startSendRaw() now returns false if fail

This commit is contained in:
Scott Powell 2025-05-12 17:26:44 +10:00
parent dd16197eae
commit b08436eba7
6 changed files with 27 additions and 13 deletions

View file

@ -234,7 +234,16 @@ void Dispatcher::checkSend() {
uint32_t max_airtime = _radio->getEstAirtimeFor(len)*3/2;
outbound_start = _ms->getMillis();
_radio->startSendRaw(raw, len);
bool success = _radio->startSendRaw(raw, len);
if (!success) {
MESH_DEBUG_PRINTLN("%s Dispatcher::loop(): ERROR: send start failed!", getLogDateTime());
logTxFail(outbound, outbound->getRawLength());
releasePacket(outbound); // return to pool
outbound = NULL;
return;
}
outbound_expiry = futureMillis(max_airtime);
#if MESH_PACKET_LOGGING