From 4126977c5a683475335df289c088c11439afa548 Mon Sep 17 00:00:00 2001 From: Titta Heikkala Date: Thu, 9 Feb 2017 12:04:11 +0200 Subject: iot-sensortag: Make central gyro visible always and calibratable MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Central gyro page is visible always. It is also possible to recalibrate the gyro sensor by clicking the GyroChart. Change-Id: I9805411e03d49571b9e392bcd77a9469aef153a0 Reviewed-by: Kari Hautamäki --- .../iot-sensortag/resources/small/MainSmall.qml | 25 ++++++---------------- 1 file changed, 6 insertions(+), 19 deletions(-) (limited to 'tradeshow/iot-sensortag/resources/small') diff --git a/tradeshow/iot-sensortag/resources/small/MainSmall.qml b/tradeshow/iot-sensortag/resources/small/MainSmall.qml index f3d49a8..377acd1 100644 --- a/tradeshow/iot-sensortag/resources/small/MainSmall.qml +++ b/tradeshow/iot-sensortag/resources/small/MainSmall.qml @@ -144,24 +144,6 @@ Item { width: rightPane.width height: rightPane.height * 0.3 - 60 - onClicked: { - mainContainer.source = "../base/RotationPage.qml"; - gyroConnection.enabled = true; - sensor.recalibrate(); - } - - Connections { - id: gyroConnection - - target: mainContainer - enabled: false - onStatusChanged: { - if (status == Loader.Ready) { - mainContainer.item.sensor = rotation.sensor; - gyroConnection.enabled = false; - } - } - } } AccelChart { @@ -172,7 +154,7 @@ Item { } } - Loader { + RotationPage { id: mainContainer anchors.top: topToolbar.bottom @@ -181,6 +163,11 @@ Item { anchors.right: rightPane.left anchors.rightMargin: 32 anchors.bottom: parent.bottom + + Component.onCompleted: { + sensor = rotation.sensor; + sensor.recalibrate(); + } } -- cgit v1.2.3