aboutsummaryrefslogtreecommitdiffstats
path: root/app/qml/TbtBoard.qml
diff options
context:
space:
mode:
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