add OS2L device creation

This commit is contained in:
2024-12-23 17:22:37 +01:00
parent 7cf222c4f9
commit 037735fb85
14 changed files with 476 additions and 292 deletions

View File

@@ -26,7 +26,6 @@ type FTDIPeripheral struct {
serialNumber string // The S/N of the FTDI peripheral
location int // The location of the peripheral
universesNumber int // The number of DMX universes handled by this peripheral
finderName string // The name of the parent finder
programName string // The temp file name of the executable
dmxSender *exec.Cmd // The command to pilot the DMX sender program
stdin io.WriteCloser // For writing in the DMX sender
@@ -38,7 +37,7 @@ type FTDIPeripheral struct {
}
// NewFTDIPeripheral creates a new FTDI peripheral
func NewFTDIPeripheral(name string, serialNumber string, location int, finderName string) (*FTDIPeripheral, error) {
func NewFTDIPeripheral(name string, serialNumber string, location int) (*FTDIPeripheral, error) {
// Create a temporary file
tempFile, err := os.CreateTemp("", "dmxSender*.exe")
if err != nil {
@@ -57,7 +56,6 @@ func NewFTDIPeripheral(name string, serialNumber string, location int, finderNam
programName: tempFile.Name(),
serialNumber: serialNumber,
location: location,
finderName: finderName,
universesNumber: 1,
disconnectChan: make(chan struct{}),
errorsChan: make(chan error, 1),