mirror of
https://github.com/meshtastic/firmware.git
synced 2025-12-21 02:02:23 +00:00
implement most of sleep handling for the new radio stack
This commit is contained in:
@@ -89,6 +89,15 @@ ErrorCode RadioLibInterface::send(MeshPacket *p)
|
||||
}
|
||||
}
|
||||
|
||||
bool RadioLibInterface::canSleep()
|
||||
{
|
||||
bool res = txQueue.isEmpty();
|
||||
if (!res) // only print debug messages if we are vetoing sleep
|
||||
DEBUG_MSG("radio wait to sleep, txEmpty=%d\n", txQueue.isEmpty());
|
||||
|
||||
return res;
|
||||
}
|
||||
|
||||
void RadioLibInterface::loop()
|
||||
{
|
||||
PendingISR wasPending = pending; // atomic read
|
||||
|
||||
Reference in New Issue
Block a user