Skip to content

Commit 283064c

Browse files
committedApr 2, 2025·
refactor: clean up serialport.go and serialportlist.go for clarity
1 parent 4585769 commit 283064c

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed
 

‎serialport.go

+4-1
Original file line numberDiff line numberDiff line change
@@ -240,7 +240,10 @@ func (p *serport) writerNoBuf() {
240240
p.OnMessage([]byte(msgstr))
241241

242242
p.portIo.Close()
243-
// serialPorts.List(
243+
244+
// The effect of this call is to send in to all the we client the list of serial ports
245+
// TODO: investigate if this is superfluous and it can be removed.
246+
// serialPorts.List()
244247

245248
}
246249

‎serialportlist.go

+1-2
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,10 @@ import (
1212
)
1313

1414
type serialPortList struct {
15-
tools *tools.Tools
16-
1715
Ports []*SpPortItem
1816
portsLock sync.Mutex
1917

18+
tools *tools.Tools `json:"-"`
2019
OnList func([]byte) `json:"-"`
2120
OnErr func(string) `json:"-"`
2221
}

0 commit comments

Comments
 (0)
Please sign in to comment.