add strip send command

This commit is contained in:
2026-01-31 21:30:48 +00:00
parent ad7c910180
commit a0663350f8
2 changed files with 85 additions and 6 deletions

View File

@@ -126,3 +126,25 @@ func (s *Strip) SetColor(strip int, color int32) error {
address := fmt.Sprintf("/ch/%02d/config/color", strip)
return s.client.SendMessage(address, color)
}
// Sends requests the sends level for a mixbus.
func (s *Strip) SendLevel(strip int, bus int) (float64, error) {
address := fmt.Sprintf("/ch/%02d/mix/%02d/level", strip, bus)
err := s.client.SendMessage(address)
if err != nil {
return 0, fmt.Errorf("failed to send strip send level request: %v", err)
}
resp := <-s.client.respChan
val, ok := resp.Arguments[0].(float32)
if !ok {
return 0, fmt.Errorf("unexpected argument type for strip send level value")
}
return mustDbFrom(float64(val)), nil
}
// SetSendLevel sets the sends level for a mixbus.
func (s *Strip) SetSendLevel(strip int, bus int, level float64) error {
address := fmt.Sprintf("/ch/%02d/mix/%02d/level", strip, bus)
return s.client.SendMessage(address, float32(mustDbInto(level)))
}