diff --git a/pkg/decoder/tagsl/v1/decoder_test.go b/pkg/decoder/tagsl/v1/decoder_test.go index d089d63..ae0e4be 100644 --- a/pkg/decoder/tagsl/v1/decoder_test.go +++ b/pkg/decoder/tagsl/v1/decoder_test.go @@ -173,7 +173,7 @@ func TestDecode(t *testing.T) { }, }, { - payload: "0000003c0000012c000151800078012c05dc02020100010200005460deadbeef", + payload: "0000003c0000012c000151800078012c05dc02020100010200005460000a1000", port: 4, autoPadding: false, skipValidation: true, @@ -191,6 +191,8 @@ func TestDecode(t *testing.T) { HardwareVersionType: 1, HardwareVersionRevision: 2, BatteryKeepAliveMessageInterval: 21600, + BatchSize: 10, + BufferSize: 4096, }, }, { diff --git a/pkg/decoder/tagsl/v1/port4.go b/pkg/decoder/tagsl/v1/port4.go index 646cddd..ba30357 100644 --- a/pkg/decoder/tagsl/v1/port4.go +++ b/pkg/decoder/tagsl/v1/port4.go @@ -27,8 +27,8 @@ type Port4Payload struct { FirmwareVersionMinor uint8 `json:"firmwareVersionMinor"` FirmwareVersionPatch uint8 `json:"firmwareVersionPatch"` HardwareVersionType uint8 `json:"hardwareVersionType"` - HardwareVersionRevision uint8 `json:"hardwareVersionRevision" validate:"gte=300,lte=604800"` - BatteryKeepAliveMessageInterval uint32 `json:"batteryKeepAliveMessageInterval"` + HardwareVersionRevision uint8 `json:"hardwareVersionRevision"` + BatteryKeepAliveMessageInterval uint32 `json:"batteryKeepAliveMessageInterval" validate:"gte=300,lte=604800"` BatchSize uint16 `json:"batchSize" validate:"lte=50"` BufferSize uint16 `json:"bufferSize" validate:"gte=128,lte=8128"` }