summaryrefslogtreecommitdiff
path: root/src/rhctl/audio_switch.go
diff options
context:
space:
mode:
authorChristian Pointner <equinox@spreadspace.org>2016-03-26 20:32:41 (GMT)
committerChristian Pointner <equinox@spreadspace.org>2016-03-26 20:32:41 (GMT)
commit455ae83f0f9c5a303c5393d5763ea7df7e715cd3 (patch)
tree7b8303ad531475daa67e551ea8442d5b62302658 /src/rhctl/audio_switch.go
parentaf3c3e7cf792eb21e5fe9c96237723561644b7c4 (diff)
reading from audio switch serial works now
Diffstat (limited to 'src/rhctl/audio_switch.go')
-rw-r--r--src/rhctl/audio_switch.go12
1 files changed, 7 insertions, 5 deletions
diff --git a/src/rhctl/audio_switch.go b/src/rhctl/audio_switch.go
index 5fc9fac..4464a10 100644
--- a/src/rhctl/audio_switch.go
+++ b/src/rhctl/audio_switch.go
@@ -35,11 +35,13 @@ func (sw *AudioSwitch) Run() {
stop := make(chan bool)
sw.port.Run(stop)
- select {
- case <-stop:
- return
- case data := <-sw.port.rx:
- rhl.Printf("got data from audio switch: %q", data)
+ for {
+ select {
+ case <-stop:
+ return
+ case data := <-sw.port.rx:
+ rhl.Printf("got data from audio switch: %q", data)
+ }
}
}