From 0d010f6c116360f762f67a52d3a9a900cf0b2e57 Mon Sep 17 00:00:00 2001 From: andig Date: Thu, 25 Jun 2026 11:18:33 +0200 Subject: [PATCH] DriveSomethingGreater: log data point id before name (#31202) --- vehicle/vw/eudataact/store.go | 2 +- vehicle/vw/eudataact/types.go | 8 +++++--- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/vehicle/vw/eudataact/store.go b/vehicle/vw/eudataact/store.go index 986cabbde..f6449a710 100644 --- a/vehicle/vw/eudataact/store.go +++ b/vehicle/vw/eudataact/store.go @@ -161,7 +161,7 @@ func (s *store) snapshot(vin string) map[string]point { func logData(log *util.Logger, data map[string]point) { for _, k := range slices.Sorted(maps.Keys(data)) { p := data[k] - log.DEBUG.Printf("recv %s: %s (%s)", k, p.Value, p.Timestamp.Local().Format("2006-01-02 15:04:05")) + log.DEBUG.Printf("recv %s %s: %s (%s)", p.Key, p.Name, p.Value, p.Timestamp.Local().Format("2006-01-02 15:04:05")) } } diff --git a/vehicle/vw/eudataact/types.go b/vehicle/vw/eudataact/types.go index 35b2ff6f5..ece4da3ca 100644 --- a/vehicle/vw/eudataact/types.go +++ b/vehicle/vw/eudataact/types.go @@ -84,9 +84,11 @@ type dataPoint struct { TimestampUtc *time.Time `json:"timestampUtc"` } -// point is a decoded data point: its value, the time it was recorded and the -// delivery sequence of the dataset it last arrived in (higher Seq is newer). +// point is a decoded data point: its unique GUID (Key), delivered field Name, +// value, record time and dataset delivery sequence (higher Seq is newer). type point struct { + Key string + Name string Value string Timestamp time.Time Seq uint64 @@ -228,7 +230,7 @@ func points(data []dataPoint) map[string]point { if p.TimestampUtc != nil { ts = *p.TimestampUtc } - pt := point{Value: p.Value, Timestamp: ts} + pt := point{Key: p.Key, Name: p.DataFieldName, Value: p.Value, Timestamp: ts} set(p.DataFieldName, pt) if _, ok := knownKeys[p.Key]; ok {