mirror of
https://github.com/nonoo/kappanhang.git
synced 2026-01-15 21:29:57 +01:00
Move frame length constant
This commit is contained in:
parent
68299379db
commit
a02edcc247
|
|
@ -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 {
|
||||
|
|
|
|||
|
|
@ -4,6 +4,8 @@ import (
|
|||
"github.com/nonoo/kappanhang/log"
|
||||
)
|
||||
|
||||
const maxSerialFrameLength = 80 // Max. frame length according to Hamlib.
|
||||
|
||||
type serialStream struct {
|
||||
common streamCommon
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue