summaryrefslogtreecommitdiffstats
path: root/app/qml/TbtBoard.qml
diff options
context:
space:
mode:
authorScott Murray <scott.murray@konsulko.com>2020-01-15 10:53:13 -0500
committerScott Murray <scott.murray@konsulko.com>2020-01-15 15:50:54 +0000
commit0b13745351378c5025c5117e803c0c534cad8653 (patch)
tree8b0cb24e61134e95b7e82ae035f427f941817aed /app/qml/TbtBoard.qml
parent660d523866e47fe92e43a60c64d52f397b52d4e0 (diff)
Add info page selected by steering wheel eventicefish_8.99.5icefish/8.99.58.99.5
Add a information window that can be switched to based on the "event.info" event from signal composer that the steering wheel "Info" button results in. For now, it simply displays the vehicle and engine speed in numeric form in a larger font, and a small time display. The speeds are also driven by the corresponding signal composer events that are hooked to the underlying CAN messages. Bug-AGL: SPEC-3109 Signed-off-by: Scott Murray <scott.murray@konsulko.com> Change-Id: Ibe66ecdb94b854d4ebc7f98ad7e1bf01fc615f1a
Diffstat (limited to 'app/qml/TbtBoard.qml')
-rw-r--r--app/qml/TbtBoard.qml17
1 files changed, 9 insertions, 8 deletions
diff --git a/app/qml/TbtBoard.qml b/app/qml/TbtBoard.qml
index cf6f537..ccec5fd 100644
--- a/app/qml/TbtBoard.qml
+++ b/app/qml/TbtBoard.qml
@@ -163,16 +163,17 @@ Item {
// Set distance
function do_setDistance(dis) {
- if(dis > 1000)
- {
- distanceBoard.text = (dis / 1000).toFixed(1) + " km"
- }
- else
- {
- distanceBoard.text = dis + " m"
+ if(dis > 1000) {
+ distanceBoard.text = (dis / 1000).toFixed(1) + " km"
+ } else {
+ distanceBoard.text = dis + " m"
}
- distance.text = (((dis/100).toFixed(0))*100) +"m"
+ if(dis > 0) {
+ distance.text = (((dis/100).toFixed(0))*100) +"m"
+ } else {
+ distance.text = ""
+ }
}
//set turnInstructions