syntax improvement

This commit is contained in:
2025-11-24 19:23:50 +01:00
parent 76b705012c
commit ea46430b71
2 changed files with 22 additions and 22 deletions

15
app.go
View File

@@ -5,7 +5,6 @@ import (
"dmxconnect/hardware"
"fmt"
"io"
"time"
"github.com/rs/zerolog/log"
@@ -20,20 +19,16 @@ type App struct {
cancelFunc context.CancelFunc
wait sync.WaitGroup
hardwareManager *hardware.HardwareManager // For managing all the hardware
wmiMutex sync.Mutex // Avoid some WMI operations at the same time
projectInfo ProjectInfo // The project information structure
projectSave string // The file name of the project
hardwareManager *hardware.Manager // For managing all the hardware
wmiMutex sync.Mutex // Avoid some WMI operations at the same time
projectInfo ProjectInfo // The project information structure
projectSave string // The file name of the project
}
// NewApp creates a new App application struct
func NewApp() *App {
// Create a new hadware manager
hardwareManager := hardware.NewHardwareManager()
hardwareManager.RegisterFinder(hardware.NewFTDIFinder(3 * time.Second))
hardwareManager.RegisterFinder(hardware.NewOS2LFinder())
hardwareManager.RegisterFinder(hardware.NewMIDIFinder(3 * time.Second))
hardwareManager := hardware.NewManager()
return &App{
hardwareManager: hardwareManager,
projectSave: "",