mirror of
https://github.com/onyx-and-iris/xair-cli.git
synced 2026-04-09 02:13:35 +00:00
timeout now a flag on the root command.
It applies to all messages sent new option function WithTimeout added
This commit is contained in:
@@ -31,8 +31,11 @@ func (m *Main) Fader() (float64, error) {
|
||||
return 0, err
|
||||
}
|
||||
|
||||
resp := <-m.client.respChan
|
||||
val, ok := resp.Arguments[0].(float32)
|
||||
msg, err := m.client.ReceiveMessage()
|
||||
if err != nil {
|
||||
return 0, err
|
||||
}
|
||||
val, ok := msg.Arguments[0].(float32)
|
||||
if !ok {
|
||||
return 0, fmt.Errorf("unexpected argument type for main LR fader value")
|
||||
}
|
||||
@@ -53,8 +56,11 @@ func (m *Main) Mute() (bool, error) {
|
||||
return false, err
|
||||
}
|
||||
|
||||
resp := <-m.client.respChan
|
||||
val, ok := resp.Arguments[0].(int32)
|
||||
msg, err := m.client.ReceiveMessage()
|
||||
if err != nil {
|
||||
return false, err
|
||||
}
|
||||
val, ok := msg.Arguments[0].(int32)
|
||||
if !ok {
|
||||
return false, fmt.Errorf("unexpected argument type for main LR mute value")
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user