it is with great sadness the DOM and event bus go. Its all callbacks now

This commit is contained in:
2026-03-03 14:20:41 +00:00
parent 4cb14dd40f
commit 11dc255303
13 changed files with 82 additions and 538 deletions
+5 -8
View File
@@ -9,9 +9,6 @@ import (
"sync"
"time"
"esdi/tui/internal/events"
"esdi/tui/internal/ui"
"github.com/ESilva15/goirsdk"
)
@@ -42,10 +39,10 @@ func NewStreamingCtrl() *StreamingCtrl {
}
}
func (sc *StreamingCtrl) Stop(bus *events.Bus) {
}
// func (sc *StreamingCtrl) Stop(bus *events.Bus) {
// }
func (sc *StreamingCtrl) Start(bus *events.Bus) {
func (sc *StreamingCtrl) Start() {
// Open the telemetry file
file, err := os.Open("/home/esilva/Desktop/projetos/simracing_peripherals/testTelemetry/supercars_indianapolis.ibt")
if err != nil {
@@ -73,10 +70,10 @@ func (sc *StreamingCtrl) Start(bus *events.Bus) {
delta := currentTime.Sub(startTime)
str := sc.Stringified() + fmt.Sprintf("%v - %7d\n%5f - %5f",
_ = sc.Stringified() + fmt.Sprintf("%v - %7d\n%5f - %5f",
t.UTC(), counter, delta.Seconds(), delta.Seconds()/float64(counter))
bus.Emit(ui.StreamDataEv{Str: str})
// bus.Emit(ui.StreamDataEv{Str: str})
counter++
}
}()