diff options
Diffstat (limited to 'src/rhctl/audio_switch.go')
-rw-r--r-- | src/rhctl/audio_switch.go | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/rhctl/audio_switch.go b/src/rhctl/audio_switch.go index dc1955e..4f1ef31 100644 --- a/src/rhctl/audio_switch.go +++ b/src/rhctl/audio_switch.go @@ -69,11 +69,11 @@ type AudioSwitch struct { func (sw *AudioSwitch) handleData(data string) { if len(data) < 3 { - rhl.Printf("Warning: ignoring short line from audioswitch") + rhl.Printf("Audioswitch: ignoring short line") return } - rhdl.Printf("got data from audio switch: %q", data) + rhdl.Printf("Audioswitch: got data: %q", data) switch data[0:3] { case "RRR": fallthrough @@ -89,7 +89,7 @@ func (sw *AudioSwitch) handleData(data string) { sw.timer.Stop() sw.timer = nil } else { - rhl.Printf("Warning: ignoring unexpected response: %q", data) + rhl.Printf("Audioswitch: ignoring unexpected response: %q", data) } case "S0L": sw.Updates <- SwitchUpdate{SwitchStatus, data} @@ -102,7 +102,7 @@ func (sw *AudioSwitch) handleData(data string) { case "S0S": sw.Updates <- SwitchUpdate{SwitchSilence, data} default: - rhl.Printf("Warning: ignoring invalid data from switch: %q", data) + rhl.Printf("Audioswitch: ignoring invalid data: %q", data) } } @@ -112,7 +112,7 @@ func (sw *AudioSwitch) Run() { sw.current = nil sw.timer = nil - rhdl.Printf("audioswitch handler running...") + rhdl.Printf("Audioswitch: handler running...") for { if sw.current != nil { select { @@ -151,7 +151,7 @@ func SwitchInit(conf *Config) (sw *AudioSwitch, err error) { sw.Updates = make(chan SwitchUpdate, 32) if sw.port, err = SerialOpen(conf.Audioswitch.Device, conf.Audioswitch.Baudrate, ""); err != nil { - err = fmt.Errorf("Error opening switch port: %s", err) + err = fmt.Errorf("Audioswitch: error opening serial port: %s", err) return } return |