You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mynewt.apache.org by je...@apache.org on 2022/12/09 07:13:19 UTC

[mynewt-core] branch master updated: loramac: fix broken rx1 interval

This is an automated email from the ASF dual-hosted git repository.

jerzy pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/mynewt-core.git


The following commit(s) were added to refs/heads/master by this push:
     new 6f024918d loramac: fix broken rx1 interval
6f024918d is described below

commit 6f024918d41afa831865b25306c281d1037df892
Author: Daniel Kucera <da...@gmail.com>
AuthorDate: Sat Dec 3 17:12:46 2022 +0100

    loramac: fix broken rx1 interval
---
 net/lora/node/src/mac/LoRaMac.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/net/lora/node/src/mac/LoRaMac.c b/net/lora/node/src/mac/LoRaMac.c
index a2ec911d7..eb9c136b0 100644
--- a/net/lora/node/src/mac/LoRaMac.c
+++ b/net/lora/node/src/mac/LoRaMac.c
@@ -1354,8 +1354,8 @@ lora_mac_process_radio_rx_timeout(struct os_event *ev)
                   g_lora_mac_data.rx_slot, 0);
 
     if (LoRaMacDeviceClass != CLASS_C) {
-        Radio.Sleep( );
         if (g_lora_mac_data.rx_slot == RX_SLOT_WIN_2) {
+            Radio.Sleep( );
             /* Let the ACK retry timer handle confirmed transmissions */
             if (!LM_F_NODE_ACK_REQ()) {
                 lora_mac_tx_service_done(0);
@@ -1363,6 +1363,7 @@ lora_mac_process_radio_rx_timeout(struct os_event *ev)
         }
     } else {
         /* Rx timeout for class C devices should only occur in rx window 1 */
+        Radio.Sleep( );
         assert(g_lora_mac_data.rx_slot == RX_SLOT_WIN_1);
         lora_mac_rx_on_window2();
     }