@@ -12,19 +12,8 @@ import (
12
12
)
13
13
14
14
type 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
28
17
RtsOn bool
29
18
DtrOn bool
30
19
}
@@ -34,8 +23,6 @@ type serport struct {
34
23
portConf * SerialConfig
35
24
portIo io.ReadWriteCloser
36
25
37
- done chan bool // signals the end of this request
38
-
39
26
// Keep track of whether we're being actively closed
40
27
// just so we don't show scary error messages
41
28
isClosing bool
@@ -57,30 +44,6 @@ type serport struct {
57
44
bufferwatcher Bufferflow
58
45
}
59
46
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
-
84
47
type SpPortMessage struct {
85
48
P string // the port, i.e. com22
86
49
D string // the data, i.e. G0 X0 Y0
@@ -93,7 +56,6 @@ type SpPortMessageRaw struct {
93
56
94
57
func (p * serport ) reader (buftype string ) {
95
58
96
- //var buf bytes.Buffer
97
59
timeCheckOpen := time .Now ()
98
60
var buffered_ch bytes.Buffer
99
61
@@ -324,10 +286,6 @@ func spHandlerOpen(portname string, baud int, buftype string) {
324
286
325
287
spListDual (false )
326
288
spList (false )
327
-
328
- //go p.reader()
329
- //p.done = make(chan bool)
330
- //<-p.done
331
289
}
332
290
333
291
func spHandlerClose (p * serport ) {
0 commit comments