generated from thinkode/modelRepository
peripheral setting save
This commit is contained in:
@@ -38,7 +38,6 @@ type FTDIPeripheral struct {
|
||||
func NewFTDIPeripheral(name string, serialNumber string, location int) (*FTDIPeripheral, error) {
|
||||
log.Info().Str("file", "FTDIPeripheral").Str("name", name).Str("s/n", serialNumber).Int("location", location).Msg("FTDI peripheral created")
|
||||
settings := make(map[string]interface{})
|
||||
settings["universesNumber"] = uint64(1)
|
||||
return &FTDIPeripheral{
|
||||
name: name,
|
||||
dmxSender: nil,
|
||||
@@ -172,6 +171,12 @@ func (p *FTDIPeripheral) Deactivate(ctx context.Context) error {
|
||||
return fmt.Errorf("unable to deactivate: not connected")
|
||||
}
|
||||
|
||||
// SetPeripheralSetting sets a specific setting for this peripheral
|
||||
func (p *FTDIPeripheral) SetPeripheralSetting(settingName string, settingValue interface{}) error {
|
||||
p.settings[settingName] = settingValue
|
||||
return nil
|
||||
}
|
||||
|
||||
// SetDeviceProperty sends a command to the specified device
|
||||
func (p *FTDIPeripheral) SetDeviceProperty(ctx context.Context, uint32, channelNumber uint32, channelValue byte) error {
|
||||
if p.dmxSender != nil {
|
||||
|
||||
Reference in New Issue
Block a user