From 47bbde3c605529e0939ed64935b5af45e1758d0b Mon Sep 17 00:00:00 2001 From: Kevin Hester Date: Thu, 29 Oct 2020 16:13:44 +0800 Subject: [PATCH] fix #505 allow forced standby mode to not assert fail --- src/mesh/RadioLibInterface.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/mesh/RadioLibInterface.cpp b/src/mesh/RadioLibInterface.cpp index 74d345d8..63c2469f 100644 --- a/src/mesh/RadioLibInterface.cpp +++ b/src/mesh/RadioLibInterface.cpp @@ -236,9 +236,10 @@ void RadioLibInterface::startTransmitTimer(bool withDelay) void RadioLibInterface::handleTransmitInterrupt() { // DEBUG_MSG("handling lora TX interrupt\n"); - assert(sendingPacket); // Were we sending? - FIXME, this was null coming out of light sleep due to RF95 ISR! - - completeSending(); + // This can be null if we forced the device to enter standby mode. In that case + // ignore the transmit interrupt + if(sendingPacket) + completeSending(); } void RadioLibInterface::completeSending()