remove commented code and made the subscription be based on a list

This commit is contained in:
2026-09-18 00:05:50 +01:00
parent dda300ce6b
commit c888dc5436
9 changed files with 11 additions and 59 deletions
+1 -3
View File
@@ -115,7 +115,7 @@ func (b *BeamNG) Stream() (<-chan telemetry.TelemetryData, error) {
return b.streamCh, nil
}
func (b *BeamNG) Subscribe(requestFields map[int16]telemetry.FieldID) {
func (b *BeamNG) Subscribe(requestFields []telemetry.FieldID) {
// NOTE: document how the Subscribe funtion works
slog.Debug(fmt.Sprintf("Len Req: %d\n", len(requestFields)))
@@ -126,8 +126,6 @@ func (b *BeamNG) Subscribe(requestFields map[int16]telemetry.FieldID) {
pendingBinds := make([]telemetry.FieldID, telemetry.MaxFields)
for _, id := range requestFields {
// b.data.Values[id].IDs = append(b.data.Values[id].IDs, winID)
switch id {
case telemetry.RPMStateColour:
b.data.VirtualBinds = append(b.data.VirtualBinds, telemetry.NewRPMLights())