this is a doozy - device auto discovery and handling

The main goal was to decouple more things
We got devices being looked for in the background and the stream view
is like a device now too
This commit is contained in:
2026-09-17 23:01:50 +01:00
parent 1321977f18
commit a6ab64117c
17 changed files with 327 additions and 111 deletions
+20 -2
View File
@@ -1,9 +1,27 @@
package cdashdisplay
import "esdi/peripheral/devices"
import (
"esdi/peripheral/devices"
"esdi/telemetry"
)
// TODO: I believe we don't need the #esdi/peripheral/devices thing anymore
const (
ID = devices.CDashDisplayDevID
Name = devices.CDashDisplayDevName
NAME = devices.CDashDisplayDevName
)
func (cds *CDashDisplay) Name() string {
return NAME
}
func (cds *CDashDisplay) RequiredFields() map[int16]telemetry.FieldID {
fields := make(map[int16]telemetry.FieldID, len(cds.State.Layout.Windows))
for _, w := range cds.State.Layout.Windows {
fieldID, _ := telemetry.GetFieldID(w.UIData.TelemetryField)
fields[w.UIData.IDX] = fieldID
}
return fields
}