major change of server slim it down

This commit is contained in:
Adrian Zuercher
2025-04-21 09:53:45 +02:00
parent 11c8340be5
commit 2273a6140f
2 changed files with 0 additions and 30 deletions

View File

@@ -1,25 +0,0 @@
package models
import "fmt"
type Device struct {
startAddress uint
length uint
channels *DMX
}
func NewDevice(startAddress uint, channels uint, dmx *DMX) *Device {
return &Device{
startAddress: startAddress,
length: channels,
channels: dmx,
}
}
func (d *Device) SetChannelValue(channel uint, value uint8) error {
if d.length == channel {
return fmt.Errorf("channel out of range %d", channel)
}
d.channels.SetValue(d.startAddress+channel, value)
return nil
}

View File

@@ -1,5 +0,0 @@
package models
type Get struct {
Bus uint `json:"bus"`
}