This commit is contained in:
Adrian Zürcher
2025-04-29 09:16:27 +02:00
parent 2839b615c3
commit 83cbcdaa42
8 changed files with 207 additions and 164 deletions

View File

@@ -14,9 +14,9 @@ type ArtNetDriver struct {
Name string `yaml:"driver" json:"driver"`
Buses map[string]*models.Bus `yaml:"buses,omitempty" json:"buses,omitempty"`
cfgHandler *cfg.Cfg `yaml:"-" json:"-"`
Conn *client.Client `yaml:"-"`
Subscriptions models.Subscriptions `yaml:"-"`
Log *logging.Logger `yaml:"-"`
Conn *client.Client `yaml:"-" json:"-"`
Subscriptions models.Subscriptions `yaml:"-" json:"-"`
Log *logging.Logger `yaml:"-" json:"-"`
}
// initialize new Art-Net driver
@@ -72,7 +72,6 @@ func (d *ArtNetDriver) LoadCfg() error {
// adds new Art-Net bus/interface to driver port 0 = 6454 (default art-net)
func (d *ArtNetDriver) NewBus(name, ip string, port int) *models.Bus {
b := models.NewBus(name, ip, port)
b.Start(d.Log)
d.Buses[name] = b
return b
}