diff options
author | Scott Murray <scott.murray@konsulko.com> | 2023-12-08 10:28:48 +0900 |
---|---|---|
committer | Scott Murray <scott.murray@konsulko.com> | 2023-12-08 10:54:30 +0900 |
commit | 71d46d03850653c0229c678de197c6f94fceb477 (patch) | |
tree | b91915e70c9092d304d3172b93eb61ffb0c287c5 /lib/data/data_providers | |
parent | dca5f5bc58fc3b25972bedc82827b71300d66adc (diff) |
More signaling fixes
Changes:
- Fixed parsing of engine speed from databroker response to use
uint32 again to match VSS type.
- Shifted engine speed definitions in Vehicle class next to
vehicle speed since that seems a bit saner than having it down at
the bottom with the temperature values.
- Removed duplicate temperature state from temperature control
widget, and pushed the use of the providers from the HVAC widget.
The existing scheme was somewhat broken with respect to having the
values managed with RiverPod, e.g. new values from external updates
would not show up until switching away and back to the HVAC tab.
- Moved HVAC "SYNC" button state into the Vehicle state class to
manage it with RiverPod, and allow use from both the HVAC and
temperature widgets so that the expected behavior can actually be
implemented.
- Fixed brace usage in a couple of debugPrint statements.
Bug-AGL: SPEC-4999
Change-Id: I07ea49d20fedca47e6f9e54f45ad34296e0a873c
Signed-off-by: Scott Murray <scott.murray@konsulko.com>
Diffstat (limited to 'lib/data/data_providers')
-rw-r--r-- | lib/data/data_providers/vehicle_notifier.dart | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/lib/data/data_providers/vehicle_notifier.dart b/lib/data/data_providers/vehicle_notifier.dart index 1b2a31a..3a385a3 100644 --- a/lib/data/data_providers/vehicle_notifier.dart +++ b/lib/data/data_providers/vehicle_notifier.dart @@ -352,7 +352,7 @@ class VehicleNotifier extends StateNotifier<Vehicle> { isChildLockActiveRight: !state.isChildLockActiveRight); break; default: - debugPrint("ERROR: Unexpected side value $side}"); + debugPrint("ERROR: Unexpected side value ${side}"); break; } } catch (e) { @@ -391,7 +391,7 @@ class VehicleNotifier extends StateNotifier<Vehicle> { state = state.copyWith(passengerTemperature: value); break; default: - debugPrint("ERROR: Unexpected side value $side}"); + debugPrint("ERROR: Unexpected side value ${side}"); break; } } catch (e) { @@ -399,6 +399,10 @@ class VehicleNotifier extends StateNotifier<Vehicle> { } } + void setTemperatureSynced(bool newValue) { + state = state.copyWith(temperatureSynced: newValue); + } + void updateFanSpeed(int newValue) { // Convert local 0-3 setting to the 0-100 the VSS signal expects var targetFanSpeed = 0; @@ -465,7 +469,7 @@ class VehicleNotifier extends StateNotifier<Vehicle> { isRecirculationActive: !state.isRecirculationActive); break; default: - debugPrint("ERROR: Unexpected mode value $mode}"); + debugPrint("ERROR: Unexpected mode value ${mode}"); break; } } catch (e) { |