diff --git a/platformio.ini b/platformio.ini index b8ba35f5..e543b06d 100644 --- a/platformio.ini +++ b/platformio.ini @@ -9,7 +9,7 @@ ; https://docs.platformio.org/page/projectconf.html [platformio] -default_envs = nrf52dk ; Note: the github actions CI test build can't yet build NRF52 targets +default_envs = tbeam ; Note: the github actions CI test build can't yet build NRF52 targets [common] ; common is not currently used diff --git a/src/rf95/CustomRF95.cpp b/src/rf95/CustomRF95.cpp index f6cd4370..b67404df 100644 --- a/src/rf95/CustomRF95.cpp +++ b/src/rf95/CustomRF95.cpp @@ -49,7 +49,7 @@ ErrorCode CustomRF95::send(MeshPacket *p) // We wait _if_ we are partially though receiving a packet (rather than just merely waiting for one). // To do otherwise would be doubly bad because not only would we drop the packet that was on the way in, // we almost certainly guarantee no one outside will like the packet we are sending. - if (_mode == RHModeIdle || !isReceiving()) { + if (_mode == RHModeIdle || (_mode == RHModeRx && !isReceiving())) { // if the radio is idle, we can send right away DEBUG_MSG("immediate send on mesh fr=0x%x,to=0x%x,id=%d\n (txGood=%d,rxGood=%d,rxBad=%d)\n", p->from, p->to, p->id, txGood(), rxGood(), rxBad()); @@ -60,7 +60,7 @@ ErrorCode CustomRF95::send(MeshPacket *p) startSend(p); return ERRNO_OK; } else { - DEBUG_MSG("enquing packet for send from=0x%x, to=0x%x\n", p->from, p->to); + DEBUG_MSG("enqueuing packet for send from=0x%x, to=0x%x\n", p->from, p->to); ErrorCode res = txQueue.enqueue(p, 0) ? ERRNO_OK : ERRNO_UNKNOWN; if (res != ERRNO_OK) // we weren't able to queue it, so we must drop it to prevent leaks