summaryrefslogtreecommitdiffstats
path: root/lib/core
diff options
context:
space:
mode:
Diffstat (limited to 'lib/core')
-rw-r--r--lib/core/constants/constants.dart4
-rw-r--r--lib/core/constants/val_client_helper.dart58
-rw-r--r--lib/core/constants/vss_path.dart12
3 files changed, 14 insertions, 60 deletions
diff --git a/lib/core/constants/constants.dart b/lib/core/constants/constants.dart
index 03c1f8a..65aa680 100644
--- a/lib/core/constants/constants.dart
+++ b/lib/core/constants/constants.dart
@@ -9,8 +9,8 @@ const maxSpeed = 240.0;
const maxRpm = 8000;
final GlobalKey<ScaffoldState> homeScaffoldKey = GlobalKey();
const debugDisplay = bool.fromEnvironment('DEBUG_DISPLAY');
-const disableBkgAnimation = bool.fromEnvironment('DISABLE_BKG_ANIMATION');
-const randomHybridAnimation = bool.fromEnvironment('RANDOM_HYBRID_ANIMATION');
+const disableBkgAnimationDefault = bool.fromEnvironment('DISABLE_BKG_ANIMATION');
+const randomHybridAnimationDefault = bool.fromEnvironment('RANDOM_HYBRID_ANIMATION');
diff --git a/lib/core/constants/val_client_helper.dart b/lib/core/constants/val_client_helper.dart
deleted file mode 100644
index 60b3842..0000000
--- a/lib/core/constants/val_client_helper.dart
+++ /dev/null
@@ -1,58 +0,0 @@
-import 'package:protos/protos.dart';
-
-class ValClientHelper {
- final VALClient stub;
- final String authorization;
-
- ValClientHelper({required this.stub, required this.authorization});
-
- void setUint32(String path, int value, [bool actuator = true]) async {
- var dp = Datapoint()..uint32 = value;
- set(path, dp, actuator);
- }
-
- void setInt32(String path, int value, [bool actuator = true]) async {
- var dp = Datapoint()..int32 = value;
- set(path, dp, actuator);
- }
-
- void setBool(String path, bool value, [bool actuator = true]) async {
- var dp = Datapoint()..bool_12 = value;
- set(path, dp, actuator);
- }
-
- void setString(String path, String value, [bool actuator = true]) async {
- var dp = Datapoint()..string = value;
- set(path, dp, actuator);
- }
-
- void setFloat(String path, double value, [bool actuator = true]) async {
- var dp = Datapoint()..float = value;
- set(path, dp, actuator);
- }
-
- void setDouble(String path, double value, [bool actuator = true]) async {
- var dp = Datapoint()..double_18 = value;
- set(path, dp, actuator);
- }
-
- void set(String path, Datapoint dp, bool actuator) async {
- var entry = DataEntry()..path = path;
- var update = EntryUpdate();
- if (actuator) {
- entry.actuatorTarget = dp;
- update.fields.add(Field.FIELD_ACTUATOR_TARGET);
- } else {
- entry.value = dp;
- update.fields.add(Field.FIELD_VALUE);
- }
- update.entry = entry;
- var request = SetRequest();
- request.updates.add(update);
- Map<String, String> metadata = {};
- if (authorization.isNotEmpty) {
- metadata = {'authorization': "Bearer $authorization"};
- }
- await stub.set(request, options: CallOptions(metadata: metadata));
- }
-}
diff --git a/lib/core/constants/vss_path.dart b/lib/core/constants/vss_path.dart
index 99f3d60..afba8de 100644
--- a/lib/core/constants/vss_path.dart
+++ b/lib/core/constants/vss_path.dart
@@ -11,6 +11,14 @@ class VSSPath {
'Vehicle.Powertrain.FuelSystem.RelativeLevel';
static const String vehicleMediaVolume =
'Vehicle.Cabin.Infotainment.Media.Volume';
+ static const String vehicleMediaBalance =
+ 'Vehicle.Cabin.Infotainment.Media.Audio.Balance';
+ static const String vehicleMediaFade =
+ 'Vehicle.Cabin.Infotainment.Media.Audio.Fade';
+ static const String vehicleMediaBass =
+ 'Vehicle.Cabin.Infotainment.Media.Audio.Bass';
+ static const String vehicleMediaTreble =
+ 'Vehicle.Cabin.Infotainment.Media.Audio.Treble';
static const String vehicleIsChildLockActiveLeft =
'Vehicle.Cabin.Door.Row2.DriverSide.IsChildLockActive';
static const String vehicleIsChildLockActiveRight =
@@ -47,6 +55,10 @@ class VSSPath {
vehicleRange,
vehicleFuelLevel,
vehicleMediaVolume,
+ vehicleMediaBalance,
+ vehicleMediaFade,
+ vehicleMediaBass,
+ vehicleMediaTreble,
vehicleIsChildLockActiveLeft,
vehicleIsChildLockActiveRight,
vehicleFrontLeftTire,