// Help text which is shown both in the status text area prior to pressing a cal button and in the
// pre-calibration dialog.
readonlypropertystringcompassHelp:"For Compass calibration you will need to rotate your vehicle through a number of positions. For this calibration is is best "+
"to be connected to your vehicle via radio instead of USB since the USB cable will likely get in the way."
readonlypropertystringgyroHelp:"For Gyroscope calibration you will need to place your vehicle right side up on solid surface and leave it still."
readonlypropertystringaccelHelp:"For Accelerometer calibration you will need to place your vehicle on all six sides and hold it still there for a few seconds."
readonlypropertystringairspeedHelp:"For Airspeed calibration you will need to keep your airspeed sensor out of any wind and then blow across the sensor."
propertyvarcontroller
// Used to pass what type of calibration is being performed to the preCalibrationDialog
propertystringpreCalibrationDialogType
// Used to pass help text to the preCalibrationDialog dialog
propertystringpreCalibrationDialogHelp
readonlypropertyintrotationColumnWidth:200
readonlypropertyvarrotations:[
"ROTATION_NONE",
"ROTATION_YAW_45",
"ROTATION_YAW_90",
"ROTATION_YAW_135",
"ROTATION_YAW_180",
"ROTATION_YAW_225",
"ROTATION_YAW_270",
"ROTATION_YAW_315",
"ROTATION_ROLL_180",
"ROTATION_ROLL_180_YAW_45",
"ROTATION_ROLL_180_YAW_90",
"ROTATION_ROLL_180_YAW_135",
"ROTATION_PITCH_180",
"ROTATION_ROLL_180_YAW_225",
"ROTATION_ROLL_180_YAW_270",
"ROTATION_ROLL_180_YAW_315",
"ROTATION_ROLL_90",
"ROTATION_ROLL_90_YAW_45",
"ROTATION_ROLL_90_YAW_90",
"ROTATION_ROLL_90_YAW_135",
"ROTATION_ROLL_270",
"ROTATION_ROLL_270_YAW_45",
"ROTATION_ROLL_270_YAW_90",
"ROTATION_ROLL_270_YAW_135",
"ROTATION_PITCH_90",
"ROTATION_PITCH_270",
"ROTATION_ROLL_270_YAW_270"
]
Component{
id:preCalibrationDialogComponent
QGCViewDialog{
id:preCalibrationDialog
Fact{id:sys_autostart;name:"SYS_AUTOSTART"}
functionaccept(){
sys_autostart.value=0
customConfigDialog.hideDialog()
}
QGCLabel{
anchors.fill:parent
wrapMode:Text.WordWrap
text:"Your vehicle is using a custom airframe configuration. "+
"This configuration can only be modified through the Parameter Editor.\n\n"+
"If you want to Reset your airframe configuration and select a standard configuration, click 'Reset' above."
if(preCalibrationDialogType=="gyro"){
controller.calibrateGyro()
}elseif(preCalibrationDialogType=="accel"){
controller.calibrateAccel()
}elseif(preCalibrationDialogType=="compass"){
controller.calibrateCompass()
}elseif(preCalibrationDialogType=="airspeed"){
controller.calibrateAirspeed()
}
preCalibrationDialog.hideDialog()
}
Rectangle{
propertystringcalibrationType
id:boardRotationOverlay
width:300
height:boardRotationOverlayColumn.height+11
anchors.verticalCenter:parent.verticalCenter
anchors.horizontalCenter:parent.horizontalCenter
color:qgcPal.window
border.width:1
border.color:qgcPal.text
visible:false
z:overlay.z+1
Column{
id:boardRotationOverlayColumn
anchors.topMargin:10
anchors.top:parent.top
width:parent.width
spacing:10
Column{
anchors.leftMargin:10
anchors.rightMargin:10
anchors.left:parent.left
anchors.right:parent.right
spacing:10
QGCLabel{
width:parent.width
wrapMode:Text.WordWrap
text:"Please check and/or update board rotation before calibrating"
}
FactComboBox{
width:rotationColumnWidth
model:rotations
fact:Fact{name:"SENS_BOARD_ROT"}
}
}
Column{
anchors.fill:parent
spacing:10
QGCButton{
x:1
width:parent.width-2
primary:true
text:"OK"
QGCLabel{
width:parent.width
wrapMode:Text.WordWrap
text:preCalibrationDialogHelp
}
onClicked:{
boardRotationOverlay.visible=false
overlay.visible=false
QGCLabel{
width:parent.width
wrapMode:Text.WordWrap
visible:preCalibrationDialogType!="airspeed"
text:"Please check and/or update board rotation before calibrating"
readonlypropertystringstatusTextAreaDefaultText:"For Compass calibration you will need to rotate your vehicle through a number of positions. For this calibration is is best "+
"to be connected to your vehicle via radio instead of USB since the USB cable will likely get in the way.\n\n"+
...
...
@@ -181,33 +193,6 @@ QGCView {
color:qgcPal.window
// We use this bogus loader just so we can get an onLoaded signal to hook to in order to