From 895b6cdfcaaeb7630193e7b9797714d3d24efbbc Mon Sep 17 00:00:00 2001 From: Miguel Luis Date: Tue, 2 Jul 2019 14:37:31 +0200 Subject: [PATCH] Issue #699 - Added Rx2 config parameters structure initialization in ResetMacParameters function. --- src/mac/LoRaMac.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/mac/LoRaMac.c b/src/mac/LoRaMac.c index 319a86fbb..145bcd471 100644 --- a/src/mac/LoRaMac.c +++ b/src/mac/LoRaMac.c @@ -2586,6 +2586,14 @@ static void ResetMacParameters( void ) // Initialize channel index. MacCtx.Channel = 0; MacCtx.NvmCtx->LastTxChannel = MacCtx.Channel; + + // Initialize Rx2 config parameters. + MacCtx.RxWindow2Config.Channel = MacCtx.Channel; + MacCtx.RxWindow2Config.Frequency = MacCtx.NvmCtx->MacParams.Rx2Channel.Frequency; + MacCtx.RxWindow2Config.DownlinkDwellTime = MacCtx.NvmCtx->MacParams.DownlinkDwellTime; + MacCtx.RxWindow2Config.RepeaterSupport = MacCtx.NvmCtx->RepeaterSupport; + MacCtx.RxWindow2Config.RxContinuous = false; + MacCtx.RxWindow2Config.RxSlot = RX_SLOT_WIN_2; } /*!