Move frame length constant

This commit is contained in:
Nonoo 2020-10-25 12:55:41 +01:00
parent 68299379db
commit a02edcc247
2 changed files with 3 additions and 1 deletions

View file

@ -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 {

View file

@ -4,6 +4,8 @@ import (
"github.com/nonoo/kappanhang/log"
)
const maxSerialFrameLength = 80 // Max. frame length according to Hamlib.
type serialStream struct {
common streamCommon