@@ -12,19 +12,8 @@ import (
1212)
1313
1414type SerialConfig struct {
15- Name string
16- Baud int
17-
18- // Size int // 0 get translated to 8
19- // Parity SomeNewTypeToGetCorrectDefaultOf_None
20- // StopBits SomeNewTypeToGetCorrectDefaultOf_1
21-
22- // RTSFlowControl bool
23- // DTRFlowControl bool
24- // XONFlowControl bool
25-
26- // CRLFTranslate bool
27- // TimeoutStuff int
15+ Name string
16+ Baud int
2817 RtsOn bool
2918 DtrOn bool
3019}
@@ -34,8 +23,6 @@ type serport struct {
3423 portConf * SerialConfig
3524 portIo io.ReadWriteCloser
3625
37- done chan bool // signals the end of this request
38-
3926 // Keep track of whether we're being actively closed
4027 // just so we don't show scary error messages
4128 isClosing bool
@@ -57,30 +44,6 @@ type serport struct {
5744 bufferwatcher Bufferflow
5845}
5946
60- type Cmd struct {
61- data string
62- id string
63- skippedBuffer bool
64- willHandleCompleteResponse bool
65- }
66-
67- type CmdComplete struct {
68- Cmd string
69- Id string
70- P string
71- BufSize int `json:"-"`
72- D string `json:"-"`
73- }
74-
75- type qwReport struct {
76- Cmd string
77- QCnt int
78- Id string
79- D string `json:"-"`
80- Buf string `json:"-"`
81- P string
82- }
83-
8447type SpPortMessage struct {
8548 P string // the port, i.e. com22
8649 D string // the data, i.e. G0 X0 Y0
@@ -93,7 +56,6 @@ type SpPortMessageRaw struct {
9356
9457func (p * serport ) reader (buftype string ) {
9558
96- //var buf bytes.Buffer
9759 timeCheckOpen := time .Now ()
9860 var buffered_ch bytes.Buffer
9961
@@ -324,10 +286,6 @@ func spHandlerOpen(portname string, baud int, buftype string) {
324286
325287 spListDual (false )
326288 spList (false )
327-
328- //go p.reader()
329- //p.done = make(chan bool)
330- //<-p.done
331289}
332290
333291func spHandlerClose (p * serport ) {
0 commit comments