diff --git a/vehicle/vw/eudataact/store.go b/vehicle/vw/eudataact/store.go index 2d3bf6a11..784c21f32 100644 --- a/vehicle/vw/eudataact/store.go +++ b/vehicle/vw/eudataact/store.go @@ -1,6 +1,7 @@ package eudataact import ( + "log" "maps" "slices" "sync" @@ -73,7 +74,7 @@ func (s *store) state(vin string) *vehicleState { // merged and merges them into the vehicle's map oldest to newest. It returns the // newest dataset's delivery time (used to schedule the next poll). // On first poll latest maxBackfill content datasets are downloaded. -func (s *store) update(vin string) (time.Time, error) { +func (s *store) update(log *log.Logger, vin string) (time.Time, error) { v := s.state(vin) v.mu.Lock() diff --git a/vehicle/vw/eudataact/types.go b/vehicle/vw/eudataact/types.go index f8d763d31..465c8fb36 100644 --- a/vehicle/vw/eudataact/types.go +++ b/vehicle/vw/eudataact/types.go @@ -6,6 +6,7 @@ import ( "encoding/json" "errors" "io" + "log" "slices" "strings" "time" @@ -144,7 +145,7 @@ func contentDatasets(list []dataset) ([]dataset, error) { // data field name. On duplicate field names the entry with the newest timestamp // wins. The VIN is returned so the caller can drop datasets that do not belong // to the requested vehicle. -func parseDataset(b []byte) (map[string]point, error) { +func parseDataset(log *log.Logger, b []byte) (map[string]point, error) { zr, err := zip.NewReader(bytes.NewReader(b), int64(len(b))) if err != nil { return nil, err @@ -172,6 +173,8 @@ func parseDataset(b []byte) (map[string]point, error) { return nil, err } + log.Println(raw) + var ds datasetFile if err := json.Unmarshal(raw, &ds); err != nil { return nil, err