generated from thinkode/modelRepository
syntax improvement
This commit is contained in:
15
app.go
15
app.go
@@ -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: "",
|
||||
|
||||
Reference in New Issue
Block a user