diff --git a/serial-linux.go b/serial-linux.go index 6926b1e..7da99a2 100644 --- a/serial-linux.go +++ b/serial-linux.go @@ -50,7 +50,7 @@ func (s *serialPortStruct) writeLoop() { func (s *serialPortStruct) readLoop() { s.read = make(chan []byte) - b := make([]byte, 80) // Max. frame length according to Hamlib. + b := make([]byte, maxSerialFrameLength) for { n, err := s.pty.Master.Read(b) if err != nil { diff --git a/serialstream.go b/serialstream.go index 4623c44..ff9bef3 100644 --- a/serialstream.go +++ b/serialstream.go @@ -4,6 +4,8 @@ import ( "github.com/nonoo/kappanhang/log" ) +const maxSerialFrameLength = 80 // Max. frame length according to Hamlib. + type serialStream struct { common streamCommon