Skip to content

Commit

Permalink
Add missing coding-rates for TXPK CodR.
Browse files Browse the repository at this point in the history
Closes #217.
  • Loading branch information
brocaar committed Dec 13, 2022
1 parent 2ef079d commit 71991e7
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions internal/backend/semtechudp/packets/pull_resp.go
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,12 @@ func GetPullRespPacket(protoVersion uint8, randomToken uint16, frame *gw.Downlin
packet.Payload.TXPK.CodR = "4/7"
case gw.CodeRate_CR_4_8:
packet.Payload.TXPK.CodR = "4/8"
case gw.CodeRate_CR_LI_4_5:
packet.Payload.TXPK.CodR = "4/5LI"
case gw.CodeRate_CR_LI_4_6:
packet.Payload.TXPK.CodR = "4/6LI"
case gw.CodeRate_CR_LI_4_8:
packet.Payload.TXPK.CodR = "4/8LI"
default:
return PullRespPacket{}, fmt.Errorf("invalid CodeRate: %s", lora.GetCodeRate())
}
Expand Down

0 comments on commit 71991e7

Please sign in to comment.