has way too many things

In short: added the ability to detect when a device has disconnected.
From this we have to achieve a way of:
- reconnecting the device
- re-subscribing to the fields it needs (it should already be subscribed
since the ESDI didn't stop tho - but for the sake of it, or in case a
device joins later)
- start sending data to it (which should be automatic given how we are
handling the devices)
This commit is contained in:
2026-09-20 15:06:48 +01:00
parent 174b27004f
commit a5c465a203
14 changed files with 387 additions and 197 deletions
+1 -1
View File
@@ -110,7 +110,7 @@ func (sc *StreamingCtrl) StartStop() {
slog.Debug("setting the data stream for device servie")
sc.DevService.SetTelemetryChannel(sc.TelemServ.SubscribeListener("DeviceService", 1))
dev, err := sc.DevService.GetDevice(uidevice.NAME)
dev, err := sc.DevService.GetPeripheral(uidevice.NAME)
if err == nil {
if uiDev, ok := dev.(*uidevice.UIDevice); ok {
sc.TelemetryCh = uiDev.DataChannel()