add read write lock to dmx data
This commit is contained in:
@@ -78,10 +78,10 @@ func (d *ArtNetDriver) SetValue(bus string, address uint, value uint8) error {
|
||||
if _, ok := d.Buses[bus]; !ok {
|
||||
return fmt.Errorf("no bus '%s' found", bus)
|
||||
}
|
||||
if d.Buses[bus].Data == nil {
|
||||
if d.Buses[bus].DMX.Data == nil {
|
||||
return fmt.Errorf("no dmx data on bus '%s' found", bus)
|
||||
}
|
||||
d.Buses[bus].Data.SetValue(address, value)
|
||||
d.Buses[bus].SetDMXData(address, value)
|
||||
return nil
|
||||
}
|
||||
|
||||
@@ -105,7 +105,6 @@ func (d *ArtNetDriver) Connect(ip, id string, port uint) error {
|
||||
request := json_data.NewResponse()
|
||||
|
||||
err = json.Unmarshal(data, &request)
|
||||
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
|
Reference in New Issue
Block a user