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 22:55:17 +01:00
parent 20025dae1b
commit 65f03fd4c9
17 changed files with 327 additions and 111 deletions
+9 -1
View File
@@ -2,9 +2,11 @@
package peripheral
import (
"esdi/peripheral/devices"
"fmt"
"path/filepath"
"esdi/peripheral/devices"
"esdi/telemetry"
)
type PeripheralType string
@@ -13,6 +15,12 @@ const (
DisplayPeripheral PeripheralType = "display"
)
type Peripheral interface {
Name() string
SendData(*telemetry.TelemetryData)
RequiredFields() map[int16]telemetry.FieldID
}
type PeripheralDeviceClerk struct {
// mu sync.RWMutex
Devices map[uint8]*PeripheralDevice