old RF95 API works again

1.2-legacy
geeksville 2020-04-30 16:47:56 -07:00
rodzic dd7452ad96
commit b1a55b4576
2 zmienionych plików z 3 dodań i 3 usunięć

Wyświetl plik

@ -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

Wyświetl plik

@ -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