Skip to content

Commit 0fb5f29

Browse files
committed
Add fallback in case FrequencyDeviation is not set.
1 parent 6b75802 commit 0fb5f29

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

internal/backend/semtechudp/packets/pull_resp.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,11 @@ func GetPullRespPacket(protoVersion uint8, randomToken uint16, frame gw.Downlink
116116
}
117117
packet.Payload.TXPK.DatR.FSK = modInfo.Datarate
118118
packet.Payload.TXPK.FDev = uint16(modInfo.FrequencyDeviation)
119+
120+
// TODO: cleanup in next major release
121+
if packet.Payload.TXPK.FDev == 0 {
122+
packet.Payload.TXPK.FDev = uint16(modInfo.Datarate / 2)
123+
}
119124
}
120125

121126
switch frame.TxInfo.Timing {

0 commit comments

Comments
 (0)