Skip to content

Commit 9ed7a6f

Browse files
committed
MP: Stop the channel clock while waiting for HEARTBEAT on channel 0
1 parent 5ed8c70 commit 9ed7a6f

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

Firmware/LoRaSerial/States.ino

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1256,6 +1256,7 @@ void updateRadioState()
12561256
switch (packetType)
12571257
{
12581258
default:
1259+
stopChannelTimer();
12591260
triggerEvent(TRIGGER_UNKNOWN_PACKET);
12601261
if (settings.debugDatagrams)
12611262
{
@@ -1268,14 +1269,17 @@ void updateRadioState()
12681269
break;
12691270

12701271
case DATAGRAM_BAD:
1272+
stopChannelTimer();
12711273
triggerEvent(TRIGGER_BAD_PACKET);
12721274
break;
12731275

12741276
case DATAGRAM_CRC_ERROR:
1277+
stopChannelTimer();
12751278
triggerEvent(TRIGGER_CRC_ERROR);
12761279
break;
12771280

12781281
case DATAGRAM_NETID_MISMATCH:
1282+
stopChannelTimer();
12791283
triggerEvent(TRIGGER_NETID_MISMATCH);
12801284
break;
12811285

@@ -1286,10 +1290,12 @@ void updateRadioState()
12861290
case DATAGRAM_REMOTE_COMMAND:
12871291
case DATAGRAM_REMOTE_COMMAND_RESPONSE:
12881292
//We should not be receiving these datagrams, but if we do, just ignore
1293+
stopChannelTimer();
12891294
triggerEvent(TRIGGER_BAD_PACKET);
12901295
break;
12911296

12921297
case DATAGRAM_FIND_PARTNER:
1298+
stopChannelTimer();
12931299
triggerEvent(TRIGGER_RX_FIND_PARTNER);
12941300
break;
12951301

@@ -1334,6 +1340,7 @@ void updateRadioState()
13341340

13351341
case DATAGRAM_DATA:
13361342
//Don't deal with data until we are sync'd with server
1343+
stopChannelTimer();
13371344
triggerEvent(TRIGGER_RX_DATA);
13381345
break;
13391346
}

0 commit comments

Comments
 (0)