Skip to content

Commit

Permalink
Update htlvcrcdecoder.go
Browse files Browse the repository at this point in the history
use MaxUint8
  • Loading branch information
xxl6097 authored May 6, 2024
1 parent 0a2ab19 commit 879a33e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion zdecoder/htlvcrcdecoder.go
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ func (hcd *HtlvCrcDecoder) GetLengthField() *ziface.LengthField {
// initialBytesToStrip = 0 (这个0表示完整的协议内容,如果不想要A2,那么这里就是1) 从解码帧中第一次去除的字节数
// maxFrameLength = 255 + 4(起始码、功能码、CRC) (len是1个byte,所以最大长度是无符号1个byte的最大值)
return &ziface.LengthField{
MaxFrameLength: math.MaxInt8 + 4,
MaxFrameLength: math.MaxUint8 + 4,
LengthFieldOffset: 2,
LengthFieldLength: 1,
LengthAdjustment: 2,
Expand Down

0 comments on commit 879a33e

Please sign in to comment.