APMSensorsComponent.qml 25.2 KB
Newer Older
1 2 3 4 5 6 7 8
/****************************************************************************
 *
 *   (c) 2009-2016 QGROUNDCONTROL PROJECT <http://www.qgroundcontrol.org>
 *
 * QGroundControl is licensed according to the terms in the file
 * COPYING.md in the root of the source code directory.
 *
 ****************************************************************************/
Don Gagne's avatar
Don Gagne committed
9 10 11 12 13 14 15 16 17 18 19 20 21 22 23


import QtQuick 2.2
import QtQuick.Controls 1.2
import QtQuick.Controls.Styles 1.2
import QtQuick.Dialogs 1.2

import QGroundControl.FactSystem 1.0
import QGroundControl.FactControls 1.0
import QGroundControl.Palette 1.0
import QGroundControl.Controls 1.0
import QGroundControl.ScreenTools 1.0
import QGroundControl.Controllers 1.0

QGCView {
24
    id:         qgcView
Don Gagne's avatar
Don Gagne committed
25 26 27 28 29
    viewPanel:  panel

    // Help text which is shown both in the status text area prior to pressing a cal button and in the
    // pre-calibration dialog.

30 31 32
    readonly property string orientationHelp:       "If the orientation is in the direction of flight, select None."
    readonly property string boardRotationText:     "If the autopilot is mounted in flight direction, leave the default value (None)"
    readonly property string compassRotationText:   "If the compass or GPS module is mounted in flight direction, leave the default value (None)"
Don Gagne's avatar
Don Gagne committed
33 34 35 36 37 38 39 40 41 42 43 44 45 46 47

    readonly property string compassHelp:   "For Compass calibration you will need to rotate your vehicle through a number of positions. Most users prefer to do this wirelessly with the telemetry link."
    readonly property string gyroHelp:      "For Gyroscope calibration you will need to place your vehicle on a surface and leave it still."
    readonly property string accelHelp:     "For Accelerometer calibration you will need to place your vehicle on all six sides on a perfectly level surface and hold it still in each orientation for a few seconds."
    readonly property string levelHelp:     "To level the horizon you need to place the vehicle in its level flight position and press OK."
    readonly property string airspeedHelp:  "For Airspeed calibration you will need to keep your airspeed sensor out of any wind and then blow across the sensor."

    readonly property string statusTextAreaDefaultText: "Start the individual calibration steps by clicking one of the buttons above."

    // Used to pass what type of calibration is being performed to the preCalibrationDialog
    property string preCalibrationDialogType

    // Used to pass help text to the preCalibrationDialog dialog
    property string preCalibrationDialogHelp

Don Gagne's avatar
Don Gagne committed
48 49 50 51 52 53
    property string _postCalibrationDialogText
    property var    _postCalibrationDialogParams

    readonly property string _badCompassCalText: "The calibration for Compass %1 appears to be poor. " +
                                                 "Check the compass position within your vehicle and re-do the calibration."

54 55
    readonly property int sideBarH1PointSize:  ScreenTools.mediumFontPointSize
    readonly property int mainTextH1PointSize: ScreenTools.mediumFontPointSize // Seems to be unused
Don Gagne's avatar
Don Gagne committed
56 57

    readonly property int rotationColumnWidth: 250
58

Don Gagne's avatar
Don Gagne committed
59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96
    property Fact compass1Id:           controller.getParameterFact(-1, "COMPASS_DEV_ID")
    property Fact compass2Id:           controller.getParameterFact(-1, "COMPASS_DEV_ID2")
    property Fact compass3Id:           controller.getParameterFact(-1, "COMPASS_DEV_ID3")
    property Fact compass1ExternalFact: controller.getParameterFact(-1, "COMPASS_EXTERNAL")
    property Fact compass1Rot:          controller.getParameterFact(-1, "COMPASS_ORIENT")

    property Fact boardRot:             controller.getParameterFact(-1, "AHRS_ORIENTATION")

    property bool accelCalNeeded:       controller.accelSetupNeeded
    property bool compassCalNeeded:     controller.compassSetupNeeded


    // The following parameters are not available in olders firmwares

    property bool compass2ExternalParamAvailable:   controller.parameterExists(-1, "COMPASS_EXTERN2")
    property bool compass3ExternalParamAvailable:   controller.parameterExists(-1, "COMPASS_EXTERN3")
    property bool compass2RotParamAvailable:        controller.parameterExists(-1, "COMPASS_ORIENT2")
    property bool compass3RotParamAvailable:        controller.parameterExists(-1, "COMPASS_ORIENT3")
    property bool compass1UseParamAvailable:        controller.parameterExists(-1, "COMPASS_USE")
    property bool compass2UseParamAvailable:        controller.parameterExists(-1, "COMPASS_USE2")
    property bool compass3UseParamAvailable:        controller.parameterExists(-1, "COMPASS_USE3")

    property Fact noFact: Fact { }
    property Fact compass2ExternalFact: compass2ExternalParamAvailable ? controller.getParameterFact(-1, "COMPASS_EXTERN2") : noFact
    property Fact compass3ExternalFact: compass3ExternalParamAvailable ? controller.getParameterFact(-1, "COMPASS_EXTERN3") : noFact
    property Fact compass2Rot:          compass2RotParamAvailable ? controller.getParameterFact(-1, "COMPASS_ORIENT2") : noFact
    property Fact compass3Rot:          compass3RotParamAvailable ? controller.getParameterFact(-1, "COMPASS_ORIENT3") : noFact
    property Fact compass1UseFact:      compass1UseParamAvailable ? controller.getParameterFact(-1, "COMPASS_USE") : noFact
    property Fact compass2UseFact:      compass2UseParamAvailable ? controller.getParameterFact(-1, "COMPASS_USE2") : noFact
    property Fact compass3UseFact:      compass3UseParamAvailable ? controller.getParameterFact(-1, "COMPASS_USE3") : noFact

    // We track these values by binding through a separate property so we can handle missing params
    property bool compass1External: compass1ExternalFact.value
    property bool compass2External: compass2ExternalParamAvailable ? compass2ExternalFact.value : false // false: Simulate internal so we don't show rotation combos
    property bool compass3External: compass3ExternalParamAvailable ? compass3ExternalFact.value : false // false: Simulate internal so we don't show rotation combos
    property bool compass1Use:      compass1UseParamAvailable ? compass1UseFact.value : true
    property bool compass2Use:      compass2UseParamAvailable ? compass2UseFact.value : true
    property bool compass3Use:      compass3UseParamAvailable ? compass3UseFact.value : true
Don Gagne's avatar
Don Gagne committed
97 98

    // Id > = signals compass available, rot < 0 signals internal compass
Don Gagne's avatar
Don Gagne committed
99 100 101
    property bool showCompass1Rot: compass1Id.value > 0 && compass1External && compass1Use
    property bool showCompass2Rot: compass2Id.value > 0 && compass2External && compass2Use
    property bool showCompass3Rot: compass3Id.value > 0 && compass3External && compass3Use
Don Gagne's avatar
Don Gagne committed
102

Don Gagne's avatar
Don Gagne committed
103 104 105 106 107 108 109
    function validCompassOffsets(compassParamPrefix) {
        var ofsX = controller.getParameterFact(-1, compassParamPrefix + "X")
        var ofsY = controller.getParameterFact(-1, compassParamPrefix + "Y")
        var ofsZ = controller.getParameterFact(-1, compassParamPrefix + "Z")
        return Math.sqrt(ofsX.value^2 + ofsY.value^2 + ofsZ.value^2) < 600
    }

Don Gagne's avatar
Don Gagne committed
110 111 112 113 114 115 116 117 118 119 120 121 122 123 124
    APMSensorsComponentController {
        id:                         controller
        factPanel:                  panel
        statusLog:                  statusTextArea
        progressBar:                progressBar
        compassButton:              compassButton
        accelButton:                accelButton
        nextButton:                 nextButton
        cancelButton:               cancelButton
        orientationCalAreaHelpText: orientationCalAreaHelpText

        onResetStatusTextArea: statusLog.text = statusTextAreaDefaultText

        onWaitingForCancelChanged: {
            if (controller.waitingForCancel) {
125
                showMessage(qsTr("Calibration Cancel"), qsTr("Waiting for Vehicle to response to Cancel. This may take a few seconds."), 0)
Don Gagne's avatar
Don Gagne committed
126 127 128 129
            } else {
                hideDialog()
            }
        }
Don Gagne's avatar
Don Gagne committed
130 131 132

        onCalibrationComplete: {
            if (preCalibrationDialogType == "accel") {
133
                _postCalibrationDialogText = qsTr("Accelerometer calibration complete.")
Don Gagne's avatar
Don Gagne committed
134 135 136 137 138 139 140
                _postCalibrationDialogParams = [ "INS_ACCSCAL_X", "INS_ACCSCAL_Y", "INS_ACCSCAL_Z",
                                                "INS_ACC2SCAL_X", "INS_ACC2SCAL_Y", "INS_ACC2SCAL_Z",
                                                "INS_ACC3SCAL_X", "INS_ACC3SCAL_Y", "INS_ACC3SCAL_Z",
                                                "INS_GYROFFS_X", "INS_GYROFFS_Y", "INS_GYROFFS_Z",
                                                "INS_GYR2OFFS_X", "INS_GYR2OFFS_Y", "INS_GYR2OFFS_Z",
                                                "INS_GYR3OFFS_X", "INS_GYR3OFFS_Y", "INS_GYR3OFFS_Z" ]
            } else if (preCalibrationDialogType == "compass") {
141
                _postCalibrationDialogText = qsTr("Compass calibration complete. ")
Don Gagne's avatar
Don Gagne committed
142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167
                _postCalibrationDialogParams = [];
                if (compass1Id.value > 0) {
                    if (!validCompassOffsets("COMPASS_OFS_")) {
                        _postCalibrationDialogText += _badCompassCalText.replace("%1", 1)
                    }
                    _postCalibrationDialogParams.push("COMPASS_OFS_X")
                    _postCalibrationDialogParams.push("COMPASS_OFS_Y")
                    _postCalibrationDialogParams.push("COMPASS_OFS_Z")
                }
                if (compass2Id.value > 0) {
                    if (!validCompassOffsets("COMPASS_OFS_")) {
                        _postCalibrationDialogText += _badCompassCalText.replace("%1", 2)
                    }
                    _postCalibrationDialogParams.push("COMPASS_OFS2_X")
                    _postCalibrationDialogParams.push("COMPASS_OFS2_Y")
                    _postCalibrationDialogParams.push("COMPASS_OFS2_Z")
                }
                if (compass3Id.value > 0) {
                    if (!validCompassOffsets("COMPASS_OFS_")) {
                        _postCalibrationDialogText += _badCompassCalText.replace("%1", 3)
                    }
                    _postCalibrationDialogParams.push("COMPASS_OFS3_X")
                    _postCalibrationDialogParams.push("COMPASS_OFS3_Y")
                    _postCalibrationDialogParams.push("COMPASS_OFS3_Z")
                }
            }
168
            showDialog(postCalibrationDialogComponent, qsTr("Calibration complete"), qgcView.showDialogDefaultWidth, StandardButton.Ok)
Don Gagne's avatar
Don Gagne committed
169
        }
Don Gagne's avatar
Don Gagne committed
170 171
    }

Don Gagne's avatar
Don Gagne committed
172 173 174 175 176 177 178 179
    Component.onCompleted: {
        var usingUDP = controller.usingUDPLink()
        if (usingUDP) {
            console.log("onUsingUDPLink")
            showMessage("Sensor Calibration", "Performing sensor calibration over a WiFi connection is known to be unreliable. You should disconnect and perform calibration using a direct USB connection instead.", StandardButton.Ok)
        }
    }

Don Gagne's avatar
Don Gagne committed
180 181 182 183 184 185 186 187 188
    QGCPalette { id: qgcPal; colorGroupEnabled: panel.enabled }

    Component {
        id: preCalibrationDialogComponent

        QGCViewDialog {
            id: preCalibrationDialog

            function accept() {
189
                if (preCalibrationDialogType == "accel") {
Don Gagne's avatar
Don Gagne committed
190 191 192 193 194 195 196
                    controller.calibrateAccel()
                } else if (preCalibrationDialogType == "compass") {
                    controller.calibrateCompass()
                }
                preCalibrationDialog.hideDialog()
            }

197 198 199 200 201
            QGCLabel {
                id:             label
                anchors.left:   parent.left
                anchors.right:  parent.right
                wrapMode:       Text.WordWrap
202
                text:           qsTr("Before calibrating make sure orientation settings are correct.")
203
            }
Don Gagne's avatar
Don Gagne committed
204

205 206 207 208 209 210 211
            Loader {
                id:                 rotationsLoader
                anchors.topMargin:  ScreenTools.defaultFontPixelHeight
                anchors.top:        label.bottom
                anchors.left:       parent.left
                anchors.right:      parent.right
                sourceComponent:    rotationCombosComponent
Don Gagne's avatar
Don Gagne committed
212

213
                property bool showCompassRotations: preCalibrationDialogType == "accel" ? false : true
Don Gagne's avatar
Don Gagne committed
214 215 216 217
            }
        }
    }

Don Gagne's avatar
Don Gagne committed
218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233
    Component {
        id: postCalibrationDialogComponent

        QGCViewDialog {
            QGCLabel {
                id:             textLabel
                anchors.left:   parent.left
                anchors.right:  parent.right
                wrapMode:       Text.WordWrap
                text:           _postCalibrationDialogText
            }

            QGCCheckBox {
                id:                 showValues
                anchors.topMargin:  ScreenTools.defaultFontPixelHeight
                anchors.top:        textLabel.bottom
234
                text:               qsTr("Show values")
Don Gagne's avatar
Don Gagne committed
235 236
            }

Don Gagne's avatar
Don Gagne committed
237
            QGCFlickable {
Don Gagne's avatar
Don Gagne committed
238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261
                anchors.topMargin:  ScreenTools.defaultFontPixelHeight
                anchors.top:        showValues.bottom
                anchors.bottom:     parent.bottom
                contentHeight:      valueColumn.height
                flickableDirection: Flickable.VerticalFlick
                visible:            showValues.checked

                Column {
                    id: valueColumn

                    Repeater {
                        model: _postCalibrationDialogParams

                        QGCLabel {
                            text: fact.name +": " + fact.valueString

                            property Fact fact: controller.getParameterFact(-1, modelData)
                        }
                    }
                }
            }
        }
    }

Don Gagne's avatar
Don Gagne committed
262
    Component {
263
        id: rotationCombosComponent
Don Gagne's avatar
Don Gagne committed
264

265 266
        Column {
            QGCLabel {
267
                font.pointSize: sideBarH1PointSize
268
                text:           qsTr("Set Orientations")
269
            }
Don Gagne's avatar
Don Gagne committed
270

271 272 273 274
            Item {
                width:  1
                height: ScreenTools.defaultFontPixelHeight
            }
Don Gagne's avatar
Don Gagne committed
275

276 277 278 279 280
            QGCLabel {
                width:      parent.width
                wrapMode:   Text.WordWrap
                text:       orientationHelp
            }
Don Gagne's avatar
Don Gagne committed
281

282 283 284 285
            Item {
                width:  1
                height: ScreenTools.defaultFontPixelHeight
            }
Don Gagne's avatar
Don Gagne committed
286

287 288
            // Board rotation
            QGCLabel {
289
                text:           qsTr("Autopilot Orientation")
290
            }
Don Gagne's avatar
Don Gagne committed
291

292 293 294 295 296 297
            FactComboBox {
                id:         boardRotationCombo
                width:      parent.width
                fact:       boardRot
                indexModel: false
            }
Don Gagne's avatar
Don Gagne committed
298

299 300 301 302
            Item {
                width:  1
                height: ScreenTools.defaultFontPixelHeight
            }
Don Gagne's avatar
Don Gagne committed
303

304 305
            // Compass 1 rotation
            QGCLabel {
306
                text:       qsTr("Compass 1 Orientation")
307 308
                visible:    showCompassRotations && showCompass1Rot
            }
Don Gagne's avatar
Don Gagne committed
309

310 311 312 313 314 315 316 317 318 319 320 321 322 323
            FactComboBox {
                width:      parent.width
                fact:       compass1Rot
                indexModel: false
                visible:    showCompassRotations && showCompass1Rot
            }

            Item {
                width:  1
                height: ScreenTools.defaultFontPixelHeight
            }

            // Compass 2 rotation
            QGCLabel {
324
                text:       qsTr("Compass 2 Orientation")
325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341
                visible:    showCompassRotations && showCompass2Rot
            }

            FactComboBox {
                width:      parent.width
                fact:       compass2Rot
                indexModel: false
                visible:    showCompassRotations && showCompass2Rot
            }

            Item {
                width:  1
                height: ScreenTools.defaultFontPixelHeight
            }

            // Compass 3 rotation
            QGCLabel {
342
                text:       qsTr("Compass 3 Orientation")
343 344 345 346 347 348 349 350 351 352 353
                visible:    showCompassRotations && showCompass3Rot
            }

            FactComboBox {
                width:      parent.width
                fact:       compass3Rot
                indexModel: false
                visible:    showCompassRotations && showCompass3Rot
            }
        } // Column
    } // Component - Rotation combos
Don Gagne's avatar
Don Gagne committed
354 355 356 357 358

    QGCViewPanel {
        id:             panel
        anchors.fill:   parent

359 360 361
        Row {
            id:         buttonsRow
            spacing:    ScreenTools.defaultFontPixelWidth
Don Gagne's avatar
Don Gagne committed
362

363
            readonly property int buttonWidth: ScreenTools.defaultFontPixelWidth * 15
Don Gagne's avatar
Don Gagne committed
364

365
            QGCLabel { text: qsTr("Calibrate:"); anchors.baseline: compassButton.baseline }
Don Gagne's avatar
Don Gagne committed
366

Don Gagne's avatar
Don Gagne committed
367 368 369
            IndicatorButton {
                id:             accelButton
                width:          parent.buttonWidth
370
                text:           qsTr("Accelerometer")
Don Gagne's avatar
Don Gagne committed
371 372 373 374 375
                indicatorGreen: !accelCalNeeded

                onClicked: {
                    preCalibrationDialogType = "accel"
                    preCalibrationDialogHelp = accelHelp
376
                    showDialog(preCalibrationDialogComponent, qsTr("Calibrate Accelerometer"), qgcView.showDialogDefaultWidth, StandardButton.Cancel | StandardButton.Ok)
Don Gagne's avatar
Don Gagne committed
377 378 379
                }
            }

380 381 382
            IndicatorButton {
                id:             compassButton
                width:          parent.buttonWidth
383
                text:           qsTr("Compass")
384
                indicatorGreen: !compassCalNeeded
Don Gagne's avatar
Don Gagne committed
385

386 387
                onClicked: {
                    if (controller.accelSetupNeeded) {
388
                        showMessage(qsTr("Calibrate Compass"), qsTr("Accelerometer must be calibrated prior to Compass."), StandardButton.Ok)
389
                    } else {
Don Gagne's avatar
Don Gagne committed
390 391
                        preCalibrationDialogType = "compass"
                        preCalibrationDialogHelp = compassHelp
392
                        showDialog(preCalibrationDialogComponent, qsTr("Calibrate Compass"), qgcView.showDialogDefaultWidth, StandardButton.Cancel | StandardButton.Ok)
Don Gagne's avatar
Don Gagne committed
393 394
                    }
                }
395
            }
Don Gagne's avatar
Don Gagne committed
396

397 398
            QGCButton {
                id:         nextButton
399
                text:       qsTr("Next")
400 401
                enabled:    false
                onClicked:  controller.nextClicked()
Don Gagne's avatar
Don Gagne committed
402 403
            }

404 405
            QGCButton {
                id:         cancelButton
406
                text:       qsTr("Cancel")
407 408 409 410 411 412 413 414 415 416
                enabled:    false
                onClicked:  controller.cancelCalibration()
            }
        } // Row - Cal buttons

        ProgressBar {
            id:                 progressBar
            anchors.topMargin:  ScreenTools.defaultFontPixelHeight
            anchors.top:        buttonsRow.bottom
            anchors.left:       parent.left
Don Gagne's avatar
Don Gagne committed
417
            anchors.right:      centerPanel.right
418
        }
Don Gagne's avatar
Don Gagne committed
419

420
        Item {
Don Gagne's avatar
Don Gagne committed
421
            id:                     centerPanel
422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438
            anchors.topMargin:      ScreenTools.defaultFontPixelHeight
            anchors.rightMargin:    ScreenTools.defaultFontPixelHeight
            anchors.top:            progressBar.bottom
            anchors.bottom:         parent.bottom
            anchors.left:           parent.left
            anchors.right:          rotationsLoader.left

            TextArea {
                id:             statusTextArea
                anchors.fill:   parent
                readOnly:       true
                frameVisible:   false
                text:           statusTextAreaDefaultText

                style: TextAreaStyle {
                    textColor: qgcPal.text
                    backgroundColor: qgcPal.windowShade
Don Gagne's avatar
Don Gagne committed
439
                }
440
            }
Don Gagne's avatar
Don Gagne committed
441

442 443 444 445 446
            Rectangle {
                id:             orientationCalArea
                anchors.fill:   parent
                visible:        controller.showOrientationCalArea
                color:          qgcPal.windowShade
Don Gagne's avatar
Don Gagne committed
447

448 449 450 451 452 453 454
                QGCLabel {
                    id:                 orientationCalAreaHelpText
                    anchors.margins:    ScreenTools.defaultFontPixelWidth
                    anchors.top:        orientationCalArea.top
                    anchors.left:       orientationCalArea.left
                    width:              parent.width
                    wrapMode:           Text.WordWrap
455
                    font.pointSize:     ScreenTools.mediumFontPointSize
Don Gagne's avatar
Don Gagne committed
456 457
                }

458 459 460
                Flow {
                    anchors.topMargin:  ScreenTools.defaultFontPixelWidth
                    anchors.top:        orientationCalAreaHelpText.bottom
461 462 463
                    anchors.bottom:     parent.bottom
                    anchors.left:       parent.left
                    anchors.right:      parent.right
Don Gagne's avatar
Don Gagne committed
464 465
                    spacing:            ScreenTools.defaultFontPixelWidth

466 467 468
                    property real indicatorWidth:   (width / 3) - (spacing * 2)
                    property real indicatorHeight:  (height / 2) - spacing

469
                    VehicleRotationCal {
470 471
                        width:              parent.indicatorWidth
                        height:             parent.indicatorHeight
472 473 474
                        visible:            controller.orientationCalDownSideVisible
                        calValid:           controller.orientationCalDownSideDone
                        calInProgress:      controller.orientationCalDownSideInProgress
475
                        calInProgressText:  controller.orientationCalDownSideRotate ? qsTr("Rotate") : qsTr("Hold Still")
476
                        imageSource:        controller.orientationCalDownSideRotate ? "qrc:///qmlimages/VehicleDownRotate.png" : "qrc:///qmlimages/VehicleDown.png"
Don Gagne's avatar
Don Gagne committed
477
                    }
478
                    VehicleRotationCal {
479 480
                        width:              parent.indicatorWidth
                        height:             parent.indicatorHeight
481 482 483
                        visible:            controller.orientationCalUpsideDownSideVisible
                        calValid:           controller.orientationCalUpsideDownSideDone
                        calInProgress:      controller.orientationCalUpsideDownSideInProgress
484
                        calInProgressText:  controller.orientationCalUpsideDownSideRotate ? qsTr("Rotate") : qsTr("Hold Still")
485
                        imageSource:        controller.orientationCalUpsideDownSideRotate ? "qrc:///qmlimages/VehicleUpsideDownRotate.png" : "qrc:///qmlimages/VehicleUpsideDown.png"
Don Gagne's avatar
Don Gagne committed
486
                    }
487
                    VehicleRotationCal {
488 489
                        width:              parent.indicatorWidth
                        height:             parent.indicatorHeight
490 491 492
                        visible:            controller.orientationCalNoseDownSideVisible
                        calValid:           controller.orientationCalNoseDownSideDone
                        calInProgress:      controller.orientationCalNoseDownSideInProgress
493
                        calInProgressText:  controller.orientationCalNoseDownSideRotate ? qsTr("Rotate") : qsTr("Hold Still")
494
                        imageSource:        controller.orientationCalNoseDownSideRotate ? "qrc:///qmlimages/VehicleNoseDownRotate.png" : "qrc:///qmlimages/VehicleNoseDown.png"
Don Gagne's avatar
Don Gagne committed
495
                    }
496
                    VehicleRotationCal {
497 498
                        width:              parent.indicatorWidth
                        height:             parent.indicatorHeight
499 500 501
                        visible:            controller.orientationCalTailDownSideVisible
                        calValid:           controller.orientationCalTailDownSideDone
                        calInProgress:      controller.orientationCalTailDownSideInProgress
502
                        calInProgressText:  controller.orientationCalTailDownSideRotate ? qsTr("Rotate") : qsTr("Hold Still")
503
                        imageSource:        controller.orientationCalTailDownSideRotate ? "qrc:///qmlimages/VehicleTailDownRotate.png" : "qrc:///qmlimages/VehicleTailDown.png"
504 505
                    }
                    VehicleRotationCal {
506 507
                        width:              parent.indicatorWidth
                        height:             parent.indicatorHeight
508 509 510
                        visible:            controller.orientationCalLeftSideVisible
                        calValid:           controller.orientationCalLeftSideDone
                        calInProgress:      controller.orientationCalLeftSideInProgress
511
                        calInProgressText:  controller.orientationCalLeftSideRotate ? qsTr("Rotate") : qsTr("Hold Still")
512 513 514
                        imageSource:        controller.orientationCalLeftSideRotate ? "qrc:///qmlimages/VehicleLeftRotate.png" : "qrc:///qmlimages/VehicleLeft.png"
                    }
                    VehicleRotationCal {
515 516
                        width:              parent.indicatorWidth
                        height:             parent.indicatorHeight
517 518 519
                        visible:            controller.orientationCalRightSideVisible
                        calValid:           controller.orientationCalRightSideDone
                        calInProgress:      controller.orientationCalRightSideInProgress
520
                        calInProgressText:  controller.orientationCalRightSideRotate ? qsTr("Rotate") : qsTr("Hold Still")
521
                        imageSource:        controller.orientationCalRightSideRotate ? "qrc:///qmlimages/VehicleRightRotate.png" : "qrc:///qmlimages/VehicleRight.png"
Don Gagne's avatar
Don Gagne committed
522 523 524
                    }
                }
            }
525 526 527 528
        } // Item - Cal display area

        Loader {
            id:                 rotationsLoader
Don Gagne's avatar
Don Gagne committed
529 530
            anchors.top:        centerPanel.top
            anchors.bottom:     parent.bottom
531 532 533 534 535
            anchors.right:      parent.right
            width:              rotationColumnWidth
            sourceComponent:    rotationCombosComponent

            property bool showCompassRotations: true
Don Gagne's avatar
Don Gagne committed
536 537 538
        }
    } // QGCViewPanel
} // QGCView