Commit 91fd6ae8 authored by Don Gagne's avatar Don Gagne Committed by GitHub

Merge pull request #3536 from DonLakeFlyer/Testing3.0Fixes

Testing 3.0 fixes
parents d3df08b7 95f9b8fb
...@@ -579,7 +579,11 @@ APMCompassCal::APMCompassCal(void) ...@@ -579,7 +579,11 @@ APMCompassCal::APMCompassCal(void)
APMCompassCal::~APMCompassCal() APMCompassCal::~APMCompassCal()
{ {
if (_calWorkerThread) {
_calWorkerThread->terminate();
// deleteLater so it happens on correct thread
_calWorkerThread->deleteLater();
}
} }
void APMCompassCal::setVehicle(Vehicle* vehicle) void APMCompassCal::setVehicle(Vehicle* vehicle)
...@@ -601,7 +605,7 @@ void APMCompassCal::startCalibration(void) ...@@ -601,7 +605,7 @@ void APMCompassCal::startCalibration(void)
// Simulate a start message // Simulate a start message
_emitVehicleTextMessage("[cal] calibration started: mag"); _emitVehicleTextMessage("[cal] calibration started: mag");
_calWorkerThread = new CalWorkerThread(_vehicle, this); _calWorkerThread = new CalWorkerThread(_vehicle);
connect(_calWorkerThread, &CalWorkerThread::vehicleTextMessage, this, &APMCompassCal::vehicleTextMessage); connect(_calWorkerThread, &CalWorkerThread::vehicleTextMessage, this, &APMCompassCal::vehicleTextMessage);
// Clear the offset parameters so we get raw data // Clear the offset parameters so we get raw data
......
...@@ -169,6 +169,14 @@ QGCView { ...@@ -169,6 +169,14 @@ QGCView {
} }
} }
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)
}
}
QGCPalette { id: qgcPal; colorGroupEnabled: panel.enabled } QGCPalette { id: qgcPal; colorGroupEnabled: panel.enabled }
Component { Component {
...@@ -450,12 +458,17 @@ QGCView { ...@@ -450,12 +458,17 @@ QGCView {
Flow { Flow {
anchors.topMargin: ScreenTools.defaultFontPixelWidth anchors.topMargin: ScreenTools.defaultFontPixelWidth
anchors.top: orientationCalAreaHelpText.bottom anchors.top: orientationCalAreaHelpText.bottom
anchors.left: orientationCalAreaHelpText.left anchors.bottom: parent.bottom
width: parent.width anchors.left: parent.left
height: parent.height - orientationCalAreaHelpText.implicitHeight anchors.right: parent.right
spacing: ScreenTools.defaultFontPixelWidth spacing: ScreenTools.defaultFontPixelWidth
property real indicatorWidth: (width / 3) - (spacing * 2)
property real indicatorHeight: (height / 2) - spacing
VehicleRotationCal { VehicleRotationCal {
width: parent.indicatorWidth
height: parent.indicatorHeight
visible: controller.orientationCalDownSideVisible visible: controller.orientationCalDownSideVisible
calValid: controller.orientationCalDownSideDone calValid: controller.orientationCalDownSideDone
calInProgress: controller.orientationCalDownSideInProgress calInProgress: controller.orientationCalDownSideInProgress
...@@ -463,6 +476,8 @@ QGCView { ...@@ -463,6 +476,8 @@ QGCView {
imageSource: controller.orientationCalDownSideRotate ? "qrc:///qmlimages/VehicleDownRotate.png" : "qrc:///qmlimages/VehicleDown.png" imageSource: controller.orientationCalDownSideRotate ? "qrc:///qmlimages/VehicleDownRotate.png" : "qrc:///qmlimages/VehicleDown.png"
} }
VehicleRotationCal { VehicleRotationCal {
width: parent.indicatorWidth
height: parent.indicatorHeight
visible: controller.orientationCalUpsideDownSideVisible visible: controller.orientationCalUpsideDownSideVisible
calValid: controller.orientationCalUpsideDownSideDone calValid: controller.orientationCalUpsideDownSideDone
calInProgress: controller.orientationCalUpsideDownSideInProgress calInProgress: controller.orientationCalUpsideDownSideInProgress
...@@ -470,6 +485,8 @@ QGCView { ...@@ -470,6 +485,8 @@ QGCView {
imageSource: controller.orientationCalUpsideDownSideRotate ? "qrc:///qmlimages/VehicleUpsideDownRotate.png" : "qrc:///qmlimages/VehicleUpsideDown.png" imageSource: controller.orientationCalUpsideDownSideRotate ? "qrc:///qmlimages/VehicleUpsideDownRotate.png" : "qrc:///qmlimages/VehicleUpsideDown.png"
} }
VehicleRotationCal { VehicleRotationCal {
width: parent.indicatorWidth
height: parent.indicatorHeight
visible: controller.orientationCalNoseDownSideVisible visible: controller.orientationCalNoseDownSideVisible
calValid: controller.orientationCalNoseDownSideDone calValid: controller.orientationCalNoseDownSideDone
calInProgress: controller.orientationCalNoseDownSideInProgress calInProgress: controller.orientationCalNoseDownSideInProgress
...@@ -477,6 +494,8 @@ QGCView { ...@@ -477,6 +494,8 @@ QGCView {
imageSource: controller.orientationCalNoseDownSideRotate ? "qrc:///qmlimages/VehicleNoseDownRotate.png" : "qrc:///qmlimages/VehicleNoseDown.png" imageSource: controller.orientationCalNoseDownSideRotate ? "qrc:///qmlimages/VehicleNoseDownRotate.png" : "qrc:///qmlimages/VehicleNoseDown.png"
} }
VehicleRotationCal { VehicleRotationCal {
width: parent.indicatorWidth
height: parent.indicatorHeight
visible: controller.orientationCalTailDownSideVisible visible: controller.orientationCalTailDownSideVisible
calValid: controller.orientationCalTailDownSideDone calValid: controller.orientationCalTailDownSideDone
calInProgress: controller.orientationCalTailDownSideInProgress calInProgress: controller.orientationCalTailDownSideInProgress
...@@ -484,6 +503,8 @@ QGCView { ...@@ -484,6 +503,8 @@ QGCView {
imageSource: controller.orientationCalTailDownSideRotate ? "qrc:///qmlimages/VehicleTailDownRotate.png" : "qrc:///qmlimages/VehicleTailDown.png" imageSource: controller.orientationCalTailDownSideRotate ? "qrc:///qmlimages/VehicleTailDownRotate.png" : "qrc:///qmlimages/VehicleTailDown.png"
} }
VehicleRotationCal { VehicleRotationCal {
width: parent.indicatorWidth
height: parent.indicatorHeight
visible: controller.orientationCalLeftSideVisible visible: controller.orientationCalLeftSideVisible
calValid: controller.orientationCalLeftSideDone calValid: controller.orientationCalLeftSideDone
calInProgress: controller.orientationCalLeftSideInProgress calInProgress: controller.orientationCalLeftSideInProgress
...@@ -491,6 +512,8 @@ QGCView { ...@@ -491,6 +512,8 @@ QGCView {
imageSource: controller.orientationCalLeftSideRotate ? "qrc:///qmlimages/VehicleLeftRotate.png" : "qrc:///qmlimages/VehicleLeft.png" imageSource: controller.orientationCalLeftSideRotate ? "qrc:///qmlimages/VehicleLeftRotate.png" : "qrc:///qmlimages/VehicleLeft.png"
} }
VehicleRotationCal { VehicleRotationCal {
width: parent.indicatorWidth
height: parent.indicatorHeight
visible: controller.orientationCalRightSideVisible visible: controller.orientationCalRightSideVisible
calValid: controller.orientationCalRightSideDone calValid: controller.orientationCalRightSideDone
calInProgress: controller.orientationCalRightSideInProgress calInProgress: controller.orientationCalRightSideInProgress
......
...@@ -464,3 +464,8 @@ bool APMSensorsComponentController::accelSetupNeeded(void) const ...@@ -464,3 +464,8 @@ bool APMSensorsComponentController::accelSetupNeeded(void) const
{ {
return _sensorsComponent->accelSetupNeeded(); return _sensorsComponent->accelSetupNeeded();
} }
bool APMSensorsComponentController::usingUDPLink(void)
{
return _vehicle->priorityLink()->getLinkConfiguration()->type() == LinkConfiguration::TypeUdp;
}
...@@ -77,6 +77,7 @@ public: ...@@ -77,6 +77,7 @@ public:
Q_INVOKABLE void calibrateAccel(void); Q_INVOKABLE void calibrateAccel(void);
Q_INVOKABLE void cancelCalibration(void); Q_INVOKABLE void cancelCalibration(void);
Q_INVOKABLE void nextClicked(void); Q_INVOKABLE void nextClicked(void);
Q_INVOKABLE bool usingUDPLink(void);
bool compassSetupNeeded(void) const; bool compassSetupNeeded(void) const;
bool accelSetupNeeded(void) const; bool accelSetupNeeded(void) const;
......
...@@ -51,6 +51,12 @@ void PX4SimpleFlightModesController::_rcChannelsChanged(int channelCount, int pw ...@@ -51,6 +51,12 @@ void PX4SimpleFlightModesController::_rcChannelsChanged(int channelCount, int pw
} }
int flightModeChannel = pFact->rawValue().toInt() - 1; int flightModeChannel = pFact->rawValue().toInt() - 1;
if (flightModeChannel == -1) {
// Flight mode channel not set, can't track active flight mode
_activeFlightMode = 0;
emit activeFlightModeChanged(_activeFlightMode);
return;
}
pFact = getParameterFact(-1, QString("RC%1_REV").arg(flightModeChannel + 1)); pFact = getParameterFact(-1, QString("RC%1_REV").arg(flightModeChannel + 1));
if(!pFact) { if(!pFact) {
......
...@@ -30,7 +30,7 @@ QGCView { ...@@ -30,7 +30,7 @@ QGCView {
readonly property string boardRotationText: qsTr("If the orientation is in the direction of flight, select ROTATION_NONE.") 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 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. Most users prefer to do this wirelessly with the telemetry link.") 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 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 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 levelHelp: qsTr("To level the horizon you need to place the vehicle in its level flight position and press OK.") readonly property string levelHelp: qsTr("To level the horizon you need to place the vehicle in its level flight position and press OK.")
...@@ -170,21 +170,29 @@ QGCView { ...@@ -170,21 +170,29 @@ QGCView {
} }
QGCLabel { QGCLabel {
id: boardRotationHelp
width: parent.width width: parent.width
wrapMode: Text.WordWrap wrapMode: Text.WordWrap
visible: (preCalibrationDialogType != "airspeed") && (preCalibrationDialogType != "gyro") visible: (preCalibrationDialogType != "airspeed") && (preCalibrationDialogType != "gyro")
text: boardRotationText text: boardRotationText
} }
Column {
visible: boardRotationHelp.visible
QGCLabel {
text: qsTr("Autopilot Orientation:")
}
FactComboBox { FactComboBox {
width: rotationColumnWidth id: boardRotationCombo
width: rotationColumnWidth;
model: rotations model: rotations
visible: preCalibrationDialogType != "airspeed" && (preCalibrationDialogType != "gyro")
fact: sens_board_rot fact: sens_board_rot
} }
} }
} }
} }
}
Component { Component {
id: setOrientationsDialogComponent id: setOrientationsDialogComponent
...@@ -454,8 +462,6 @@ QGCView { ...@@ -454,8 +462,6 @@ QGCView {
anchors.bottom: parent.bottom anchors.bottom: parent.bottom
anchors.left: parent.left anchors.left: parent.left
anchors.right: parent.right anchors.right: parent.right
width: parent.width
height: parent.height - orientationCalAreaHelpText.implicitHeight
spacing: ScreenTools.defaultFontPixelWidth / 2 spacing: ScreenTools.defaultFontPixelWidth / 2
property real indicatorWidth: (width / 3) - (spacing * 2) property real indicatorWidth: (width / 3) - (spacing * 2)
......
...@@ -223,7 +223,7 @@ QGCView { ...@@ -223,7 +223,7 @@ QGCView {
//-- Virtual Joystick //-- Virtual Joystick
Loader { Loader {
id: multiTouchItem id: virtualJoystickMultiTouch
z: _panel.z + 5 z: _panel.z + 5
width: parent.width - (_flightVideoPipControl.width / 2) width: parent.width - (_flightVideoPipControl.width / 2)
height: Math.min(ScreenTools.availableHeight * 0.25, ScreenTools.defaultFontPixelWidth * 16) height: Math.min(ScreenTools.availableHeight * 0.25, ScreenTools.defaultFontPixelWidth * 16)
......
...@@ -30,6 +30,8 @@ Item { ...@@ -30,6 +30,8 @@ Item {
property var _activeVehicle: QGroundControl.multiVehicleManager.activeVehicle property var _activeVehicle: QGroundControl.multiVehicleManager.activeVehicle
property bool _isSatellite: _mainIsMap ? (_flightMap ? _flightMap.isSatelliteMap : true) : true property bool _isSatellite: _mainIsMap ? (_flightMap ? _flightMap.isSatelliteMap : true) : true
property bool _lightWidgetBorders: _mainIsMap ? (_flightMap ? _flightMap.isSatelliteMap : true) : true property bool _lightWidgetBorders: _mainIsMap ? (_flightMap ? _flightMap.isSatelliteMap : true) : true
property bool _useAlternateInstruments: QGroundControl.virtualTabletJoystick || ScreenTools.isTinyScreen
readonly property real _margins: ScreenTools.defaultFontPixelHeight / 2 readonly property real _margins: ScreenTools.defaultFontPixelHeight / 2
...@@ -69,7 +71,7 @@ Item { ...@@ -69,7 +71,7 @@ Item {
QGCLabel { QGCLabel {
anchors.horizontalCenter: parent.horizontalCenter anchors.horizontalCenter: parent.horizontalCenter
visible: _activeVehicle && !_activeVehicle.coordinateValid visible: _activeVehicle && _activeVehicle.prearmError
z: QGroundControl.zOrderTopMost z: QGroundControl.zOrderTopMost
color: mapPal.text color: mapPal.text
font.pointSize: ScreenTools.largeFontPointSize font.pointSize: ScreenTools.largeFontPointSize
...@@ -94,7 +96,7 @@ Item { ...@@ -94,7 +96,7 @@ Item {
anchors.margins: ScreenTools.defaultFontPixelHeight / 2 anchors.margins: ScreenTools.defaultFontPixelHeight / 2
anchors.right: altitudeSlider.visible ? altitudeSlider.left : parent.right anchors.right: altitudeSlider.visible ? altitudeSlider.left : parent.right
anchors.verticalCenter: parent.verticalCenter anchors.verticalCenter: parent.verticalCenter
visible: !QGroundControl.virtualTabletJoystick visible: !_useAlternateInstruments
size: getGadgetWidth() size: getGadgetWidth()
active: _activeVehicle != null active: _activeVehicle != null
heading: _heading heading: _heading
...@@ -113,8 +115,8 @@ Item { ...@@ -113,8 +115,8 @@ Item {
anchors.margins: ScreenTools.defaultFontPixelHeight / 2 anchors.margins: ScreenTools.defaultFontPixelHeight / 2
anchors.top: parent.top anchors.top: parent.top
anchors.right: altitudeSlider.visible ? altitudeSlider.left : parent.right anchors.right: altitudeSlider.visible ? altitudeSlider.left : parent.right
visible: QGroundControl.virtualTabletJoystick visible: _useAlternateInstruments
width: ScreenTools.isTinyScreen ? getGadgetWidth() * 2 : getGadgetWidth() width: ScreenTools.isTinyScreen ? getGadgetWidth() * 1.5 : getGadgetWidth()
active: _activeVehicle != null active: _activeVehicle != null
heading: _heading heading: _heading
rollAngle: _roll rollAngle: _roll
...@@ -128,12 +130,12 @@ Item { ...@@ -128,12 +130,12 @@ Item {
ValuesWidget { ValuesWidget {
anchors.topMargin: ScreenTools.defaultFontPixelHeight anchors.topMargin: ScreenTools.defaultFontPixelHeight
anchors.top: instrumentGadgetAlternate.bottom anchors.top: instrumentGadgetAlternate.bottom
anchors.left: instrumentGadgetAlternate.left anchors.horizontalCenter: instrumentGadgetAlternate.horizontalCenter
width: getGadgetWidth() width: getGadgetWidth()
qgcView: parent.parent.qgcView qgcView: parent.parent.qgcView
textColor: _isSatellite ? "white" : "black" textColor: _isSatellite ? "white" : "black"
visible: QGroundControl.virtualTabletJoystick visible: _useAlternateInstruments
maxHeight: multiTouchItem.y - y maxHeight: virtualJoystickMultiTouch.visible ? virtualJoystickMultiTouch.y - y : parent.height - anchors.margins - y
} }
//-- Vertical Tool Buttons //-- Vertical Tool Buttons
...@@ -443,27 +445,31 @@ Item { ...@@ -443,27 +445,31 @@ Item {
} }
Row { Row {
spacing: _margins spacing: _margins * 2
QGCButton { QGCButton {
pointSize: ScreenTools.largeFontPointSize
text: (_activeVehicle && _activeVehicle.armed) ? (_activeVehicle.flying ? qsTr("Emergency Stop") : qsTr("Disarm")) : qsTr("Arm") text: (_activeVehicle && _activeVehicle.armed) ? (_activeVehicle.flying ? qsTr("Emergency Stop") : qsTr("Disarm")) : qsTr("Arm")
visible: _activeVehicle visible: _activeVehicle
onClicked: _guidedModeBar.confirmAction(_activeVehicle.armed ? (_activeVehicle.flying ? _guidedModeBar.confirmEmergencyStop : _guidedModeBar.confirmDisarm) : _guidedModeBar.confirmArm) onClicked: _guidedModeBar.confirmAction(_activeVehicle.armed ? (_activeVehicle.flying ? _guidedModeBar.confirmEmergencyStop : _guidedModeBar.confirmDisarm) : _guidedModeBar.confirmArm)
} }
QGCButton { QGCButton {
pointSize: ScreenTools.largeFontPointSize
text: qsTr("RTL") text: qsTr("RTL")
visible: (_activeVehicle && _activeVehicle.armed) && _activeVehicle.guidedModeSupported && _activeVehicle.flying visible: (_activeVehicle && _activeVehicle.armed) && _activeVehicle.guidedModeSupported && _activeVehicle.flying
onClicked: _guidedModeBar.confirmAction(_guidedModeBar.confirmHome) onClicked: _guidedModeBar.confirmAction(_guidedModeBar.confirmHome)
} }
QGCButton { QGCButton {
pointSize: ScreenTools.largeFontPointSize
text: (_activeVehicle && _activeVehicle.flying) ? qsTr("Land"): qsTr("Takeoff") text: (_activeVehicle && _activeVehicle.flying) ? qsTr("Land"): qsTr("Takeoff")
visible: _activeVehicle && _activeVehicle.guidedModeSupported && _activeVehicle.armed visible: _activeVehicle && _activeVehicle.guidedModeSupported && _activeVehicle.armed
onClicked: _guidedModeBar.confirmAction(_activeVehicle.flying ? _guidedModeBar.confirmLand : _guidedModeBar.confirmTakeoff) onClicked: _guidedModeBar.confirmAction(_activeVehicle.flying ? _guidedModeBar.confirmLand : _guidedModeBar.confirmTakeoff)
} }
QGCButton { QGCButton {
pointSize: ScreenTools.largeFontPointSize
text: qsTr("Pause") text: qsTr("Pause")
visible: (_activeVehicle && _activeVehicle.armed) && _activeVehicle.pauseVehicleSupported && _activeVehicle.flying visible: (_activeVehicle && _activeVehicle.armed) && _activeVehicle.pauseVehicleSupported && _activeVehicle.flying
onClicked: { onClicked: {
...@@ -473,6 +479,7 @@ Item { ...@@ -473,6 +479,7 @@ Item {
} }
QGCButton { QGCButton {
pointSize: ScreenTools.largeFontPointSize
text: qsTr("Change Altitude") text: qsTr("Change Altitude")
visible: (_activeVehicle && _activeVehicle.flying) && _activeVehicle.guidedModeSupported && _activeVehicle.armed visible: (_activeVehicle && _activeVehicle.flying) && _activeVehicle.guidedModeSupported && _activeVehicle.armed
onClicked: _guidedModeBar.confirmAction(_guidedModeBar.confirmChangeAlt) onClicked: _guidedModeBar.confirmAction(_guidedModeBar.confirmChangeAlt)
...@@ -493,7 +500,7 @@ Item { ...@@ -493,7 +500,7 @@ Item {
anchors.bottomMargin: _margins anchors.bottomMargin: _margins
anchors.bottom: parent.bottom anchors.bottom: parent.bottom
anchors.horizontalCenter: parent.horizontalCenter anchors.horizontalCenter: parent.horizontalCenter
height: ScreenTools.defaultFontPixelHeight * 3 height: _guidedModeBar.height
visible: false visible: false
z: QGroundControl.zOrderWidgets z: QGroundControl.zOrderWidgets
......
...@@ -20,8 +20,6 @@ ...@@ -20,8 +20,6 @@
Q_DECLARE_LOGGING_CATEGORY(JoystickManagerLog) Q_DECLARE_LOGGING_CATEGORY(JoystickManagerLog)
class QGCApplicaiton;
class JoystickManager : public QGCTool class JoystickManager : public QGCTool
{ {
Q_OBJECT Q_OBJECT
......
...@@ -7,8 +7,8 @@ import QGroundControl.Palette 1.0 ...@@ -7,8 +7,8 @@ import QGroundControl.Palette 1.0
import QGroundControl.ScreenTools 1.0 import QGroundControl.ScreenTools 1.0
Button { Button {
property bool primary: false ///< primary button for a group of buttons property bool primary: false ///< primary button for a group of buttons
property real pointSize: ScreenTools.defaultFontPointSize ///< Point size for button text
property var _qgcPal: QGCPalette { colorGroupEnabled: enabled } property var _qgcPal: QGCPalette { colorGroupEnabled: enabled }
property bool _showHighlight: (pressed | hovered | checked) && !__forceHoverOff property bool _showHighlight: (pressed | hovered | checked) && !__forceHoverOff
...@@ -102,7 +102,7 @@ Button { ...@@ -102,7 +102,7 @@ Button {
id: text id: text
antialiasing: true antialiasing: true
text: control.text text: control.text
font.pointSize: ScreenTools.defaultFontPointSize font.pointSize: pointSize
font.family: ScreenTools.normalFontFamily font.family: ScreenTools.normalFontFamily
anchors.verticalCenter: parent.verticalCenter anchors.verticalCenter: parent.verticalCenter
color: _showHighlight ? color: _showHighlight ?
......
...@@ -26,6 +26,7 @@ Rectangle { ...@@ -26,6 +26,7 @@ Rectangle {
id: label id: label
anchors.horizontalCenter: parent.horizontalCenter anchors.horizontalCenter: parent.horizontalCenter
anchors.verticalCenter: parent.verticalCenter anchors.verticalCenter: parent.verticalCenter
font.pointSize: ScreenTools.largeFontPointSize
text: qsTr("Slide to %1").arg(confirmText) text: qsTr("Slide to %1").arg(confirmText)
} }
......
...@@ -1057,7 +1057,10 @@ void Vehicle::_loadSettings(void) ...@@ -1057,7 +1057,10 @@ void Vehicle::_loadSettings(void)
_joystickMode = JoystickModeRC; _joystickMode = JoystickModeRC;
} }
// Joystick enabled is a global setting so first make sure there are any joysticks connected
if (qgcApp()->toolbox()->joystickManager()->joysticks().count()) {
_joystickEnabled = settings.value(_joystickEnabledSettingsKey, false).toBool(); _joystickEnabled = settings.value(_joystickEnabledSettingsKey, false).toBool();
}
} }
void Vehicle::_saveSettings(void) void Vehicle::_saveSettings(void)
......
...@@ -245,7 +245,8 @@ QGCView { ...@@ -245,7 +245,8 @@ QGCView {
QGCComboBox { QGCComboBox {
id: vehicleTypeSelectionCombo id: vehicleTypeSelectionCombo
width: 200 anchors.left: parent.left
anchors.right: parent.right
visible: apmFlightStack.checked visible: apmFlightStack.checked
model: controller.apmAvailableVersions model: controller.apmAvailableVersions
} }
...@@ -291,7 +292,8 @@ QGCView { ...@@ -291,7 +292,8 @@ QGCView {
QGCComboBox { QGCComboBox {
id: firmwareVersionCombo id: firmwareVersionCombo
width: 200 anchors.left: parent.left
anchors.right: parent.right
visible: showFirmwareTypeSelection visible: showFirmwareTypeSelection
model: px4Flow ? px4FlowTypeList : firmwareTypeList model: px4Flow ? px4FlowTypeList : firmwareTypeList
currentIndex: controller.selectedFirmwareType currentIndex: controller.selectedFirmwareType
......
...@@ -173,7 +173,7 @@ Row { ...@@ -173,7 +173,7 @@ Row {
visible: activeVehicle && !isNaN(activeVehicle.gps.hdop.value) visible: activeVehicle && !isNaN(activeVehicle.gps.hdop.value)
font.pointSize: ScreenTools.smallFontPointSize font.pointSize: ScreenTools.smallFontPointSize
color: qgcPal.buttonText color: qgcPal.buttonText
text: activeVehicle ? activeVehicle.gps.hdop.value.toFixed(0) : "" text: activeVehicle ? activeVehicle.gps.hdop.value.toFixed(1) : ""
} }
MouseArea { MouseArea {
anchors.fill: parent anchors.fill: parent
......
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