5import QGroundControl.Controls
10 // Calibration state of the orientation shown by this control.
11 // Values must stay in sync with SensorsComponentController::SideCalState.
13 Idle, ///< No calibration data to show (neutral preview)
14 Incomplete, ///< Calibration running, this orientation not yet calibrated
15 InProgress, ///< This orientation actively being calibrated
16 Completed ///< This orientation calibration complete
19 property int calState: VehicleRotationCal.CalState.Idle
21 // Text to show while calibration is in progress
22 property string calInProgressText: qsTr("Hold Still")
25 property var imageSource: ""
32 when: root.calState === VehicleRotationCal.CalState.Idle
34 root.color: qgcPal.text
40 when: root.calState === VehicleRotationCal.CalState.Incomplete
43 statusLabel.text: qsTr("Incomplete")
48 when: root.calState === VehicleRotationCal.CalState.InProgress
51 statusLabel.text: root.calInProgressText
56 when: root.calState === VehicleRotationCal.CalState.Completed
59 statusLabel.text: qsTr("Completed")
64 QGCPalette { id: qgcPal; colorGroupEnabled: root.enabled }
67 readonly property int inset: 5
71 width: parent.width - (inset * 2)
72 height: parent.height - (inset * 2)
73 color: qgcPal.windowShade
78 source: root.imageSource
79 fillMode: Image.PreserveAspectFit
87 horizontalAlignment: Text.AlignHCenter
88 verticalAlignment: Text.AlignBottom
89 font.pointSize: ScreenTools.mediumFontPointSize