diff options
author | Scott Murray <scott.murray@konsulko.com> | 2018-12-17 22:57:51 -0800 |
---|---|---|
committer | Scott Murray <scott.murray@konsulko.com> | 2018-12-18 07:03:29 +0000 |
commit | 77ca59567f79dab6d85874a9a7d9e829d6075bbc (patch) | |
tree | d8ea8c1879d06dbd3e8023dcbd262c8cda9c1377 /app/ValueSource.qml | |
parent | d9d2667e365f7e4220afd8098a694800666329af (diff) |
Add status icons and other updateshalibut_7.99.2halibut_7.99.1halibut_7.90.0halibut/7.99.2halibut/7.99.1halibut/7.90.0guppy_6.99.4guppy_6.99.3guppy/6.99.4guppy/6.99.37.99.27.99.17.90.06.99.46.99.3
Add status icons provided by AGL graphics design team, and tweak
the animation behavior to simulate power on at the start of the
cycle by blinking them. Additionally, the speed has been switched
to MPH, and the turn signal animation has been udpated to simulate
passing as opposed to a turn at the start of the cycle.
Change-Id: If5e3b9d2138d1129a7478bea1f4f2cb6b05f1499
Signed-off-by: Scott Murray <scott.murray@konsulko.com>
Diffstat (limited to 'app/ValueSource.qml')
-rw-r--r-- | app/ValueSource.qml | 39 |
1 files changed, 37 insertions, 2 deletions
diff --git a/app/ValueSource.qml b/app/ValueSource.qml index 41d0f96..48e5cf6 100644 --- a/app/ValueSource.qml +++ b/app/ValueSource.qml @@ -53,6 +53,8 @@ import QtQuick 2.2 Item { id: valueSource property real kph: 0 + property bool mphDisplay: true + property real speedScaling: mphDisplay == true ? 0.621 : 1.0 property real rpm: 1 property real fuel: 0.85 property string gear: { @@ -80,9 +82,11 @@ Item { } return "P"; } - property int turnSignal: prindle == "P" && !start ? randomDirection() : -1 - property real temperature: 0.6 + property bool start: true + property int turnSignal: -1 + property bool startUp: false + property real temperature: 0.6 function randomDirection() { return Math.random() > 0.5 ? Qt.LeftArrow : Qt.RightArrow; @@ -105,6 +109,22 @@ Item { SequentialAnimation { loops: Animation.Infinite + + // Simulate startup with indicators blink + PropertyAction { + target: valueSource + property: "startUp" + value: true + } + PauseAnimation { + duration: 1000 + } + PropertyAction { + target: valueSource + property: "startUp" + value: false + } + ParallelAnimation { NumberAnimation { target: valueSource @@ -244,6 +264,13 @@ Item { } } + // Turn signal on + PropertyAction { + target: valueSource + property: "turnSignal" + value: randomDirection() + } + // Cruise for a while ParallelAnimation { NumberAnimation { @@ -261,6 +288,14 @@ Item { duration: 10000 } } + + // Turn signal off + PropertyAction { + target: valueSource + property: "turnSignal" + value: -1 + } + ParallelAnimation { NumberAnimation { target: valueSource |