summaryrefslogtreecommitdiffstats
path: root/lib/data/models/vehicle.dart
AgeCommit message (Collapse)AuthorFilesLines
2024-08-19Fix engine speed signal typeScott Murray1-5/+5
Update use of the VSS engine speed (RPM) signal to match the fix done to the AGL VSS overlays to restore the upstream integer data type. Bug-AGL: SPEC-5204 Change-Id: I1993cf291cdc2ca056f4fb2b389ef4eee5558473 Signed-off-by: Scott Murray <scott.murray@konsulko.com> (cherry picked from commit 3ef28eeae6e3336232ab13d0d934aa82892dfe74)
2024-01-04Configurable units fixesScott Murray1-8/+8
Notable changes: - Add pressure unit to the units model. - Add tire pressure unit configuration page under settings. - Rework the VSS client, provider, and the associated handling in the vehicle and audio state providers to make the signal updating code reusable for processing the result of VAL API get commands. - Add logic to get the initial values of the used VSS signals so the initial application state looks sane in demo scenarios. - Add VSS signal support to the units provider so that changes will be pushed out for e.g. IC use. - Fix pressure unit use in various widgets. - Fix up range calculation for dashboard to correctly account for units and the incoming VSS value being in meters. - Fix some unit naming inconsistencies around capitalization. Bug-AGL: SPEC-5031, SPEC-5032 Change-Id: I33ac735dfbe35283bd30c92aa157cbdb7af1837c Signed-off-by: Scott Murray <scott.murray@konsulko.com>
2023-12-18Implement audio settingsScott Murray1-77/+62
Changes: - Rework KUKSA.val "VAL" gRPC API implementation to separate it from the vehicle model + notifier, and more easily allow using it from other notifiers. - Move volume handling from the vehicle model + notifier to the audio set for clarity. - Wire up the new VSS audio signals in the audio notifier. The "rearFront" variable naming has been changed to "fade" in several places to match expected terminology. - Add a balance slider to the audio settings page. - Change the min/max labels on the fade slider to be Text instead of Icon's since we do not have the equivalent to use with the balance slider, and text seems like it'd be what you would want for any potential future internationalization. - Rework configuration file to be usable from anywhere via a RiverPod Provider instead of tied to the vehicle notifier code, and shifted the background and hybrid animation flags to be handled with it. This change removes the built-in asset with defaults in favor of maintaining the defaults for the ICS environment in the AppConfig and KuksaConfig classes, with a goal of avoiding the need for using async methods in the config provider. - Change some notifiers from using StateNotifier to the RiverPod 2.0 Notifier class for improved flexibility. The other notifiers will be updated in future work. - Added select's to several ref.watches in the new hybrid animation code to avoid unnecessary repaints. - Fix several spelling issues in method and parameter names across the codebase. Bug-AGL: SPEC-5001 Change-Id: Iefae417fa870405d659303497d96e519e6b6d1de Signed-off-by: Scott Murray <scott.murray@konsulko.com>
2023-12-08More signaling fixesScott Murray1-21/+31
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>
2023-11-29VSS signal fixesScott Murray1-2/+2
Changes: - Fix sets of HVAC and volume control signals to update the actuator target value instead of the current value. With the KUKSA.val ecosystem, it is the actuator implementation / backend that updates the current value after actuating. - Add authorization token to subscribe request metadata if it is present. - Switch type used for engine speed to double to match VSS signal definition. This fixes receiving updates, and avoids needing to convert types as well. - Added logic to push out the HVAC fan speed setting and handle external updates. - Remove unused core/constants/paths.dart file to avoid confusion over VSS signals used and their variable naming. Bug-AGL: SPEC-4999 Change-Id: Ifbf69af25e3c563e9c707a4145089e4242b89bcd Signed-off-by: Scott Murray <scott.murray@konsulko.com>
2023-11-17Disable value animation at start up % update FuelLevel path.Lisandro Pérez Meyer1-9/+32
Also: - Remove some warnings. - Improvements of hvac temp buttons. Original from: Dominik Wawrzonek <dwawrzonek@ics.com> Bug-AGL: SPEC-4971 Change-Id: Ic10e9ec5ec79f79f63d951469924325f29ea3fa7 Signed-off-by: Lisandro Pérez Meyer <lpmeyer@ics.com>
2023-11-16Disable value animation at start up % update FuelLevel path.Lisandro Pérez Meyer1-3/+3
Remove some warnings. Original from: Dominik Wawrzonek <dwawrzonek@ics.com> Bug-AGL: SPEC-4971 Change-Id: I3693fa74f7995b4dcb016812403ed800702cb81c Signed-off-by: Lisandro Pérez Meyer <lpmeyer@ics.com>
2023-11-14Initial cleanup push.Lisandro Pérez Meyer1-0/+233
Based on agldemo2024 on commit 2a5dc04d801134338150c3f6afc67eaa65599763 Disable device preview. Disable Lottie animation. The original commit was b3c493c340fcb4bb0a937692838fc830bec3e9ea but I am just keeping this change, because the json did not really needed to change. I think. Signed-off-by: Lisandro Pérez Meyer <lpmeyer@ics.com>