Partial work to migrate to OSThread model

This commit is contained in:
Jm
2021-01-01 12:31:46 -08:00
parent 9587729bb0
commit 925829dc58
6 changed files with 91 additions and 30 deletions

View File

@@ -97,7 +97,7 @@ ErrorCode RadioLibInterface::send(MeshPacket *p)
// Count the packet toward our TX airtime utilization.
// We only count it if it can be added to the TX queue.
logAirtime(TX_LOG, xmitMsec);
airTime.logAirtime(TX_LOG, xmitMsec);
// We want all sending/receiving to be done by our daemon thread, We use a delay here because this packet might have been sent
// in response to a packet we just received. So we want to make sure the other side has had a chance to reconfigure its radio
@@ -216,7 +216,7 @@ void RadioLibInterface::handleReceiveInterrupt()
size_t length = iface->getPacketLength();
xmitMsec = getPacketTime(length);
logAirtime(RX_ALL_LOG, xmitMsec);
airTime.logAirtime(RX_ALL_LOG, xmitMsec);
int state = iface->readData(radiobuf, length);
if (state != ERR_NONE) {
@@ -258,7 +258,7 @@ void RadioLibInterface::handleReceiveInterrupt()
printPacket("Lora RX", mp);
xmitMsec = getPacketTime(mp);
logAirtime(RX_LOG, xmitMsec);
airTime.logAirtime(RX_LOG, xmitMsec);
deliverToReceiver(mp);
}