@@ -174,18 +174,10 @@ func (p *serport) writerBuffered() {
174
174
// sees something come in
175
175
for data := range p .sendBuffered {
176
176
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
+
189
181
}
190
182
msgstr := "writerBuffered just got closed. make sure you make a new one. port:" + p .portConf .Name
191
183
log .Println (msgstr )
@@ -249,17 +241,9 @@ func (p *serport) writerRaw() {
249
241
}
250
242
log .Println (string (sDec ))
251
243
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
254
246
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
- }
263
247
}
264
248
msgstr := "writerRaw just got closed. make sure you make a new one. port:" + p .portConf .Name
265
249
log .Println (msgstr )
0 commit comments