11-hardware-definition (#17)

- Detection of FTDI and MIDI peripherals
- Creation od OS2L peripherals
- Optimization

Reviewed-on: #17
This commit was merged in pull request #17.
This commit is contained in:
2025-01-18 14:53:29 +00:00
parent 1052dcc8d5
commit 0e3f57f5fb
45 changed files with 3952 additions and 296 deletions

25
main.go
View File

@@ -2,8 +2,14 @@ package main
import (
"embed"
"time"
"os"
"github.com/rs/zerolog"
"github.com/rs/zerolog/log"
"github.com/wailsapp/wails/v2"
"github.com/wailsapp/wails/v2/pkg/logger"
"github.com/wailsapp/wails/v2/pkg/options"
"github.com/wailsapp/wails/v2/pkg/options/assetserver"
)
@@ -12,6 +18,16 @@ import (
var assets embed.FS
func main() {
// Configure the logger
log.Logger = log.Output(zerolog.ConsoleWriter{
Out: os.Stderr,
TimeFormat: "2006-01-02 15:04:05",
})
zerolog.TimestampFunc = func() time.Time {
return time.Now().Local()
}
zerolog.SetGlobalLevel(zerolog.TraceLevel)
// Create an instance of the app structure
app := NewApp()
@@ -24,13 +40,16 @@ func main() {
AssetServer: &assetserver.Options{
Assets: assets,
},
OnStartup: app.startup,
OnStartup: app.onStartup,
OnDomReady: app.onReady,
OnShutdown: app.onShutdown,
Bind: []interface{}{
app,
},
LogLevel: logger.ERROR,
})
if err != nil {
println("Error:", err.Error())
log.Err(err).Str("file", "main").Msg("unable to start the application")
}
}
}