@@ -174,18 +174,10 @@ func (p *serport) writerBuffered() {
174174 // sees something come in
175175 for data := range p .sendBuffered {
176176
177- // we want to block here if we are being asked to pause.
178- goodToGo , _ := p .bufferwatcher .BlockUntilReady (string (data ), "" )
179-
180- if goodToGo == false {
181- log .Println ("We got back from BlockUntilReady() but apparently we must cancel this cmd" )
182- // since we won't get a buffer decrement in p.sendNoBuf, we must do it here
183- p .itemsInBuffer --
184- } else {
185- // send to the non-buffered serial port writer
186- //log.Println("About to send to p.sendNoBuf channel")
187- p .sendNoBuf <- []byte (data )
188- }
177+ // send to the non-buffered serial port writer
178+ //log.Println("About to send to p.sendNoBuf channel")
179+ p .sendNoBuf <- []byte (data )
180+
189181 }
190182 msgstr := "writerBuffered just got closed. make sure you make a new one. port:" + p .portConf .Name
191183 log .Println (msgstr )
@@ -249,17 +241,9 @@ func (p *serport) writerRaw() {
249241 }
250242 log .Println (string (sDec ))
251243
252- // we want to block here if we are being asked to pause.
253- goodToGo , _ := p . bufferwatcher . BlockUntilReady ( string ( data ), "" )
244+ // send to the non-buffered serial port writer
245+ p . sendNoBuf <- sDec
254246
255- if goodToGo == false {
256- log .Println ("We got back from BlockUntilReady() but apparently we must cancel this cmd" )
257- // since we won't get a buffer decrement in p.sendNoBuf, we must do it here
258- p .itemsInBuffer --
259- } else {
260- // send to the non-buffered serial port writer
261- p .sendNoBuf <- sDec
262- }
263247 }
264248 msgstr := "writerRaw just got closed. make sure you make a new one. port:" + p .portConf .Name
265249 log .Println (msgstr )
0 commit comments