From feaa51384448d7277b6ea115a954c456a9069b2c Mon Sep 17 00:00:00 2001 From: Scott Murray Date: Thu, 15 Aug 2024 16:15:38 -0400 Subject: Fix engine speed signal type 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. The usage in this application did not technically require updating, as it happened to still work since the integer values parse as floats in the QML usage. However, it seems useful to have usage be consistent across the demo applications. Bug-AGL: SPEC-5204 Change-Id: I14097046d2668b449d814f33e64b61b54c13f90f Signed-off-by: Scott Murray --- app/Dashboard.qml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'app/Dashboard.qml') diff --git a/app/Dashboard.qml b/app/Dashboard.qml index 1a797c6..3c1a73b 100644 --- a/app/Dashboard.qml +++ b/app/Dashboard.qml @@ -33,7 +33,7 @@ ApplicationWindow { } property double vehicleSpeed: 0 - property double engineSpeed: 0 + property int engineSpeed: 0 property bool mphDisplay: false Component.onCompleted : { @@ -74,8 +74,8 @@ ApplicationWindow { else vehicleSpeed = parseFloat(value) } else if (path === "Vehicle.Powertrain.CombustionEngine.Speed") { - engineSpeed = parseFloat(value) - tachometer.value = engineSpeed / 7000 + engineSpeed = parseInt(value) + tachometer.value = engineSpeed / 7000.0 } else if (path === "Vehicle.Cabin.Infotainment.HMI.DistanceUnit") { if (value === "km") { mphDisplay = false -- cgit 1.2.3-korg