Commit 7363819d authored by Don Gagne's avatar Don Gagne Committed by GitHub

Merge pull request #4880 from DonLakeFlyer/QGCOptions

QGCOptions changes
parents a3129aa1 01a12b30
......@@ -37,9 +37,9 @@ SetupPage {
readonly property string boardRotationText: qsTr("If the orientation is in the direction of flight, select ROTATION_NONE.")
readonly property string compassRotationText: qsTr("If the orientation is in the direction of flight, select ROTATION_NONE.")
readonly property string compassHelp: qsTr("For Compass calibration you will need to rotate your vehicle through a number of positions.")
readonly property string gyroHelp: qsTr("For Gyroscope calibration you will need to place your vehicle on a surface and leave it still.")
readonly property string accelHelp: qsTr("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 compassHelp: qsTr("For Compass calibration you will need to rotate your vehicle through a number of positions. Click Ok to start calibration.")
readonly property string gyroHelp: qsTr("For Gyroscope calibration you will need to place your vehicle on a surface and leave it still. Click Ok to start calibration.")
readonly property string accelHelp: qsTr("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. Click Ok to start calibration.")
readonly property string levelHelp: qsTr("To level the horizon you need to place the vehicle in its level flight position and press OK.")
readonly property string airspeedHelp: qsTr("For Airspeed calibration you will need to keep your airspeed sensor out of any wind and then blow across the sensor.")
......@@ -106,6 +106,9 @@ SetupPage {
property bool showCompass1Rot: cal_mag1_id.value > 0 && cal_mag1_rot.value >= 0
property bool showCompass2Rot: cal_mag2_id.value > 0 && cal_mag2_rot.value >= 0
property bool _sensorsHaveFixedOrientation: QGroundControl.corePlugin.options.sensorsHaveFixedOrientation
property bool _wifiReliableForCalibration: QGroundControl.corePlugin.options.wifiReliableForCalibration
SensorsComponentController {
id: controller
factPanel: sensorsPage.viewPanel
......@@ -123,7 +126,7 @@ SetupPage {
onResetStatusTextArea: statusLog.text = statusTextAreaDefaultText
onSetCompassRotations: {
if (showCompass0Rot || showCompass1Rot || showCompass2Rot) {
if (!_sensorsHaveFixedOrientation && (showCompass0Rot || showCompass1Rot || showCompass2Rot)) {
setOrientationsDialogShowBoardOrientation = false
showDialog(setOrientationsDialogComponent, qsTr("Set Compass Rotation(s)"), sensorsPage.showDialogDefaultWidth, StandardButton.Ok)
}
......@@ -141,8 +144,7 @@ SetupPage {
Component.onCompleted: {
var usingUDP = controller.usingUDPLink()
if (usingUDP) {
console.log("onUsingUDPLink")
if (usingUDP && !_wifiReliableForCalibration) {
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)
}
}
......@@ -178,25 +180,31 @@ SetupPage {
text: preCalibrationDialogHelp
}
QGCLabel {
id: boardRotationHelp
width: parent.width
wrapMode: Text.WordWrap
visible: (preCalibrationDialogType != "airspeed") && (preCalibrationDialogType != "gyro")
text: boardRotationText
}
Column {
visible: boardRotationHelp.visible
anchors.fill: parent
spacing: 5
visible: !_sensorsHaveFixedOrientation
QGCLabel {
text: qsTr("Autopilot Orientation:")
id: boardRotationHelp
width: parent.width
wrapMode: Text.WordWrap
visible: (preCalibrationDialogType != "airspeed") && (preCalibrationDialogType != "gyro")
text: boardRotationText
}
FactComboBox {
id: boardRotationCombo
width: rotationColumnWidth;
model: rotations
fact: sens_board_rot
Column {
visible: boardRotationHelp.visible
QGCLabel {
text: qsTr("Autopilot Orientation:")
}
FactComboBox {
id: boardRotationCombo
width: rotationColumnWidth;
model: rotations
fact: sens_board_rot
}
}
}
}
......@@ -414,7 +422,7 @@ SetupPage {
id: setOrientationsButton
width: parent.buttonWidth
text: qsTr("Set Orientations")
visible: QGroundControl.corePlugin.options.showSensorCalibrationOrient
visible: !_sensorsHaveFixedOrientation
onClicked: {
setOrientationsDialogShowBoardOrientation = true
......
......@@ -19,6 +19,7 @@ import QGroundControl 1.0
import QGroundControl.FlightMap 1.0
import QGroundControl.ScreenTools 1.0
import QGroundControl.Controls 1.0
import QGroundControl.FactSystem 1.0
import QGroundControl.FactControls 1.0
import QGroundControl.Palette 1.0
import QGroundControl.Mavlink 1.0
......@@ -615,7 +616,11 @@ QGCView {
height: ScreenTools.availableHeight
width: _rightPanelWidth
color: qgcPal.window
opacity: 0.95
opacity: 0.2
}
Item {
anchors.fill: rightPanel
// Plan Element selector (Mission/Fence/Rally)
Row {
......@@ -928,8 +933,11 @@ QGCView {
}
FactCheckBox {
text: qsTr("Automatic upload to vehicle")
fact: QGroundControl.settingsManager.appSettings.automaticMissionUpload
text: qsTr("Automatic upload to vehicle")
fact: autoSyncFact
visible: autoSyncFact.visible
property Fact autoSyncFact: QGroundControl.settingsManager.appSettings.automaticMissionUpload
}
}
}
......
......@@ -33,7 +33,8 @@ public:
Q_PROPERTY(bool showSensorCalibrationAccel READ showSensorCalibrationAccel NOTIFY showSensorCalibrationAccelChanged)
Q_PROPERTY(bool showSensorCalibrationLevel READ showSensorCalibrationLevel NOTIFY showSensorCalibrationLevelChanged)
Q_PROPERTY(bool showSensorCalibrationAirspeed READ showSensorCalibrationAirspeed NOTIFY showSensorCalibrationAirspeedChanged)
Q_PROPERTY(bool showSensorCalibrationOrient READ showSensorCalibrationOrient NOTIFY showSensorCalibrationOrientChanged)
Q_PROPERTY(bool sensorsHaveFixedOrientation READ sensorsHaveFixedOrientation CONSTANT)
Q_PROPERTY(bool wifiReliableForCalibration READ wifiReliableForCalibration CONSTANT)
Q_PROPERTY(bool showFirmwareUpgrade READ showFirmwareUpgrade NOTIFY showFirmwareUpgradeChanged)
Q_PROPERTY(QString firmwareUpgradeSingleURL READ firmwareUpgradeSingleURL CONSTANT)
Q_PROPERTY(bool guidedBarShowEmergencyStop READ guidedBarShowEmergencyStop NOTIFY guidedBarShowEmergencyStopChanged)
......@@ -61,7 +62,8 @@ public:
virtual bool showSensorCalibrationAccel () const { return true; }
virtual bool showSensorCalibrationLevel () const { return true; }
virtual bool showSensorCalibrationAirspeed () const { return true; }
virtual bool showSensorCalibrationOrient () const { return true; }
virtual bool wifiReliableForCalibration () const { return false; }
virtual bool sensorsHaveFixedOrientation () const { return false; }
virtual bool showFirmwareUpgrade () const { return true; }
......@@ -79,7 +81,6 @@ signals:
void showSensorCalibrationAccelChanged (bool show);
void showSensorCalibrationLevelChanged (bool show);
void showSensorCalibrationAirspeedChanged (bool show);
void showSensorCalibrationOrientChanged (bool show);
void showFirmwareUpgradeChanged (bool show);
void guidedBarShowEmergencyStopChanged (bool show);
void guidedBarShowOrbitChanged (bool show);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment