first commit of files
This commit is contained in:
29
driver/artNet.go
Normal file
29
driver/artNet.go
Normal file
@@ -0,0 +1,29 @@
|
||||
package driver
|
||||
|
||||
import "artNet/models"
|
||||
|
||||
type ArtNetDriver struct {
|
||||
Bus []*models.Bus
|
||||
}
|
||||
|
||||
// initialize new Art-Net driver
|
||||
func NewDriver() *ArtNetDriver {
|
||||
return &ArtNetDriver{}
|
||||
}
|
||||
|
||||
// adds new Art-Net interface to driver port 0 = 6454 (default art-net)
|
||||
func (d *ArtNetDriver) NewInterface(ip string, port int) *models.Bus {
|
||||
i := models.NewBus(ip, port)
|
||||
d.Bus = append(d.Bus, i)
|
||||
return i
|
||||
}
|
||||
|
||||
// dmxData[46] = byte(255) // Channel 1: Red
|
||||
// dmxData[47] = byte(255) // Channel 2: Green
|
||||
// dmxData[48] = byte(255) // Channel 3: Blue
|
||||
// dmxData[49] = byte(255) // Channel 4: White
|
||||
// dmxData[50] = byte(255) // Channel 5: Amber
|
||||
// dmxData[51] = byte(255) // Channel 6: UV Lila
|
||||
// dmxData[52] = byte(255) // Channel 7: 0-9 10-255 strobo
|
||||
// dmxData[53] = byte(255) // Channel 8: 0-5 stop 6-127 static position 128-255 Motorgeschwindigkeit
|
||||
// dmxData[54] = byte(255) // Channel 9: 0-50 coincitence 51 -100 two color 101-150 all color
|
Reference in New Issue
Block a user