summaryrefslogtreecommitdiffstats
path: root/lib/vehicle_signal/vehicle_signal_model.dart
diff options
context:
space:
mode:
authorScott Murray <scott.murray@konsulko.com>2023-09-24 12:45:03 -0400
committerScott Murray <scott.murray@konsulko.com>2023-09-24 12:55:47 -0400
commit80a4f8d75a66c22a23e825d4c0fb4065e2e58cb8 (patch)
tree07751588fbd9f0a5cecceabe593a716f01facbac /lib/vehicle_signal/vehicle_signal_model.dart
parent9bc83e64c508ad8c69a3950d5421774f9b53a31f (diff)
Rework to use KUKSA.val databroker gRPC API
Rework to move from the WebSocket API with the older KUKSA.val server to the gRPC "VAL" API of the databroker. Changes include: - All VISS WebSocket API code has been removed, and the signal providers replumbed to be driven by a new VssClient class with a dashboard-specific child class to hold all the gRPC API handling. - The generated code for the VAL API and its dependencies has been checked in under lib/generated, as there still does not seem to be a good way to generate it during the Flutter build. - The "flutter-" prefix has been dropped from the configuration file name (i.e. it's now just "cluster-dashboard.yaml") to match the naming used for the other Flutter applications. The authorization token field name has been renamed to "authorization", and there are new "use-tls" and "ca-certificate" configuration fields. TLS is disabled by default for now, and the default CA certificate is /etc/kuksa.val/CA.pem. - Bumped minimum SDK version to 2.18 in pubspec.yaml to enable "super" keyword support. This matches what the version was set to in the other applications. - The unused navigation support has been removed to simplify maintenance, as it is more likely that it will be replaced with something else in the future than fixed to be usable. - Removed .dart_tool generated output that had been checked in, and added .gitignore file from flutter-homescreen so that things will hopefully stay clean in the future. Since pubspec.lock is not checked in here, it has also been added to .gitignore. Bug-AGL: SPEC-4762 Signed-off-by: Scott Murray <scott.murray@konsulko.com> Change-Id: Id35c569cdbb8476a527717ece7b4bb369c4874b7
Diffstat (limited to 'lib/vehicle_signal/vehicle_signal_model.dart')
-rw-r--r--lib/vehicle_signal/vehicle_signal_model.dart152
1 files changed, 0 insertions, 152 deletions
diff --git a/lib/vehicle_signal/vehicle_signal_model.dart b/lib/vehicle_signal/vehicle_signal_model.dart
deleted file mode 100644
index 90f76e7..0000000
--- a/lib/vehicle_signal/vehicle_signal_model.dart
+++ /dev/null
@@ -1,152 +0,0 @@
-// SPDX-License-Identifier: Apache-2.0
-
-class VehicleSignal {
- VehicleSignal({
- required this.speed,
- required this.rpm,
- required this.fuelLevel,
- required this.coolantTemp,
- required this.isLeftIndicator,
- required this.isRightIndicator,
- required this.selectedGear,
- required this.isLowBeam,
- required this.isHighBeam,
- required this.isHazardLightOn,
- required this.travelledDistance,
- required this.isParkingOn,
- required this.performanceMode,
- required this.ambientAirTemp,
- required this.cruiseControlSpeed,
- required this.isCruiseControlActive,
- required this.isCruiseControlError,
- required this.isMILon,
- required this.isTrunkLocked,
- required this.isTrunkOpen,
- required this.isBatteryCharging,
- //steering switches
- required this.vehicleDistanceUnit,
- required this.isSteeringCruiseEnable,
- required this.isSteeringCruiseSet,
- required this.isSteeringCruiseResume,
- required this.isSteeringCruiseCancel,
- required this.isSteeringLaneWarning,
- required this.isSteeringInfo,
- // map coordinates
- required this.currLat,
- required this.currLng,
- required this.desLat,
- required this.desLng,
- });
- final double speed;
- final double rpm;
- final double fuelLevel;
- final double coolantTemp;
- final double cruiseControlSpeed;
- final bool isLeftIndicator;
- final bool isRightIndicator;
- final String selectedGear;
- final String performanceMode;
- final String ambientAirTemp;
- final bool isLowBeam;
- final bool isHighBeam;
- final bool isParkingOn;
- final bool isHazardLightOn;
- final bool isTrunkOpen;
- final bool isTrunkLocked;
- final bool isMILon;
- final bool isCruiseControlActive;
- final bool isCruiseControlError;
- final bool isBatteryCharging;
- final double travelledDistance;
-
- final String vehicleDistanceUnit;
- final bool isSteeringCruiseEnable;
- final bool isSteeringCruiseSet;
- final bool isSteeringCruiseResume;
- final bool isSteeringCruiseCancel;
- final bool isSteeringLaneWarning;
- final bool isSteeringInfo;
-
- final double currLat;
- final double currLng;
- final double desLat;
- final double desLng;
-
- VehicleSignal copyWith({
- double? speed,
- double? rpm,
- double? fuelLevel,
- double? coolantTemp,
- bool? isLeftIndicator,
- bool? isRightIndicator,
- String? selectedGear,
- String? performanceMode,
- String? ambientAirTemp,
- bool? isLowBeam,
- bool? isHighBeam,
- bool? isHazardLightOn,
- bool? isParkingOn,
- bool? isTrunkLocked,
- bool? isTrunkOpen,
- bool? isMILon,
- bool? isCruiseControlError,
- bool? isCruiseControlActive,
- bool? isBatteryCharging,
- double? travelledDistance,
- double? cruiseControlSpeed,
- // Steering
- String? vehicleDistanceUnit,
- bool? isSteeringCruiseEnable,
- bool? isSteeringCruiseSet,
- bool? isSteeringCruiseResume,
- bool? isSteeringCruiseCancel,
- bool? isSteeringLaneWarning,
- bool? isSteeringInfo,
- // map coordinates
- double? currLat,
- double? currLng,
- double? desLat,
- double? desLng,
- }) {
- return VehicleSignal(
- speed: speed ?? (this.speed),
- rpm: rpm ?? this.rpm,
- fuelLevel: fuelLevel ?? this.fuelLevel,
- coolantTemp: coolantTemp ?? this.coolantTemp,
- isLeftIndicator: isLeftIndicator ?? this.isLeftIndicator,
- isRightIndicator: isRightIndicator ?? this.isRightIndicator,
- selectedGear: selectedGear ?? this.selectedGear,
- isLowBeam: isLowBeam ?? this.isLowBeam,
- isHighBeam: isHighBeam ?? this.isHighBeam,
- isHazardLightOn: isHazardLightOn ?? this.isHazardLightOn,
- travelledDistance: travelledDistance ?? this.travelledDistance,
- isParkingOn: isParkingOn ?? this.isParkingOn,
- performanceMode: performanceMode ?? this.performanceMode,
- isTrunkLocked: isTrunkLocked ?? this.isTrunkLocked,
- isTrunkOpen: isTrunkOpen ?? this.isTrunkOpen,
- ambientAirTemp: ambientAirTemp ?? this.ambientAirTemp,
- isMILon: isMILon ?? this.isMILon,
- isCruiseControlActive:
- isCruiseControlActive ?? this.isCruiseControlActive,
- cruiseControlSpeed: cruiseControlSpeed ?? this.cruiseControlSpeed,
- isCruiseControlError: isCruiseControlError ?? this.isCruiseControlError,
- isBatteryCharging: isBatteryCharging ?? this.isBatteryCharging,
- isSteeringCruiseEnable:
- isSteeringCruiseEnable ?? this.isSteeringCruiseEnable,
- isSteeringCruiseSet: isSteeringCruiseSet ?? this.isSteeringCruiseSet,
- isSteeringCruiseResume:
- isSteeringCruiseResume ?? this.isSteeringCruiseResume,
- isSteeringCruiseCancel:
- isSteeringCruiseCancel ?? this.isSteeringCruiseCancel,
- isSteeringInfo: isSteeringInfo ?? this.isSteeringInfo,
- isSteeringLaneWarning:
- isSteeringLaneWarning ?? this.isSteeringLaneWarning,
- vehicleDistanceUnit: vehicleDistanceUnit ?? this.vehicleDistanceUnit,
- //
- currLat: currLat ?? this.currLat,
- currLng: currLng ?? this.currLng,
- desLat: desLat ?? this.desLat,
- desLng: desLng ?? this.desLng,
- );
- }
-}