Skip to content

Commit a97d1ea

Browse files
committed
Revert "Cleanup IO buffers after opening the serial port"
We had reports that the first lines received via serial are lost. This happens in particular on devices with fast native USB serial port. This reverts commit c28e1a0.
1 parent 6ca61c9 commit a97d1ea

File tree

1 file changed

+0
-5
lines changed

1 file changed

+0
-5
lines changed

main.go

-5
Original file line numberDiff line numberDiff line change
@@ -161,11 +161,6 @@ func (d *SerialMonitor) Open(boardPort string) (io.ReadWriter, error) {
161161
if err != nil {
162162
return nil, err
163163
}
164-
165-
// Clean up residual data in IO buffers
166-
_ = serialPort.ResetInputBuffer() // do not error if resetting buffers fails
167-
_ = serialPort.ResetOutputBuffer()
168-
169164
d.openedPort = true
170165
d.serialPort = serialPort
171166
return d.serialPort, nil

0 commit comments

Comments
 (0)