Skip to content

Commit 26ebc69

Browse files
committed
Populate FDev field when using FSK.
Closes #16.
1 parent 844aab3 commit 26ebc69

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

gateway/backend.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -443,6 +443,10 @@ func newTXPKFromTXPacket(txPacket gw.TXPacketBytes) (TXPK, error) {
443443
Data: base64.StdEncoding.EncodeToString(txPacket.PHYPayload),
444444
}
445445

446+
if txPacket.TXInfo.DataRate.Modulation == band.FSKModulation {
447+
txpk.FDev = uint16(txPacket.TXInfo.DataRate.BitRate / 2)
448+
}
449+
446450
// TODO: do testing with FSK modulation
447451
if txPacket.TXInfo.DataRate.Modulation == band.LoRaModulation {
448452
txpk.IPol = true

0 commit comments

Comments
 (0)