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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user