Skip to content

Commit 52f9104

Browse files
committed
Implement codec fix from #2.
1 parent 751c44e commit 52f9104

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

main.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -570,6 +570,8 @@ function encodeDownlink(input) {
570570
%s`, asDP.PayloadDecoderScript, asDP.PayloadEncoderScript)
571571
}
572572

573+
payloadCodec := strings.TrimPrefix(asDP.PayloadCodec, "CUSTOM_")
574+
573575
_, err = csDB.Exec(`
574576
insert into device_profile (
575577
id,
@@ -609,7 +611,7 @@ function encodeDownlink(input) {
609611
nsDP.MACVersion,
610612
nsDP.RegParamsRevision,
611613
nsDP.ADRAlgorithmID,
612-
asDP.PayloadCodec,
614+
payloadCodec,
613615
codecScript,
614616
asDP.UplinkInterval/time.Second,
615617
nsDP.SupportsJoin,

0 commit comments

Comments
 (0)