summaryrefslogtreecommitdiffstats
path: root/lib/presentation
AgeCommit message (Collapse)AuthorFilesLines
2024-08-19Fixed issue with shuffle and loop icons in music player screenDominik Wawrzonek1-7/+12
Added SingleChildScrollView wrapped by Expanded widget to prevent overflow long songDetial text. Hidden text can be seen after horizontal gesture scroll. Bug-AGL: SPEC-5206 Change-Id: I439517bfdf151cd66b75a4f3eb7f1d14978d6010 Signed-off-by: Dominik Wawrzonek<dwawrzonek@ics.com> (cherry picked from commit 52efc5aa4cc90562da2ad168665d1f1229ad6794)
2024-08-19Fix engine speed signal typeScott Murray1-1/+1
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-08-01Add support for CI screenshot testingScott Murray1-0/+20
Rework the high-level App & AppView widgets a bit to allow conditionally displaying a simple fixed pattern if the HOMESCREEN_DEMO_CI environment variable is set to anything other than "0". The pattern displayed matches what the Qt homescreen shows for this to allow the CI test to be common. Bug-AGL: SPEC-5203 Change-Id: I36ed77c91304e3b6cdbce6a7350831d52d20d378 Signed-off-by: Scott Murray <scott.murray@konsulko.com> (cherry picked from commit 25b6a079d5fe9c1365d776298ae5230a4de1ba16)
2024-01-23Improve background disablingricefish_18.0.0ricefish/18.0.0quillback_17.1.4quillback_17.1.3quillback_17.1.2quillback_17.1.1quillback_17.1.0quillback_17.0.2quillback_17.0.1quillback_17.0.0quillback/17.1.4quillback/17.1.3quillback/17.1.2quillback/17.1.1quillback/17.1.0quillback/17.0.2quillback/17.0.1quillback/17.0.018.0.017.1.417.1.317.1.217.1.117.1.017.0.217.0.117.0.0Scott Murray1-12/+25
Rework things to show the first frame of the background animation when the animation is disabled. A new 'plain-bg' option has been added to the configuration in case the previous behavior is still desired. Bug-AGL: SPEC-5054 Change-Id: I15dde41fe8472bea8ef9690ad188ee6d2ba5c3af Signed-off-by: Scott Murray <scott.murray@konsulko.com>
2024-01-23Connect audio settings buttonScott Murray7-34/+24
Rework to connect the audio settings button on the media pages to the appropriate settings page, and have the back button go back to the expected previous page. To enable this, the global AppState provider was reworked to track the previous page and add explicit update and back member functions. Bug-AGL: SPEC-5030 Change-Id: I5858d1b1bf511a184b6538b2ce8c183b00c24fc6 Signed-off-by: Scott Murray <scott.murray@konsulko.com>
2024-01-04Rotate dashboard gaugesScott Murray1-109/+113
Use Transform.rotate to rotate the CircularProgressIndicator and associated custom painter widgets used for the speed, rpm, and fuel gauges on the dashboard page by 180 degrees. Having the progress bars start from the six o'clock position looks more like existing systems and should better match user expectations. Future work should likely involve an investigation into using something other than the highly limited CircularProgressIndicator widget. Bug-AGL: SPEC-5043 Change-Id: I1bbc3abd2eb4ca362bf92cd06495a3b0a5154843 Signed-off-by: Scott Murray <scott.murray@konsulko.com>
2024-01-04Configurable units fixesScott Murray7-61/+205
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>
2024-01-03Initial mediaplayer implementationScott Murray10-369/+549
Notable changes: - Added dart_mpd package as a dependency. - Added MPD client class and associated provider. - Added MPD client configuration to the configuration file for potential usecases where MPD may not be available locally. - Added playlist, play state, art, etc. providers for use in the mediaplayer front end UI. - Reworked MediaPlayer classes to wire up MPD client backend. - Removed volume slider from the bottom of the media pages to make more room for playlist / preset tables, as only being able to show 3 entries in each was not usable in practice. - Reworked media player mocked up position indicator into an actual slider control, and reworked the radio slider styling to match for better UI consistency. - Reworked media player and radio playlist / preset tables to attempt to have them layout at the same location and add an always visible scroll bar. The scroll bars currently have a layout issue with respect to scroll track size that does not seem to have an obvious fix. They are usable for now, and further investigation will be done when time permits. - Wired up play/pause button on the side volume control via a new set of play state and controller providers. Bug-AGL: SPEC-5028, SPEC-5029 Change-Id: I87efecc58b4e185443942eb32ff8148ebcd675c3 Signed-off-by: Scott Murray <scott.murray@konsulko.com>
2024-01-03Initial radio implementationScott Murray19-516/+766
Notable changes: - Add radio gRPC API protobuf definitation and generated files. - Reworked existing single gRPC APIs library to split it into per-API libraries to avoid name collision issues. - Add radio gRPC client class and associated radio state class and RiverPod providers. - Split media controls and play list table classes into media player and radio specific versions to facilitate customization and wiring up their appropriate backends in a straightforward fashion. Some potential rationalization of styling widgets may be done as a follow up to avoid some duplication. - Added radio configuration and presets loading. The presets will be populated with the contents of a radio-presets.yaml file from the configured location, the default location is the /etc/xdg/AGL/ics-homescreen directory. - Implemented FM radio player against the radio gRPC API. For the sake of expediency, no attempt has been made to make the player able to handle AM band support. - Reworked media page navigation state so that active player is restored when coming back to the page. Logic has been added to start/stop the radio on navigating to or leaving the FM radio sub-page. This will potentially be reworked before CES to work with the pause/stop button present on the other pages. - Started pruning down global exports.dart a bit to remove files only used in a specific page/hierarchy, starting with media. Bug-AGL: SPEC-5029 Change-Id: I1ae0aca4a7a8218e69e4286c863f01509a1cccb7 Signed-off-by: Scott Murray <scott.murray@konsulko.com>
2023-12-21Fix late initialization warningScott Murray1-2/+3
A late initialization warning was being triggered when leaving the home/dashboard page when the random hybrid animation is disabled. Initialize the associated timer member as null and add logic to avoid referencing it in the non-random case where the timer does not get created. Bug-AGL: SPEC-5027 Change-Id: I63bd21db3005f70f2fe0d2d34181d0079cd25b00 Signed-off-by: Scott Murray <scott.murray@konsulko.com>
2023-12-21Add application launcher supportScott Murray3-26/+34
Changes: - Add required agl-shell and applauncher gRPC API source and generated files. - Remove unused deprecated databroker gRPC API files as cleanup. - Add app launcher helper object and associated RiverPod provider. The implementation is based on code from the old Flutter homescreen. There will likely be follow up work to use the recent changes to the agl-shell gRPC API to handle display setting for applications needing remote displays. - Wire up application enumeration and starting in the app page. A placeholder generic application icon has been added that will be used for the external applications for now, as the SVG icons being used with the old homescreens are not really suitable. - Wire up activating the homescreen again if the bottom panel is touched after an external application has been started. Bug-AGL: SPEC-5026 Change-Id: I01de4760cfd098d3b5f2e6843ad9103a8ea87935 Signed-off-by: Scott Murray <scott.murray@konsulko.com>
2023-12-18Implement audio settingsScott Murray13-108/+267
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-14Hybrid animation from env variableLisandro Pérez Meyer4-85/+112
This commit changes central hybrid animation on dashboard screen. For now we can set from env randomHybridAnimation variable. If true animation should be switching randomly. If false just setting proper hybrid mode based on speed and RPM value. Also increase childLocks touch target Original from: Dominik Wawrzonek <dwawrzonek@ics.com> Bug-AGL: SPEC-4971 Change-Id: I71f09c63bd1bfeda174f92feafc58019c23d07cb Signed-off-by: Lisandro Pérez Meyer <lpmeyer@ics.com>
2023-12-08More signaling fixesScott Murray3-58/+56
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-28Update HVAC fan.Lisandro Pérez Meyer5-175/+147
This also removes commented out code. Original by Sabin Sajeevan <ssajeevan@ics.com>. Bug-AGL: SPEC-4971 Change-Id: I31c3b3046f6e3bdd9cc641d403467eda11144f31 Signed-off-by: Lisandro Pérez Meyer <lpmeyer@ics.com>
2023-11-23Refactor: Dispaly user nameLisandro Pérez Meyer1-2/+3
Original from: Dominik Wawrzonek <dwawrzonek@ics.com> Bug-AGL: SPEC-4971 Change-Id: I58c7f3281260fecc04515b8b7680955ab066c9eb Signed-off-by: Lisandro Pérez Meyer <lpmeyer@ics.com>
2023-11-21Update volume bar.Lisandro Pérez Meyer2-30/+32
Original from: Dominik Wawrzonek <dwawrzonek@ics.com> Bug-AGL: SPEC-4971 Change-Id: I80ed2fb908488dce3eb88b2cdb361ea9802d9a6b Signed-off-by: Lisandro Pérez Meyer <lpmeyer@ics.com>
2023-11-21Date time updatesLisandro Pérez Meyer7-99/+289
Original from Sabin Sajeevan <ssajeevan@ics.com> Bug-AGL: SPEC-4971 Change-Id: I7a961e57715fdbf8b05f54dfcf8e56159cadd068 Signed-off-by: Lisandro Pérez Meyer <lpmeyer@ics.com>
2023-11-20Refactor: env variables.Lisandro Pérez Meyer2-4/+3
Original from: Dominik Wawrzonek <dwawrzonek@ics.com> Bug-AGL: SPEC-4971 Change-Id: I95f23d4f475aa7db82b6d34f2fc62e9f10092a75 Signed-off-by: Lisandro Pérez Meyer <lpmeyer@ics.com>
2023-11-19Set environment variables for enabling debugging screen and main animation.Lisandro Pérez Meyer1-5/+9
Change-Id: Ia4100f300b7f8507564ef80a1fc56c2352cfd5ce Signed-off-by: Lisandro Pérez Meyer <lpmeyer@ics.com>
2023-11-17Disable value animation at start up % update FuelLevel path.Lisandro Pérez Meyer2-20/+88
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-17Bug fixes. Fixed Fan mode selection off state bug.Lisandro Pérez Meyer13-164/+360
Fixes ICS' internal AGL-48,49,50. Original from Sabin Sajeevan <ssajeevan@ics.com> Bug-AGL: SPEC-4971 Change-Id: I66c875551a69a1b53eee2d6e1d3fa725b20ff41b Signed-off-by: Lisandro Pérez Meyer <lpmeyer@ics.com>
2023-11-16Disable value animation at start up % update FuelLevel path.Lisandro Pérez Meyer3-3/+2
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-15Re enable background animation.Lisandro Pérez Meyer1-2/+0
Bug-AGL: SPEC-4969 Change-Id: I7af59c4df7b3697d01f31d174bc808b87413cb66 Signed-off-by: Lisandro Pérez Meyer <lpmeyer@ics.com>
2023-11-14Initial cleanup push.Lisandro Pérez Meyer71-0/+8809
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>