mirror of
https://github.com/meshtastic/firmware.git
synced 2025-12-22 02:32:23 +00:00
Fix rare assertion failure which could occur due to pending interrupts
* fix assertion failure ``` 22:57:36 64409 [PositionPlugin] FIXME-update-db Sniffing packet 22:57:36 64409 [PositionPlugin] Delivering rx packet (id=0x5851f437 Fr0xa1 To0xff, WantAck0, HopLim3 Ch0x0 Portnum=3 rxtime=1628895456 priority=10) 22:57:36 64409 [PositionPlugin] Forwarding to phone (id=0x5851f437 Fr0xa1 To0xff, WantAck0, HopLim3 Ch0x0 Portnum=3 rxtime=1628895456 priority=10) 22:57:36 64409 [PositionPlugin] Update DB node 0x85f4da1, rx_time=1628895456 22:57:36 64409 [PositionPlugin] Plugin routing considered 22:57:36 64409 [PositionPlugin] Add packet record (id=0x5851f437 Fr0xa1 To0xff, WantAck0, HopLim3 Ch0x0 Portnum=3 rxtime=1628895456 priority=10) 22:57:36 64409 [PositionPlugin] Expanding short PSK #1 22:57:36 64409 [PositionPlugin] Installing AES128 key! 22:57:36 64409 [PositionPlugin] enqueuing for send (id=0x5851f437 Fr0xa1 To0xff, WantAck0, HopLim3 Ch0xb1 encrypted rxtime=1628895456 priority=10) 22:57:36 64409 [PositionPlugin] (bw=125, sf=12, cr=4/8) packet symLen=32 ms, payloadSize=22, time 2596 ms 22:57:36 64409 [PositionPlugin] txGood=6,rxGood=10,rxBad=0 22:57:36 64409 [PositionPlugin] AirTime - Packet transmitted : 2596ms 22:57:36 64409 [RadioIf] assert failed src/mesh/RadioLibInterface.cpp: 240, void RadioLibInterface::handleReceiveInterrupt(), test=isReceiving ```
This commit is contained in:
@@ -38,8 +38,14 @@ class NotifiedWorkerThread : public OSThread
|
||||
protected:
|
||||
virtual void onNotify(uint32_t notification) = 0;
|
||||
|
||||
/// just calls checkNotification()
|
||||
virtual int32_t runOnce();
|
||||
|
||||
/// Sometimes we might want to check notifications independently of when our thread was getting woken up (i.e. if we are about to change
|
||||
/// radio transmit/receive modes we want to handle any pending interrupts first). You can call this method and if any notifications are currently
|
||||
/// pending they will be handled immediately.
|
||||
void checkNotification();
|
||||
|
||||
private:
|
||||
/**
|
||||
* Notify this thread so it can run
|
||||
|
||||
Reference in New Issue
Block a user