From be4da312ad1f33cea62ba7c8768bb4060ee6a178 Mon Sep 17 00:00:00 2001 From: Scott Murray Date: Mon, 2 Jan 2023 15:35:50 -0500 Subject: VSS signal fixes Changes: - Update some signals for VSS 3.0 changes that were missed on the initial pass. - Improve error handling in VSS parsing to display error message from the VIS server. - Add explicit knob to disable navigation display with a default value of disabled, so that mode switches triggered by the steering wheel "Info" signal do not unexpectedly activate it. Bug-AGL: SPEC-4664 Signed-off-by: Scott Murray Change-Id: Ib5fba613053f2860a0a5ff7331c78d6ab9590848 (cherry picked from commit c605ab037edcb35a7aa365fa6abe7fd6289d8a19) --- lib/vehicle_signal/vehicle_signal_methods.dart | 8 ++++---- lib/vehicle_signal/vehicle_signal_path.dart | 20 +++++++++----------- 2 files changed, 13 insertions(+), 15 deletions(-) (limited to 'lib/vehicle_signal') diff --git a/lib/vehicle_signal/vehicle_signal_methods.dart b/lib/vehicle_signal/vehicle_signal_methods.dart index 04c740c..7f3d8e0 100644 --- a/lib/vehicle_signal/vehicle_signal_methods.dart +++ b/lib/vehicle_signal/vehicle_signal_methods.dart @@ -2,6 +2,7 @@ import 'dart:convert'; import 'dart:io'; +import 'package:flutter/rendering.dart'; import 'package:flutter_cluster_dashboard/cluster_config.dart'; import 'package:flutter_riverpod/flutter_riverpod.dart'; import 'package:flutter_cluster_dashboard/map/networkPolyline.dart'; @@ -221,8 +222,7 @@ class VISS { vehicleSignal.update(isCruiseControlError: dp['value']); break; case VSPath.vehicleCruiseControlSpeedSet: - vehicleSignal.update( - cruiseControlSpeed: dp['value']); + vehicleSignal.update(cruiseControlSpeed: dp['value']); break; case VSPath.vehicleCruiseControlSpeedisActive: vehicleSignal.update(isCruiseControlActive: dp['value']); @@ -306,8 +306,8 @@ class VISS { .containsKey("dp")) { print("ERROR:'dp':key not found !"); } - } else { - print("ERROR:'data':key not found!"); + } else if (dataMap.containsKey("error")) { + print("ERROR: ${dataMap['error']['message']}"); } } } diff --git a/lib/vehicle_signal/vehicle_signal_path.dart b/lib/vehicle_signal/vehicle_signal_path.dart index 25cc27a..4902811 100644 --- a/lib/vehicle_signal/vehicle_signal_path.dart +++ b/lib/vehicle_signal/vehicle_signal_path.dart @@ -6,7 +6,7 @@ class VSPath { "Vehicle.Powertrain.CombustionEngine.Speed"; static const String vehicleFuelLevel = "Vehicle.Powertrain.FuelSystem.Level"; static const String vehicleCoolantTemp = - "Vehicle.Powertrain.CombustionEngine.Engine.ECT"; + "Vehicle.Powertrain.CombustionEngine.ECT"; static const String vehicleLeftIndicator = "Vehicle.Body.Lights.IsLeftIndicatorOn"; static const String vehicleRightIndicator = @@ -19,22 +19,22 @@ class VSPath { static const String vehicleParkingLightOn = "Vehicle.Body.Lights.IsParkingOn"; static const String vehicleHazardLightOn = "Vehicle.Body.Lights.IsHazardOn"; static const String vehicleTravelledDistance = "Vehicle.TravelledDistance"; - static const String vehicleTrunkLocked = "Vehicle.Body.Trunk.IsLocked"; - static const String vehicleTrunkOpen = "Vehicle.Body.Trunk.IsOpen"; + static const String vehicleTrunkLocked = "Vehicle.Body.Trunk.Rear.IsLocked"; + static const String vehicleTrunkOpen = "Vehicle.Body.Trunk.Rear.IsOpen"; // \"normal\",\"sport\",\"economy\",\"snow\",\"rain\"] static const String vehiclePerformanceMode = "Vehicle.Powertrain.Transmission.PerformanceMode"; static const String vehicleAmbientAirTemperature = - "Vehicle.AmbientAirTemperature"; - static const String vehicleMIL = "Vehicle.OBD.Status.MIL"; + "Vehicle.Exterior.AirTemperature"; + static const String vehicleMIL = "Vehicle.OBD.Status.IsMILOn"; static const String vehicleCruiseControlError = - "Vehicle.ADAS.CruiseControl.Error"; + "Vehicle.ADAS.CruiseControl.IsError"; static const String vehicleCruiseControlSpeedSet = "Vehicle.ADAS.CruiseControl.SpeedSet"; static const String vehicleCruiseControlSpeedisActive = "Vehicle.ADAS.CruiseControl.IsActive"; static const String vehicleBatteryChargingStatus = - "Vehicle.Powertrain.Battery.Charging.Status"; + "Vehicle.Powertrain.TractionBattery.Charging.IsCharging"; static const String steeringCruiseEnable = "Vehicle.Cabin.SteeringWheel.Switches.CruiseEnable"; @@ -51,10 +51,8 @@ class VSPath { static const String vehicleDistanceUnit = "Vehicle.Cabin.Infotainment.HMI.DistanceUnit"; - static const String vehicleCurrLat = - "Vehicle.Cabin.Infotainment.Navigation.CurrentLocation.Latitude"; - static const String vehicleCurrLng = - "Vehicle.Cabin.Infotainment.Navigation.CurrentLocation.Longitude"; + static const String vehicleCurrLat = "Vehicle.CurrentLocation.Latitude"; + static const String vehicleCurrLng = "Vehicle.CurrentLocation.Longitude"; static const String vehicleDesLat = "Vehicle.Cabin.Infotainment.Navigation.DestinationSet.Latitude"; static const String vehicleDesLng = -- cgit 1.2.3-korg