diff options
author | Scott Murray <scott.murray@konsulko.com> | 2024-08-15 16:15:38 -0400 |
---|---|---|
committer | Scott Murray <scott.murray@konsulko.com> | 2024-08-19 13:41:41 +0000 |
commit | 60bda9efa11e018681152671fd68824316db70be (patch) | |
tree | c8a41ae3c8b3d8a5809de626f606bab07b76bf16 | |
parent | 9bf02336b10e02846d7e707db928f4c3becab6f6 (diff) |
Fix engine speed signal typericefish
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 <scott.murray@konsulko.com>
(cherry picked from commit feaa51384448d7277b6ea115a954c456a9069b2c)
-rw-r--r-- | app/Dashboard.qml | 6 |
1 files changed, 3 insertions, 3 deletions
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 |