summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorScott Murray <scott.murray@konsulko.com>2024-08-15 16:15:38 -0400
committerScott Murray <scott.murray@konsulko.com>2024-08-15 16:16:13 -0400
commitfeaa51384448d7277b6ea115a954c456a9069b2c (patch)
tree874d19fded2d20c2a214a51fea632f2f6cbb0421
parent0cfd9c9473dcb218d095f9e6b88f41e81765fdff (diff)
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 <scott.murray@konsulko.com>
-rw-r--r--app/Dashboard.qml6
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