From 132872c2d6ee38f527fc936c9663c35a41de6b43 Mon Sep 17 00:00:00 2001 From: Sudo-Ivan Date: Thu, 1 Jan 2026 00:59:57 -0600 Subject: [PATCH] refactor: remove KISS protocol escape functions and related constants from tcp.go --- pkg/interfaces/tcp.go | 19 ------------------- 1 file changed, 19 deletions(-) diff --git a/pkg/interfaces/tcp.go b/pkg/interfaces/tcp.go index 6c2479a..b07a607 100644 --- a/pkg/interfaces/tcp.go +++ b/pkg/interfaces/tcp.go @@ -18,11 +18,6 @@ const ( HDLC_ESC = 0x7D HDLC_ESC_MASK = 0x20 - KISS_FEND = 0xC0 - KISS_FESC = 0xDB - KISS_TFEND = 0xDC - KISS_TFESC = 0xDD - DEFAULT_MTU = 1064 BITRATE_GUESS_VAL = 10 * 1000 * 1000 RECONNECT_WAIT = 5 @@ -329,20 +324,6 @@ func escapeHDLC(data []byte) []byte { return escaped } -func escapeKISS(data []byte) []byte { - escaped := make([]byte, 0, len(data)*2) - for _, b := range data { - if b == KISS_FEND { - escaped = append(escaped, KISS_FESC, KISS_TFEND) - } else if b == KISS_FESC { - escaped = append(escaped, KISS_FESC, KISS_TFESC) - } else { - escaped = append(escaped, b) - } - } - return escaped -} - func (tc *TCPClientInterface) SetPacketCallback(cb common.PacketCallback) { tc.packetCallback = cb }