Skip to content

Commit e533790

Browse files
authored
Teach LoRaMacIsBusy return false if the MAC is stopped (#1326)
The previous version of LoRaMacIsBusy returned true when invoked while the MAC is stopped. I believe this is incorrect. The MAC should not indicate that is is busy while it is stopped.
1 parent e5076e1 commit e533790

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/mac/LoRaMac.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1522,6 +1522,11 @@ static void LoRaMacHandleIrqEvents( void )
15221522

15231523
bool LoRaMacIsBusy( void )
15241524
{
1525+
if( MacCtx.MacState == LORAMAC_STOPPED )
1526+
{
1527+
return false;
1528+
}
1529+
15251530
if( LoRaMacRadioEvents.Events.RxProcessPending == 1 )
15261531
{
15271532
return true;

0 commit comments

Comments
 (0)