summaryrefslogtreecommitdiffstats
path: root/tradeshow/iot-sensortag/resources
diff options
context:
space:
mode:
authorKari Hautamäki <kari.hautamaki@qt.io>2017-01-30 16:30:32 +0200
committerKari Hautamäki <kari.hautamaki@qt.io>2017-01-30 14:39:24 +0000
commit632e35db6d6ef6bf15891e486da983aabfb740b3 (patch)
tree24c4727d9275d52799fce742cd11f99b2ecad0fa /tradeshow/iot-sensortag/resources
parent31bf214d734c6d7ac8773eb97911219825579ae5 (diff)
Display rotation values in GyroChart
Displays rotation values in GyroChart instead of *_degPerSec values. Also, elapsed time between measurements given a meaningful initial value in BluetoothDataProvider. Change-Id: Id4aa8820d8e45ac72d85cc963e993941ccacd599 Reviewed-by: Otto Ryynänen <otto.ryynanen@qt.io>
Diffstat (limited to 'tradeshow/iot-sensortag/resources')
-rw-r--r--tradeshow/iot-sensortag/resources/base/GyroChart.qml6
-rw-r--r--tradeshow/iot-sensortag/resources/base/TemperatureChart.qml4
2 files changed, 5 insertions, 5 deletions
diff --git a/tradeshow/iot-sensortag/resources/base/GyroChart.qml b/tradeshow/iot-sensortag/resources/base/GyroChart.qml
index 681d218..37ee21f 100644
--- a/tradeshow/iot-sensortag/resources/base/GyroChart.qml
+++ b/tradeshow/iot-sensortag/resources/base/GyroChart.qml
@@ -195,21 +195,21 @@ BaseChart {
Text {
id: xLabel
horizontalAlignment: Text.AlignHCenter
- text: "<font color=\"" + xColor + "\">Roll<br><font color=\"white\">" + (sensor ? sensor.rotationX : 0)
+ text: "<font color=\"" + xColor + "\">Roll<br><font color=\"white\">" + (sensor ? sensor.rotationX.toFixed(0) : 0)
lineHeight: 0.7
width: (gyroHolderRect.width - xLabelRow.x) / 3
}
Text {
horizontalAlignment: Text.AlignHCenter
- text: "<font color=\"" + yColor + "\">Pitch<br><font color=\"white\">" + (sensor ? sensor.rotationY : 0)
+ text: "<font color=\"" + yColor + "\">Pitch<br><font color=\"white\">" + (sensor ? sensor.rotationY.toFixed(0) : 0)
lineHeight: 0.7
width: xLabel.width
}
Text {
horizontalAlignment: Text.AlignHCenter
- text: "<font color=\"" + zColor + "\">Yaw<br><font color=\"white\">" + (sensor ? sensor.rotationZ : 0)
+ text: "<font color=\"" + zColor + "\">Yaw<br><font color=\"white\">" + (sensor ? sensor.rotationZ.toFixed(0) : 0)
lineHeight: 0.7
width: xLabel.width
}
diff --git a/tradeshow/iot-sensortag/resources/base/TemperatureChart.qml b/tradeshow/iot-sensortag/resources/base/TemperatureChart.qml
index 0e0b94c..d4878a4 100644
--- a/tradeshow/iot-sensortag/resources/base/TemperatureChart.qml
+++ b/tradeshow/iot-sensortag/resources/base/TemperatureChart.qml
@@ -122,7 +122,7 @@ BaseChart {
Text {
anchors.centerIn: parent
- text: sensor.barometerCelsiusTemperature
+ text: sensor ? sensor.barometerCelsiusTemperature : ""
color: "white"
}
}
@@ -139,7 +139,7 @@ BaseChart {
}
Text {
- text: "Avg\n" + sensor.barometerTemperatureAverage.toFixed(1)
+ text: "Avg\n" + (sensor ? sensor.barometerTemperatureAverage.toFixed(1) : "")
lineHeight: 0.8
width: 60
horizontalAlignment: Text.Center