onClicked:showDialog(calcVoltageMultiplierDlgComponent,qsTr("Calculate Voltage Multiplier"),qgcView.showDialogDefaultWidth,StandardButton.Close)
}
QGCButton{
text:qsTr("Calculate")
onClicked:showDialog(calcVoltageMultiplierDlgComponent,qsTr("Calculate Voltage Multiplier"),qgcView.showDialogDefaultWidth,StandardButton.Close)
visible:_showAdvanced
}
QGCLabel{
id:voltMultHelp
anchors.left:voltMultLabel.left
anchors.right:voltMultCalculateButton.right
anchors.topMargin:_margins/2
anchors.top:voltMultField.bottom
font.pointSize:ScreenTools.smallFontPointSize
wrapMode:Text.WordWrap
text:"If the battery voltage reported by the vehicle is largely different than the voltage read externally using a voltmeter you can adjust the voltage multiplier value to correct this. "+
"Click the Calculate button for help with calculating a new value."
visible:_showAdvanced
}
QGCLabel{
Layout.columnSpan:3
Layout.fillWidth:true
font.pointSize:ScreenTools.smallFontPointSize
wrapMode:Text.WordWrap
text:qsTr("If the battery voltage reported by the vehicle is largely different than the voltage read externally using a voltmeter you can adjust the voltage multiplier value to correct this. Click the Calculate button for help with calculating a new value.")
visible:_showAdvanced
}
QGCLabel{
id:ampPerVoltLabel
anchors.margins:_margins
anchors.left:parent.left
anchors.baseline:ampPerVoltField.baseline
text:qsTr("Amps per volt:")
visible:_showAdvanced
}
QGCLabel{
text:qsTr("Amps per volt:")
visible:_showAdvanced
}
FactTextField{
id:ampPerVoltField
anchors.topMargin:_margins
anchors.top:voltMultHelp.bottom
anchors.left:capacityField.left
width:capacityField.width
fact:battAmpPerVolt
visible:_showAdvanced
}
FactTextField{
width:_fieldWidth
fact:battAmpPerVolt
visible:_showAdvanced
}
QGCButton{
id:ampPerVoltCalculateButton
anchors.margins:_margins
anchors.left:ampPerVoltField.right
anchors.baseline:ampPerVoltField.baseline
text:"Calculate"
visible:_showAdvanced
onClicked:showDialog(calcAmpsPerVoltDlgComponent,qsTr("Calculate Amps per Volt"),qgcView.showDialogDefaultWidth,StandardButton.Close)
}
QGCButton{
text:qsTr("Calculate")
onClicked:showDialog(calcAmpsPerVoltDlgComponent,qsTr("Calculate Amps per Volt"),qgcView.showDialogDefaultWidth,StandardButton.Close)
visible:_showAdvanced
}
QGCLabel{
id:ampPerVoltHelp
anchors.left:ampPerVoltLabel.left
anchors.right:ampPerVoltCalculateButton.right
anchors.topMargin:_margins/2
anchors.top:ampPerVoltField.bottom
font.pointSize:ScreenTools.smallFontPointSize
wrapMode:Text.WordWrap
text:"If the current draw reported by the vehicle is largely different than the current read externally using a current meter you can adjust the amps per volt value to correct this. "+
"Click the Calculate button for help with calculating a new value."
visible:_showAdvanced
}
}// QGCFlickable
}// QGCViewPanel
}// QGCView
QGCLabel{
Layout.columnSpan:3
Layout.fillWidth:true
font.pointSize:ScreenTools.smallFontPointSize
wrapMode:Text.WordWrap
text:qsTr("If the current draw reported by the vehicle is largely different than the current read externally using a current meter you can adjust the amps per volt value to correct this. Click the Calculate button for help with calculating a new value.")
// Help text which is shown both in the status text area prior to pressing a cal button and in the
// pre-calibration dialog.
readonlypropertystringorientationHelpSet:"If the orientation is in the direction of flight, select None."
readonlypropertystringorientationHelpCal:"Before calibrating make sure orientation settings are correct. "+orientationHelpSet
readonlypropertystringcompassRotationText:"If the compass or GPS module is mounted in flight direction, leave the default value (None)"
readonlypropertystringcompassHelp:"For Compass calibration you will need to rotate your vehicle through a number of positions."
readonlypropertystringgyroHelp:"For Gyroscope calibration you will need to place your vehicle on a surface and leave it still."
readonlypropertystringaccelHelp:"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."
readonlypropertystringlevelHelp:"To level the horizon you need to place the vehicle in its level flight position and press OK."
readonlypropertystringairspeedHelp:"For Airspeed calibration you will need to keep your airspeed sensor out of any wind and then blow across the sensor."
readonlypropertystringstatusTextAreaDefaultText:"Start the individual calibration steps by clicking one of the buttons to the left."
// Used to pass help text to the preCalibrationDialog dialog
propertystringpreCalibrationDialogHelp
propertystring_postCalibrationDialogText
propertyvar_postCalibrationDialogParams
readonlypropertystring_badCompassCalText:"The calibration for Compass %1 appears to be poor. "+
"Check the compass position within your vehicle and re-do the calibration."
propertyboolcompass2External:compass2ExternalParamAvailable?compass2ExternalFact.value:false// false: Simulate internal so we don't show rotation combos
propertyboolcompass3External:compass3ExternalParamAvailable?compass3ExternalFact.value:false// false: Simulate internal so we don't show rotation combos
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)
// Help text which is shown both in the status text area prior to pressing a cal button and in the
// pre-calibration dialog.
readonlypropertystringorientationHelpSet:"If the orientation is in the direction of flight, select None."
readonlypropertystringorientationHelpCal:"Before calibrating make sure orientation settings are correct. "+orientationHelpSet
readonlypropertystringcompassRotationText:"If the compass or GPS module is mounted in flight direction, leave the default value (None)"
readonlypropertystringcompassHelp:"For Compass calibration you will need to rotate your vehicle through a number of positions."
readonlypropertystringgyroHelp:"For Gyroscope calibration you will need to place your vehicle on a surface and leave it still."
readonlypropertystringaccelHelp:"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."
readonlypropertystringlevelHelp:"To level the horizon you need to place the vehicle in its level flight position and press OK."
readonlypropertystringairspeedHelp:"For Airspeed calibration you will need to keep your airspeed sensor out of any wind and then blow across the sensor."
readonlypropertystringstatusTextAreaDefaultText:"Start the individual calibration steps by clicking one of the buttons to the left."
// Used to pass help text to the preCalibrationDialog dialog
propertystringpreCalibrationDialogHelp
propertystring_postCalibrationDialogText
propertyvar_postCalibrationDialogParams
readonlypropertystring_badCompassCalText:"The calibration for Compass %1 appears to be poor. "+
"Check the compass position within your vehicle and re-do the calibration."
propertyboolcompass2External:compass2ExternalParamAvailable?compass2ExternalFact.value:false// false: Simulate internal so we don't show rotation combos
propertyboolcompass3External:compass3ExternalParamAvailable?compass3ExternalFact.value:false// false: Simulate internal so we don't show rotation combos
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)
text:"This is recommended for vehicles that have only an internal compass and on vehicles where there is significant interference on the compass from the motors, power wires, etc. "+
"CompassMot only works well if you have a battery current monitor because the magnetic interference is linear with current drawn. "+
"It is technically possible to set-up CompassMot using throttle but this is not recommended."
}
Component{
id:compassMotDialogComponent
QGCLabel{
anchors.left:parent.left
anchors.right:parent.right
wrapMode:Text.WordWrap
text:"Disconnect your props, flip them over and rotate them one position around the frame. "+
"In this configuration they should push the copter down into the ground when the throttle is raised."
}
QGCViewDialog{
id:compassMotDialog
QGCLabel{
anchors.left:parent.left
anchors.right:parent.right
wrapMode:Text.WordWrap
text:"Secure the copter (perhaps with tape) so that it does not move."
functionaccept(){
controller.calibrateMotorInterference()
compassMotDialog.hideDialog()
}
QGCLabel{
anchors.left:parent.left
anchors.right:parent.right
wrapMode:Text.WordWrap
text:"Turn on your transmitter and keep throttle at zero."
}
QGCFlickable{
anchors.fill:parent
contentHeight:columnLayout.height
clip:true
QGCLabel{
anchors.left:parent.left
anchors.right:parent.right
wrapMode:Text.WordWrap
text:"Click Ok to start CompassMot calibration."
}
}// Column
}// QGCFlickable
}// QGCViewDialog
}
Column{
id:columnLayout
anchors.margins:ScreenTools.defaultFontPixelWidth
anchors.left:parent.left
anchors.right:parent.right
anchors.top:parent.top
spacing:ScreenTools.defaultFontPixelHeight
QGCViewPanel{
id:panel
anchors.fill:parent
QGCLabel{
anchors.left:parent.left
anchors.right:parent.right
wrapMode:Text.WordWrap
text:"This is recommended for vehicles that have only an internal compass and on vehicles where there is significant interference on the compass from the motors, power wires, etc. "+
"CompassMot only works well if you have a battery current monitor because the magnetic interference is linear with current drawn. "+
"It is technically possible to set-up CompassMot using throttle but this is not recommended."
}
Column{
id:buttonColumn
spacing:ScreenTools.defaultFontPixelHeight/2
QGCLabel{
anchors.left:parent.left
anchors.right:parent.right
wrapMode:Text.WordWrap
text:"Disconnect your props, flip them over and rotate them one position around the frame. "+
"In this configuration they should push the copter down into the ground when the throttle is raised."