Skip to content

Commit

Permalink
Set RXWindow only when ADR is supported
Browse files Browse the repository at this point in the history
  • Loading branch information
gotthardp committed Jul 15, 2017
1 parent 82cc886 commit a4f74eb
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/lorawan_mac_commands.erl
Original file line number Diff line number Diff line change
Expand Up @@ -280,7 +280,9 @@ set_rxwin(Link, FOptsOut) ->
_Else2 -> undefined
end,
if
OffSet /= undefined, OffSet /= OffUse ->
Link#link.adr_flag_use == 1,
(Link#link.adr_flag_set == 1 orelse Link#link.adr_flag_set == 2),
OffSet /= undefined, OffSet /= OffUse ->
{_, RX2DataRate, Frequency} = lorawan_mac_region:default_rxwin(Link#link.region),
lager:debug("RXParamSetupReq ~w", [OffSet]),
[{rx_param_setup_req, OffSet, RX2DataRate, trunc(10000*Frequency)} | FOptsOut];
Expand Down

0 comments on commit a4f74eb

Please sign in to comment.