Commit f28c7003 authored by DonLakeFlyer's avatar DonLakeFlyer
parents 2cdccb25 f2ae16db
files: files:
- source: /translations/qgc.ts - source: /translations/qgc.ts
translation: /translations/qgc_%locale_with_underscore%.ts translation: /translations/qgc_source_%locale_with_underscore%.ts
- source: /translations/qgc-json.ts - source: /translations/qgc-json.ts
translation: /translations/qgc_%locale_with_underscore%.ts translation: /translations/qgc_json_%locale_with_underscore%.ts
...@@ -33,7 +33,7 @@ Item { ...@@ -33,7 +33,7 @@ Item {
VehicleSummaryRow { VehicleSummaryRow {
labelText: qsTr("Firmware Version") labelText: qsTr("Firmware Version")
valueText: activeVehicle.firmwareMajorVersion == -1 ? qsTr("Unknown") : activeVehicle.firmwareMajorVersion + "." + activeVehicle.firmwareMinorVersion + "." + activeVehicle.firmwarePatchVersion + activeVehicle.firmwareVersionTypeString valueText: globals.activeVehicle.firmwareMajorVersion == -1 ? qsTr("Unknown") : globals.activeVehicle.firmwareMajorVersion + "." + globals.activeVehicle.firmwareMinorVersion + "." + globals.activeVehicle.firmwarePatchVersion + globals.activeVehicle.firmwareVersionTypeString
} }
} }
} }
...@@ -35,7 +35,7 @@ SetupPage { ...@@ -35,7 +35,7 @@ SetupPage {
QGCPalette { id: palette; colorGroupEnabled: true } QGCPalette { id: palette; colorGroupEnabled: true }
property bool _oldFW: !(activeVehicle.firmwareMajorVersion > 3 || activeVehicle.firmwareMinorVersion > 5 || activeVehicle.firmwarePatchVersion >= 2) property bool _oldFW: !(globals.activeVehicle.firmwareMajorVersion > 3 || globals.activeVehicle.firmwareMinorVersion > 5 || globals.activeVehicle.firmwarePatchVersion >= 2)
property Fact _mountRetractX: controller.getParameterFact(-1, "MNT_RETRACT_X") property Fact _mountRetractX: controller.getParameterFact(-1, "MNT_RETRACT_X")
property Fact _mountRetractY: controller.getParameterFact(-1, "MNT_RETRACT_Y") property Fact _mountRetractY: controller.getParameterFact(-1, "MNT_RETRACT_Y")
......
...@@ -35,7 +35,7 @@ SetupPage { ...@@ -35,7 +35,7 @@ SetupPage {
QGCPalette { id: ggcPal; colorGroupEnabled: true } QGCPalette { id: ggcPal; colorGroupEnabled: true }
property bool _firmware34: activeVehicle.versionCompare(3, 5, 0) < 0 property bool _firmware34: globals.activeVehicle.versionCompare(3, 5, 0) < 0
// Enable/Action parameters // Enable/Action parameters
property Fact _failsafeBatteryEnable: controller.getParameterFact(-1, "r.BATT_FS_LOW_ACT") property Fact _failsafeBatteryEnable: controller.getParameterFact(-1, "r.BATT_FS_LOW_ACT")
......
...@@ -10,7 +10,7 @@ import QGroundControl.Palette 1.0 ...@@ -10,7 +10,7 @@ import QGroundControl.Palette 1.0
Item { Item {
anchors.fill: parent anchors.fill: parent
property bool _firmware34: activeVehicle.versionCompare(3, 5, 0) < 0 property bool _firmware34: globals.activeVehicle.versionCompare(3, 5, 0) < 0
FactPanelController { id: controller; } FactPanelController { id: controller; }
......
...@@ -178,7 +178,7 @@ SetupPage { ...@@ -178,7 +178,7 @@ SetupPage {
Component.onCompleted: { Component.onCompleted: {
var usingUDP = controller.usingUDPLink() var usingUDP = controller.usingUDPLink()
var isSub = QGroundControl.multiVehicleManager.activeVehicle.sub; var isSub = globals.activeVehicle.sub;
if (usingUDP && !isSub) { if (usingUDP && !isSub) {
mainWindow.showMessageDialog(qsTr("Sensor Calibration"), qsTr("Performing sensor calibration over a WiFi connection can be unreliable. If you run into problems try using a direct USB connection instead.")) mainWindow.showMessageDialog(qsTr("Sensor Calibration"), qsTr("Performing sensor calibration over a WiFi connection can be unreliable. If you run into problems try using a direct USB connection instead."))
} }
...@@ -562,9 +562,9 @@ SetupPage { ...@@ -562,9 +562,9 @@ SetupPage {
wrapMode: Text.WordWrap wrapMode: Text.WordWrap
text: _helpText text: _helpText
readonly property string _altText: activeVehicle.sub ? qsTr("depth") : qsTr("altitude") readonly property string _altText: globals.activeVehicle.sub ? qsTr("depth") : qsTr("altitude")
readonly property string _helpText: qsTr("Pressure calibration will set the %1 to zero at the current pressure reading. %2").arg(_altText).arg(_helpTextFW) readonly property string _helpText: qsTr("Pressure calibration will set the %1 to zero at the current pressure reading. %2").arg(_altText).arg(_helpTextFW)
readonly property string _helpTextFW: activeVehicle.fixedWing ? qsTr("To calibrate the airspeed sensor shield it from the wind. Do not touch the sensor or obstruct any holes during the calibration.") : "" readonly property string _helpTextFW: globals.activeVehicle.fixedWing ? qsTr("To calibrate the airspeed sensor shield it from the wind. Do not touch the sensor or obstruct any holes during the calibration.") : ""
} }
} // QGCViewDialog } // QGCViewDialog
} // Component - calibratePressureDialogComponent } // Component - calibratePressureDialogComponent
...@@ -644,7 +644,7 @@ SetupPage { ...@@ -644,7 +644,7 @@ SetupPage {
QGCButton { QGCButton {
width: _buttonWidth width: _buttonWidth
text: qsTr("Gyro") text: qsTr("Gyro")
visible: activeVehicle && (activeVehicle.multiRotor | activeVehicle.rover) visible: globals.activeVehicle && (globals.activeVehicle.multiRotor | globals.activeVehicle.rover)
onClicked: mainWindow.showComponentDialog(calibrateGyroDialogComponent, qsTr("Calibrate Gyro"), mainWindow.showDialogDefaultWidth, StandardButton.Cancel | StandardButton.Ok) onClicked: mainWindow.showComponentDialog(calibrateGyroDialogComponent, qsTr("Calibrate Gyro"), mainWindow.showDialogDefaultWidth, StandardButton.Cancel | StandardButton.Ok)
} }
...@@ -653,13 +653,13 @@ SetupPage { ...@@ -653,13 +653,13 @@ SetupPage {
text: _calibratePressureText text: _calibratePressureText
onClicked: mainWindow.showComponentDialog(calibratePressureDialogComponent, _calibratePressureText, mainWindow.showDialogDefaultWidth, StandardButton.Cancel | StandardButton.Ok) onClicked: mainWindow.showComponentDialog(calibratePressureDialogComponent, _calibratePressureText, mainWindow.showDialogDefaultWidth, StandardButton.Cancel | StandardButton.Ok)
readonly property string _calibratePressureText: activeVehicle.fixedWing ? qsTr("Baro/Airspeed") : qsTr("Pressure") readonly property string _calibratePressureText: globals.activeVehicle.fixedWing ? qsTr("Baro/Airspeed") : qsTr("Pressure")
} }
QGCButton { QGCButton {
width: _buttonWidth width: _buttonWidth
text: qsTr("CompassMot") text: qsTr("CompassMot")
visible: activeVehicle ? activeVehicle.supportsMotorInterference : false visible: globals.activeVehicle ? globals.activeVehicle.supportsMotorInterference : false
onClicked: mainWindow.showComponentDialog(compassMotDialogComponent, qsTr("CompassMot - Compass Motor Interference Calibration"), mainWindow.showDialogFullWidth, StandardButton.Cancel | StandardButton.Ok) onClicked: mainWindow.showComponentDialog(compassMotDialogComponent, qsTr("CompassMot - Compass Motor Interference Calibration"), mainWindow.showDialogFullWidth, StandardButton.Cancel | StandardButton.Ok)
} }
......
...@@ -24,7 +24,7 @@ SetupPage { ...@@ -24,7 +24,7 @@ SetupPage {
id: subFramePage id: subFramePage
pageComponent: subFramePageComponent pageComponent: subFramePageComponent
property bool _oldFW: activeVehicle.versionCompare(3 ,5 ,2) < 0 property bool _oldFW: globals.activeVehicle.versionCompare(3 ,5 ,2) < 0
APMAirframeComponentController { id: controller; } APMAirframeComponentController { id: controller; }
......
...@@ -47,12 +47,12 @@ Item { ...@@ -47,12 +47,12 @@ Item {
VehicleSummaryRow { VehicleSummaryRow {
labelText: qsTr("Firmware Version") labelText: qsTr("Firmware Version")
valueText: activeVehicle.firmwareMajorVersion == -1 ? qsTr("Unknown") : activeVehicle.firmwareMajorVersion + "." + activeVehicle.firmwareMinorVersion + "." + activeVehicle.firmwarePatchVersion + " " + activeVehicle.firmwareVersionTypeString valueText: globals.activeVehicle.firmwareMajorVersion == -1 ? qsTr("Unknown") : globals.activeVehicle.firmwareMajorVersion + "." + globals.activeVehicle.firmwareMinorVersion + "." + globals.activeVehicle.firmwarePatchVersion + " " + globals.activeVehicle.firmwareVersionTypeString
} }
VehicleSummaryRow { VehicleSummaryRow {
labelText: qsTr("Git Revision") labelText: qsTr("Git Revision")
valueText: activeVehicle.gitHash == -1 ? qsTr("Unknown") : activeVehicle.gitHash valueText: globals.activeVehicle.gitHash == -1 ? qsTr("Unknown") : globals.activeVehicle.gitHash
} }
} }
} }
...@@ -157,7 +157,7 @@ SetupPage { ...@@ -157,7 +157,7 @@ SetupPage {
anchors.right: parent.right anchors.right: parent.right
anchors.top: parent.top anchors.top: parent.top
sourceComponent: activeVehicle.versionCompare(3, 6, 0) <= 0 ? velColumnUpTo36 :velColumn40 sourceComponent: globals.activeVehicle.versionCompare(3, 6, 0) <= 0 ? velColumnUpTo36 :velColumn40
} }
} // Rectangle - VEL parameters } // Rectangle - VEL parameters
...@@ -224,7 +224,7 @@ SetupPage { ...@@ -224,7 +224,7 @@ SetupPage {
anchors.right: parent.right anchors.right: parent.right
anchors.top: parent.top anchors.top: parent.top
sourceComponent: activeVehicle.versionCompare(3, 6, 0) < 0 ? wpnavColumn35 : wpnavColumn36 sourceComponent: globals.activeVehicle.versionCompare(3, 6, 0) < 0 ? wpnavColumn35 : wpnavColumn36
} }
} // Rectangle - WPNAV parameters } // Rectangle - WPNAV parameters
} // Column } // Column
......
...@@ -160,7 +160,7 @@ SetupPage { ...@@ -160,7 +160,7 @@ SetupPage {
// Center point // Center point
Rectangle { Rectangle {
anchors.horizontalCenter: parent.horizontalCenter anchors.horizontalCenter: parent.horizontalCenter
width: defaultTextWidth / 2 width: globals.defaultTextWidth / 2
height: parent.height height: parent.height
color: qgcPal.window color: qgcPal.window
} }
...@@ -210,10 +210,10 @@ SetupPage { ...@@ -210,10 +210,10 @@ SetupPage {
Item { Item {
width: parent.width width: parent.width
height: defaultTextHeight * 2 height: globals.defaultTextHeight * 2
QGCLabel { QGCLabel {
id: rollLabel id: rollLabel
width: defaultTextWidth * 10 width: globals.defaultTextWidth * 10
text: qsTr("Roll") text: qsTr("Roll")
} }
...@@ -221,11 +221,10 @@ SetupPage { ...@@ -221,11 +221,10 @@ SetupPage {
id: rollLoader id: rollLoader
anchors.left: rollLabel.right anchors.left: rollLabel.right
anchors.right: parent.right anchors.right: parent.right
height: defaultTextHeight height: globals.defaultTextHeight
width: 100 width: 100
sourceComponent: channelMonitorDisplayComponent sourceComponent: channelMonitorDisplayComponent
property real defaultTextWidth: defaultTextWidth
property bool mapped: controller.rollChannelMapped property bool mapped: controller.rollChannelMapped
property bool reversed: controller.rollChannelReversed property bool reversed: controller.rollChannelReversed
} }
...@@ -239,11 +238,11 @@ SetupPage { ...@@ -239,11 +238,11 @@ SetupPage {
Item { Item {
width: parent.width width: parent.width
height: defaultTextHeight * 2 height: globals.defaultTextHeight * 2
QGCLabel { QGCLabel {
id: pitchLabel id: pitchLabel
width: defaultTextWidth * 10 width: globals.defaultTextWidth * 10
text: qsTr("Pitch") text: qsTr("Pitch")
} }
...@@ -251,11 +250,10 @@ SetupPage { ...@@ -251,11 +250,10 @@ SetupPage {
id: pitchLoader id: pitchLoader
anchors.left: pitchLabel.right anchors.left: pitchLabel.right
anchors.right: parent.right anchors.right: parent.right
height: defaultTextHeight height: globals.defaultTextHeight
width: 100 width: 100
sourceComponent: channelMonitorDisplayComponent sourceComponent: channelMonitorDisplayComponent
property real defaultTextWidth: defaultTextWidth
property bool mapped: controller.pitchChannelMapped property bool mapped: controller.pitchChannelMapped
property bool reversed: controller.pitchChannelReversed property bool reversed: controller.pitchChannelReversed
} }
...@@ -269,11 +267,11 @@ SetupPage { ...@@ -269,11 +267,11 @@ SetupPage {
Item { Item {
width: parent.width width: parent.width
height: defaultTextHeight * 2 height: globals.defaultTextHeight * 2
QGCLabel { QGCLabel {
id: yawLabel id: yawLabel
width: defaultTextWidth * 10 width: globals.defaultTextWidth * 10
text: qsTr("Yaw") text: qsTr("Yaw")
} }
...@@ -281,11 +279,10 @@ SetupPage { ...@@ -281,11 +279,10 @@ SetupPage {
id: yawLoader id: yawLoader
anchors.left: yawLabel.right anchors.left: yawLabel.right
anchors.right: parent.right anchors.right: parent.right
height: defaultTextHeight height: globals.defaultTextHeight
width: 100 width: 100
sourceComponent: channelMonitorDisplayComponent sourceComponent: channelMonitorDisplayComponent
property real defaultTextWidth: defaultTextWidth
property bool mapped: controller.yawChannelMapped property bool mapped: controller.yawChannelMapped
property bool reversed: controller.yawChannelReversed property bool reversed: controller.yawChannelReversed
} }
...@@ -299,11 +296,11 @@ SetupPage { ...@@ -299,11 +296,11 @@ SetupPage {
Item { Item {
width: parent.width width: parent.width
height: defaultTextHeight * 2 height: globals.defaultTextHeight * 2
QGCLabel { QGCLabel {
id: throttleLabel id: throttleLabel
width: defaultTextWidth * 10 width: globals.defaultTextWidth * 10
text: qsTr("Throttle") text: qsTr("Throttle")
} }
...@@ -311,11 +308,10 @@ SetupPage { ...@@ -311,11 +308,10 @@ SetupPage {
id: throttleLoader id: throttleLoader
anchors.left: throttleLabel.right anchors.left: throttleLabel.right
anchors.right: parent.right anchors.right: parent.right
height: defaultTextHeight height: globals.defaultTextHeight
width: 100 width: 100
sourceComponent: channelMonitorDisplayComponent sourceComponent: channelMonitorDisplayComponent
property real defaultTextWidth: defaultTextWidth
property bool mapped: controller.throttleChannelMapped property bool mapped: controller.throttleChannelMapped
property bool reversed: controller.throttleChannelReversed property bool reversed: controller.throttleChannelReversed
} }
......
...@@ -33,9 +33,9 @@ Item { ...@@ -33,9 +33,9 @@ Item {
property bool showAdvanced: false property bool showAdvanced: false
property alias advanced: advancedCheckBox.checked property alias advanced: advancedCheckBox.checked
property bool _vehicleIsRover: activeVehicle ? activeVehicle.rover : false property bool _vehicleIsRover: globals.activeVehicle ? globals.activeVehicle.rover : false
property bool _vehicleArmed: activeVehicle ? activeVehicle.armed : false property bool _vehicleArmed: globals.activeVehicle ? globals.activeVehicle.armed : false
property bool _vehicleFlying: activeVehicle ? activeVehicle.flying : false property bool _vehicleFlying: globals.activeVehicle ? globals.activeVehicle.flying : false
property bool _disableDueToArmed: vehicleComponent ? (!vehicleComponent.allowSetupWhileArmed && _vehicleArmed) : false property bool _disableDueToArmed: vehicleComponent ? (!vehicleComponent.allowSetupWhileArmed && _vehicleArmed) : false
// FIXME: The _vehicleIsRover checkl is a hack to work around https://github.com/PX4/Firmware/issues/10969 // FIXME: The _vehicleIsRover checkl is a hack to work around https://github.com/PX4/Firmware/issues/10969
property bool _disableDueToFlying: vehicleComponent ? (!_vehicleIsRover && !vehicleComponent.allowSetupWhileFlying && _vehicleFlying) : false property bool _disableDueToFlying: vehicleComponent ? (!_vehicleIsRover && !vehicleComponent.allowSetupWhileFlying && _vehicleFlying) : false
......
...@@ -34,12 +34,12 @@ Item { ...@@ -34,12 +34,12 @@ Item {
VehicleSummaryRow { VehicleSummaryRow {
labelText: qsTr("Firmware Version") labelText: qsTr("Firmware Version")
valueText: activeVehicle.firmwareMajorVersion === -1 ? qsTr("Unknown") : activeVehicle.firmwareMajorVersion + "." + activeVehicle.firmwareMinorVersion + "." + activeVehicle.firmwarePatchVersion + activeVehicle.firmwareVersionTypeString valueText: globals.activeVehicle.firmwareMajorVersion === -1 ? qsTr("Unknown") : globals.activeVehicle.firmwareMajorVersion + "." + globals.activeVehicle.firmwareMinorVersion + "." + globals.activeVehicle.firmwarePatchVersion + globals.activeVehicle.firmwareVersionTypeString
} }
VehicleSummaryRow { VehicleSummaryRow {
visible: activeVehicle.firmwareCustomMajorVersion !== -1 visible: globals.activeVehicle.firmwareCustomMajorVersion !== -1
labelText: qsTr("Custom Fw. Ver.") labelText: qsTr("Custom Fw. Ver.")
valueText: activeVehicle.firmwareCustomMajorVersion + "." + activeVehicle.firmwareCustomMinorVersion + "." + activeVehicle.firmwareCustomPatchVersion valueText: globals.activeVehicle.firmwareCustomMajorVersion + "." + globals.activeVehicle.firmwareCustomMinorVersion + "." + globals.activeVehicle.firmwareCustomPatchVersion
} }
} }
} }
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
<long_desc>Speed controller bandwidth, in Hz. Higher values result in faster speed and current rise times, but may result in overshoot and higher current consumption. For fixed-wing aircraft, this value should be less than 50 Hz; for multirotors, values up to 100 Hz may provide improvements in responsiveness.</long_desc> <long_desc>Speed controller bandwidth, in Hz. Higher values result in faster speed and current rise times, but may result in overshoot and higher current consumption. For fixed-wing aircraft, this value should be less than 50 Hz; for multirotors, values up to 100 Hz may provide improvements in responsiveness.</long_desc>
<min>10</min> <min>10</min>
<max>250</max> <max>250</max>
<unit>Hertz</unit> <unit>Hz</unit>
</parameter> </parameter>
<parameter default="1" name="ctl_dir" type="INT32"> <parameter default="1" name="ctl_dir" type="INT32">
<short_desc>Reverse direction</short_desc> <short_desc>Reverse direction</short_desc>
...@@ -27,7 +27,7 @@ ...@@ -27,7 +27,7 @@
slower, smoother response.</long_desc> slower, smoother response.</long_desc>
<min>0.00</min> <min>0.00</min>
<max>1.00</max> <max>1.00</max>
<unit>amp-seconds per radian</unit> <unit>C/rad</unit>
<decimal>3</decimal> <decimal>3</decimal>
</parameter> </parameter>
<parameter default="3.5" name="ctl_hz_idle" type="FLOAT"> <parameter default="3.5" name="ctl_hz_idle" type="FLOAT">
...@@ -35,7 +35,7 @@ ...@@ -35,7 +35,7 @@
<long_desc>Idle speed (e Hz)</long_desc> <long_desc>Idle speed (e Hz)</long_desc>
<min>0.0</min> <min>0.0</min>
<max>100.0</max> <max>100.0</max>
<unit>Hertz</unit> <unit>Hz</unit>
<decimal>3</decimal> <decimal>3</decimal>
</parameter> </parameter>
<parameter default="25" name="ctl_start_rate" type="INT32"> <parameter default="25" name="ctl_start_rate" type="INT32">
...@@ -43,14 +43,13 @@ ...@@ -43,14 +43,13 @@
<long_desc>Spin-up rate (e Hz/s)</long_desc> <long_desc>Spin-up rate (e Hz/s)</long_desc>
<min>5</min> <min>5</min>
<max>1000</max> <max>1000</max>
<unit>Hz/s</unit> <unit>1/s^2</unit>
</parameter> </parameter>
<parameter default="0" name="esc_index" type="INT32"> <parameter default="0" name="esc_index" type="INT32">
<short_desc>Index of this ESC in throttle command messages.</short_desc> <short_desc>Index of this ESC in throttle command messages.</short_desc>
<long_desc>Index of this ESC in throttle command messages.</long_desc> <long_desc>Index of this ESC in throttle command messages.</long_desc>
<min>0</min> <min>0</min>
<max>15</max> <max>15</max>
<unit>Index</unit>
</parameter> </parameter>
<parameter default="20034" name="id_ext_status" type="INT32"> <parameter default="20034" name="id_ext_status" type="INT32">
<short_desc>Extended status ID</short_desc> <short_desc>Extended status ID</short_desc>
...@@ -63,13 +62,13 @@ ...@@ -63,13 +62,13 @@
<long_desc>Extended status interval (µs)</long_desc> <long_desc>Extended status interval (µs)</long_desc>
<min>0</min> <min>0</min>
<max>1000000</max> <max>1000000</max>
<unit>µs</unit> <unit>us</unit>
</parameter> </parameter>
<parameter default="50000" name="int_status" type="INT32"> <parameter default="50000" name="int_status" type="INT32">
<short_desc>ESC status interval (µs)</short_desc> <short_desc>ESC status interval (µs)</short_desc>
<long_desc>ESC status interval (µs)</long_desc> <long_desc>ESC status interval (µs)</long_desc>
<max>1000000</max> <max>1000000</max>
<unit>µs</unit> <unit>us</unit>
</parameter> </parameter>
<parameter default="12" name="mot_i_max" type="FLOAT"> <parameter default="12" name="mot_i_max" type="FLOAT">
<short_desc>Motor current limit in amps</short_desc> <short_desc>Motor current limit in amps</short_desc>
...@@ -81,7 +80,7 @@ ...@@ -81,7 +80,7 @@
divided by the motor voltage limit.</long_desc> divided by the motor voltage limit.</long_desc>
<min>1</min> <min>1</min>
<max>80</max> <max>80</max>
<unit>Amps</unit> <unit>A</unit>
<decimal>3</decimal> <decimal>3</decimal>
</parameter> </parameter>
<parameter default="2300" name="mot_kv" type="INT32"> <parameter default="2300" name="mot_kv" type="INT32">
...@@ -91,12 +90,12 @@ ...@@ -91,12 +90,12 @@
some deviation from the specified value is acceptable.</long_desc> some deviation from the specified value is acceptable.</long_desc>
<min>0</min> <min>0</min>
<max>4000</max> <max>4000</max>
<unit>RPM/v</unit> <unit>rpm/V</unit>
</parameter> </parameter>
<parameter default="0.0" name="mot_ls" type="FLOAT"> <parameter default="0.0" name="mot_ls" type="FLOAT">
<short_desc>READ ONLY: Motor inductance in henries.</short_desc> <short_desc>READ ONLY: Motor inductance in henries.</short_desc>
<long_desc>READ ONLY: Motor inductance in henries. This is measured on start-up.</long_desc> <long_desc>READ ONLY: Motor inductance in henries. This is measured on start-up.</long_desc>
<unit>henries</unit> <unit>H</unit>
<decimal>3</decimal> <decimal>3</decimal>
</parameter> </parameter>
<parameter default="14" name="mot_num_poles" type="INT32"> <parameter default="14" name="mot_num_poles" type="INT32">
...@@ -106,14 +105,13 @@ ...@@ -106,14 +105,13 @@
specification sheet.</long_desc> specification sheet.</long_desc>
<min>2</min> <min>2</min>
<max>40</max> <max>40</max>
<unit>Poles</unit>
</parameter> </parameter>
<parameter default="0.0" name="mot_rs" type="FLOAT"> <parameter default="0.0" name="mot_rs" type="FLOAT">
<short_desc>READ ONLY: Motor resistance in ohms</short_desc> <short_desc>READ ONLY: Motor resistance in ohms</short_desc>
<long_desc>READ ONLY: Motor resistance in ohms. This is measured on start-up. When <long_desc>READ ONLY: Motor resistance in ohms. This is measured on start-up. When
tuning a new motor, check that this value is approximately equal tuning a new motor, check that this value is approximately equal
to the value shown in the motor’s specification sheet.</long_desc> to the value shown in the motor’s specification sheet.</long_desc>
<unit>Ohms</unit> <unit>Ohm</unit>
<decimal>3</decimal> <decimal>3</decimal>
</parameter> </parameter>
<parameter default="0.5" name="mot_v_accel" type="FLOAT"> <parameter default="0.5" name="mot_v_accel" type="FLOAT">
...@@ -121,7 +119,7 @@ ...@@ -121,7 +119,7 @@
<long_desc>Acceleration limit (V)</long_desc> <long_desc>Acceleration limit (V)</long_desc>
<min>0.01</min> <min>0.01</min>
<max>1.00</max> <max>1.00</max>
<unit>Volts</unit> <unit>V</unit>
<decimal>3</decimal> <decimal>3</decimal>
</parameter> </parameter>
<parameter default="14.8" name="mot_v_max" type="FLOAT"> <parameter default="14.8" name="mot_v_max" type="FLOAT">
...@@ -132,7 +130,7 @@ ...@@ -132,7 +130,7 @@
actual motor voltage limit, divide the motor’s rated power by the actual motor voltage limit, divide the motor’s rated power by the
motor current limit.</long_desc> motor current limit.</long_desc>
<min>0</min> <min>0</min>
<unit>Volts</unit> <unit>V</unit>
<decimal>3</decimal> <decimal>3</decimal>
</parameter> </parameter>
</group> </group>
...@@ -195,7 +193,7 @@ ...@@ -195,7 +193,7 @@
</long_desc> </long_desc>
<min>0</min> <min>0</min>
<max>1000000</max> <max>1000000</max>
<unit>microseconds</unit> <unit>us</unit>
</parameter> </parameter>
</group> </group>
<group name="Airspeed Validator"> <group name="Airspeed Validator">
...@@ -279,7 +277,7 @@ ...@@ -279,7 +277,7 @@
<long_desc>Airspeed scale process noise of the internal wind estimator(s) of the airspeed selector.</long_desc> <long_desc>Airspeed scale process noise of the internal wind estimator(s) of the airspeed selector.</long_desc>
<min>0</min> <min>0</min>
<max>0.1</max> <max>0.1</max>
<unit>1/s</unit> <unit>Hz</unit>
</parameter> </parameter>
<parameter default="10.0" name="ASPD_STALL" type="FLOAT"> <parameter default="10.0" name="ASPD_STALL" type="FLOAT">
<short_desc>Airspeed fault detection stall airspeed. (Experimental)</short_desc> <short_desc>Airspeed fault detection stall airspeed. (Experimental)</short_desc>
...@@ -305,7 +303,7 @@ ...@@ -305,7 +303,7 @@
<long_desc>Wind process noise of the internal wind estimator(s) of the airspeed selector.</long_desc> <long_desc>Wind process noise of the internal wind estimator(s) of the airspeed selector.</long_desc>
<min>0</min> <min>0</min>
<max>1</max> <max>1</max>
<unit>m/s/s</unit> <unit>m/s^2</unit>
</parameter> </parameter>
</group> </group>
<group name="Attitude Q estimator"> <group name="Attitude Q estimator">
...@@ -643,7 +641,7 @@ Set to 2 to use heading from motion capture</short_desc> ...@@ -643,7 +641,7 @@ Set to 2 to use heading from motion capture</short_desc>
<long_desc>If non-negative, then this will be used in place of BAT_V_LOAD_DROP for all calculations.</long_desc> <long_desc>If non-negative, then this will be used in place of BAT_V_LOAD_DROP for all calculations.</long_desc>
<min>-1.0</min> <min>-1.0</min>
<max>0.2</max> <max>0.2</max>
<unit>Ohms</unit> <unit>Ohm</unit>
<reboot_required>true</reboot_required> <reboot_required>true</reboot_required>
</parameter> </parameter>
<parameter default="0" name="BAT_SOURCE" type="INT32"> <parameter default="0" name="BAT_SOURCE" type="INT32">
...@@ -962,7 +960,7 @@ Note: ekf2 will limit the delta velocity bias estimate magnitude to be less than ...@@ -962,7 +960,7 @@ Note: ekf2 will limit the delta velocity bias estimate magnitude to be less than
<short_desc>Maximum accelerometer inconsistency between IMU units that will allow arming</short_desc> <short_desc>Maximum accelerometer inconsistency between IMU units that will allow arming</short_desc>
<min>0.1</min> <min>0.1</min>
<max>1.0</max> <max>1.0</max>
<unit>m/s/s</unit> <unit>m/s^2</unit>
<decimal>2</decimal> <decimal>2</decimal>
<increment>0.05</increment> <increment>0.05</increment>
</parameter> </parameter>
...@@ -1298,7 +1296,7 @@ See COM_OBL_ACT and COM_OBL_RC_ACT to configure action</short_desc> ...@@ -1298,7 +1296,7 @@ See COM_OBL_ACT and COM_OBL_RC_ACT to configure action</short_desc>
<long_desc>This sets number of seconds that the position checks need to be failed before the failsafe will activate. The default value has been optimised for rotary wing applications. For fixed wing applications, a larger value between 5 and 10 should be used.</long_desc> <long_desc>This sets number of seconds that the position checks need to be failed before the failsafe will activate. The default value has been optimised for rotary wing applications. For fixed wing applications, a larger value between 5 and 10 should be used.</long_desc>
<min>1</min> <min>1</min>
<max>100</max> <max>100</max>
<unit>sec</unit> <unit>s</unit>
<reboot_required>true</reboot_required> <reboot_required>true</reboot_required>
</parameter> </parameter>
<parameter default="5" name="COM_POS_FS_EPH" type="FLOAT"> <parameter default="5" name="COM_POS_FS_EPH" type="FLOAT">
...@@ -1321,7 +1319,7 @@ See COM_OBL_ACT and COM_OBL_RC_ACT to configure action</short_desc> ...@@ -1321,7 +1319,7 @@ See COM_OBL_ACT and COM_OBL_RC_ACT to configure action</short_desc>
<long_desc>The probation delay is the number of seconds that the EKF innovation checks need to pass for the position to be declared good after it has been declared bad. The probation delay will be reset to this parameter value when takeoff is detected. After takeoff, if position checks are passing, the probation delay will reduce by one second for every lapsed second of valid position down to a minimum of 1 second. If position checks are failing, the probation delay will increase by COM_POS_FS_GAIN seconds for every lapsed second up to a maximum of 100 seconds. The default value has been optimised for rotary wing applications. For fixed wing applications, a value of 1 should be used.</long_desc> <long_desc>The probation delay is the number of seconds that the EKF innovation checks need to pass for the position to be declared good after it has been declared bad. The probation delay will be reset to this parameter value when takeoff is detected. After takeoff, if position checks are passing, the probation delay will reduce by one second for every lapsed second of valid position down to a minimum of 1 second. If position checks are failing, the probation delay will increase by COM_POS_FS_GAIN seconds for every lapsed second up to a maximum of 100 seconds. The default value has been optimised for rotary wing applications. For fixed wing applications, a value of 1 should be used.</long_desc>
<min>1</min> <min>1</min>
<max>100</max> <max>100</max>
<unit>sec</unit> <unit>s</unit>
<reboot_required>true</reboot_required> <reboot_required>true</reboot_required>
</parameter> </parameter>
<parameter default="1" name="COM_POWER_COUNT" type="INT32"> <parameter default="1" name="COM_POWER_COUNT" type="INT32">
...@@ -1448,14 +1446,14 @@ See COM_OBL_ACT and COM_OBL_RC_ACT to configure action</short_desc> ...@@ -1448,14 +1446,14 @@ See COM_OBL_ACT and COM_OBL_RC_ACT to configure action</short_desc>
<long_desc>Latitude of airfield home waypoint</long_desc> <long_desc>Latitude of airfield home waypoint</long_desc>
<min>-900000000</min> <min>-900000000</min>
<max>900000000</max> <max>900000000</max>
<unit>deg * 1e7</unit> <unit>deg*1e7</unit>
</parameter> </parameter>
<parameter default="1518423250" name="NAV_AH_LON" type="INT32"> <parameter default="1518423250" name="NAV_AH_LON" type="INT32">
<short_desc>Airfield home Lon</short_desc> <short_desc>Airfield home Lon</short_desc>
<long_desc>Longitude of airfield home waypoint</long_desc> <long_desc>Longitude of airfield home waypoint</long_desc>
<min>-1800000000</min> <min>-1800000000</min>
<max>1800000000</max> <max>1800000000</max>
<unit>deg * 1e7</unit> <unit>deg*1e7</unit>
</parameter> </parameter>
</group> </group>
<group name="EKF2"> <group name="EKF2">
...@@ -1463,7 +1461,7 @@ See COM_OBL_ACT and COM_OBL_RC_ACT to configure action</short_desc> ...@@ -1463,7 +1461,7 @@ See COM_OBL_ACT and COM_OBL_RC_ACT to configure action</short_desc>
<short_desc>1-sigma IMU accelerometer switch-on bias</short_desc> <short_desc>1-sigma IMU accelerometer switch-on bias</short_desc>
<min>0.0</min> <min>0.0</min>
<max>0.5</max> <max>0.5</max>
<unit>m/s/s</unit> <unit>m/s^2</unit>
<decimal>2</decimal> <decimal>2</decimal>
<reboot_required>true</reboot_required> <reboot_required>true</reboot_required>
</parameter> </parameter>
...@@ -1473,7 +1471,7 @@ If the magnitude of the IMU accelerometer vector exceeds this value, the EKF del ...@@ -1473,7 +1471,7 @@ If the magnitude of the IMU accelerometer vector exceeds this value, the EKF del
This reduces the adverse effect of high manoeuvre accelerations and IMU nonlinerity and scale factor errors on the delta velocity bias estimates</short_desc> This reduces the adverse effect of high manoeuvre accelerations and IMU nonlinerity and scale factor errors on the delta velocity bias estimates</short_desc>
<min>20.0</min> <min>20.0</min>
<max>200.0</max> <max>200.0</max>
<unit>m/s/s</unit> <unit>m/s^2</unit>
<decimal>1</decimal> <decimal>1</decimal>
</parameter> </parameter>
<parameter default="3.0" name="EKF2_ABL_GYRLIM" type="FLOAT"> <parameter default="3.0" name="EKF2_ABL_GYRLIM" type="FLOAT">
...@@ -1489,7 +1487,7 @@ This reduces the adverse effect of rapid rotation rates and associated errors on ...@@ -1489,7 +1487,7 @@ This reduces the adverse effect of rapid rotation rates and associated errors on
<short_desc>Accelerometer bias learning limit. The ekf delta velocity bias states will be limited to within a range equivalent to +- of this value</short_desc> <short_desc>Accelerometer bias learning limit. The ekf delta velocity bias states will be limited to within a range equivalent to +- of this value</short_desc>
<min>0.0</min> <min>0.0</min>
<max>0.8</max> <max>0.8</max>
<unit>m/s/s</unit> <unit>m/s^2</unit>
<decimal>2</decimal> <decimal>2</decimal>
</parameter> </parameter>
<parameter default="0.5" name="EKF2_ABL_TAU" type="FLOAT"> <parameter default="0.5" name="EKF2_ABL_TAU" type="FLOAT">
...@@ -1505,14 +1503,14 @@ This parameter controls the time constant of the decay</short_desc> ...@@ -1505,14 +1503,14 @@ This parameter controls the time constant of the decay</short_desc>
<short_desc>Process noise for IMU accelerometer bias prediction</short_desc> <short_desc>Process noise for IMU accelerometer bias prediction</short_desc>
<min>0.0</min> <min>0.0</min>
<max>0.01</max> <max>0.01</max>
<unit>m/s**3</unit> <unit>m/s^3</unit>
<decimal>6</decimal> <decimal>6</decimal>
</parameter> </parameter>
<parameter default="3.5e-1" name="EKF2_ACC_NOISE" type="FLOAT"> <parameter default="3.5e-1" name="EKF2_ACC_NOISE" type="FLOAT">
<short_desc>Accelerometer noise for covariance prediction</short_desc> <short_desc>Accelerometer noise for covariance prediction</short_desc>
<min>0.01</min> <min>0.01</min>
<max>1.0</max> <max>1.0</max>
<unit>m/s/s</unit> <unit>m/s^2</unit>
<decimal>2</decimal> <decimal>2</decimal>
</parameter> </parameter>
<parameter default="1" name="EKF2_AID_MASK" type="INT32"> <parameter default="1" name="EKF2_AID_MASK" type="INT32">
...@@ -1600,7 +1598,7 @@ Use EKF2_FUSE_BETA to activate sideslip fusion</short_desc> ...@@ -1600,7 +1598,7 @@ Use EKF2_FUSE_BETA to activate sideslip fusion</short_desc>
This should be adjusted to minimise variance of the X-axis drag specific force innovation sequence</short_desc> This should be adjusted to minimise variance of the X-axis drag specific force innovation sequence</short_desc>
<min>1.0</min> <min>1.0</min>
<max>100.0</max> <max>100.0</max>
<unit>kg/m**2</unit> <unit>kg/m^2</unit>
<decimal>1</decimal> <decimal>1</decimal>
</parameter> </parameter>
<parameter default="25.0" name="EKF2_BCOEF_Y" type="FLOAT"> <parameter default="25.0" name="EKF2_BCOEF_Y" type="FLOAT">
...@@ -1608,7 +1606,7 @@ This should be adjusted to minimise variance of the X-axis drag specific force i ...@@ -1608,7 +1606,7 @@ This should be adjusted to minimise variance of the X-axis drag specific force i
This should be adjusted to minimise variance of the Y-axis drag specific force innovation sequence</short_desc> This should be adjusted to minimise variance of the Y-axis drag specific force innovation sequence</short_desc>
<min>1.0</min> <min>1.0</min>
<max>100.0</max> <max>100.0</max>
<unit>kg/m**2</unit> <unit>kg/m^2</unit>
<decimal>1</decimal> <decimal>1</decimal>
</parameter> </parameter>
<parameter default="5.0" name="EKF2_BETA_GATE" type="FLOAT"> <parameter default="5.0" name="EKF2_BETA_GATE" type="FLOAT">
...@@ -1642,7 +1640,7 @@ This should be adjusted to minimise variance of the Y-axis drag specific force i ...@@ -1642,7 +1640,7 @@ This should be adjusted to minimise variance of the Y-axis drag specific force i
Increasing it makes the multi-rotor wind estimates adjust more slowly</short_desc> Increasing it makes the multi-rotor wind estimates adjust more slowly</short_desc>
<min>0.5</min> <min>0.5</min>
<max>10.0</max> <max>10.0</max>
<unit>(m/sec**2)**2</unit> <unit>(m/s^2)^2</unit>
<decimal>2</decimal> <decimal>2</decimal>
</parameter> </parameter>
<parameter default="1.4" name="EKF2_EAS_NOISE" type="FLOAT"> <parameter default="1.4" name="EKF2_EAS_NOISE" type="FLOAT">
...@@ -1719,7 +1717,7 @@ Sets the number of standard deviations used by the innovation consistency test</ ...@@ -1719,7 +1717,7 @@ Sets the number of standard deviations used by the innovation consistency test</
<short_desc>1-sigma IMU gyro switch-on bias</short_desc> <short_desc>1-sigma IMU gyro switch-on bias</short_desc>
<min>0.0</min> <min>0.0</min>
<max>0.2</max> <max>0.2</max>
<unit>rad/sec</unit> <unit>rad/s</unit>
<decimal>2</decimal> <decimal>2</decimal>
<reboot_required>true</reboot_required> <reboot_required>true</reboot_required>
</parameter> </parameter>
...@@ -1728,7 +1726,7 @@ Sets the number of standard deviations used by the innovation consistency test</ ...@@ -1728,7 +1726,7 @@ Sets the number of standard deviations used by the innovation consistency test</
<long_desc>Sets the value of deadzone applied to negative baro innovations. Deadzone is enabled when EKF2_GND_EFF_DZ &gt; 0.</long_desc> <long_desc>Sets the value of deadzone applied to negative baro innovations. Deadzone is enabled when EKF2_GND_EFF_DZ &gt; 0.</long_desc>
<min>0.0</min> <min>0.0</min>
<max>10.0</max> <max>10.0</max>
<unit>M</unit> <unit>m</unit>
<decimal>1</decimal> <decimal>1</decimal>
</parameter> </parameter>
<parameter default="0.5" name="EKF2_GND_MAX_HGT" type="FLOAT"> <parameter default="0.5" name="EKF2_GND_MAX_HGT" type="FLOAT">
...@@ -1736,7 +1734,7 @@ Sets the number of standard deviations used by the innovation consistency test</ ...@@ -1736,7 +1734,7 @@ Sets the number of standard deviations used by the innovation consistency test</
<long_desc>Sets the maximum distance to the ground level where negative baro innovations are expected.</long_desc> <long_desc>Sets the maximum distance to the ground level where negative baro innovations are expected.</long_desc>
<min>0.0</min> <min>0.0</min>
<max>5.0</max> <max>5.0</max>
<unit>M</unit> <unit>m</unit>
<decimal>1</decimal> <decimal>1</decimal>
</parameter> </parameter>
<parameter default="245" name="EKF2_GPS_CHECK" type="INT32"> <parameter default="245" name="EKF2_GPS_CHECK" type="INT32">
...@@ -1838,7 +1836,7 @@ If no airspeed measurements are avalable, the EKF-GSF AHRS calculation will assu ...@@ -1838,7 +1836,7 @@ If no airspeed measurements are avalable, the EKF-GSF AHRS calculation will assu
<short_desc>Process noise for IMU rate gyro bias prediction</short_desc> <short_desc>Process noise for IMU rate gyro bias prediction</short_desc>
<min>0.0</min> <min>0.0</min>
<max>0.01</max> <max>0.01</max>
<unit>rad/s**2</unit> <unit>rad/s^2</unit>
<decimal>6</decimal> <decimal>6</decimal>
</parameter> </parameter>
<parameter default="1.5e-2" name="EKF2_GYR_NOISE" type="FLOAT"> <parameter default="1.5e-2" name="EKF2_GYR_NOISE" type="FLOAT">
...@@ -1904,7 +1902,7 @@ If no airspeed measurements are avalable, the EKF-GSF AHRS calculation will assu ...@@ -1904,7 +1902,7 @@ If no airspeed measurements are avalable, the EKF-GSF AHRS calculation will assu
This is the amount of X-axis magnetometer bias learned by the EKF and saved from the last flight. It must be set to zero if the ground based magnetometer calibration is repeated</short_desc> This is the amount of X-axis magnetometer bias learned by the EKF and saved from the last flight. It must be set to zero if the ground based magnetometer calibration is repeated</short_desc>
<min>-0.5</min> <min>-0.5</min>
<max>0.5</max> <max>0.5</max>
<unit>mGauss</unit> <unit>mgauss</unit>
<decimal>3</decimal> <decimal>3</decimal>
<reboot_required>true</reboot_required> <reboot_required>true</reboot_required>
</parameter> </parameter>
...@@ -1913,7 +1911,7 @@ This is the amount of X-axis magnetometer bias learned by the EKF and saved from ...@@ -1913,7 +1911,7 @@ This is the amount of X-axis magnetometer bias learned by the EKF and saved from
This is the amount of Y-axis magnetometer bias learned by the EKF and saved from the last flight. It must be set to zero if the ground based magnetometer calibration is repeated</short_desc> This is the amount of Y-axis magnetometer bias learned by the EKF and saved from the last flight. It must be set to zero if the ground based magnetometer calibration is repeated</short_desc>
<min>-0.5</min> <min>-0.5</min>
<max>0.5</max> <max>0.5</max>
<unit>mGauss</unit> <unit>mgauss</unit>
<decimal>3</decimal> <decimal>3</decimal>
<reboot_required>true</reboot_required> <reboot_required>true</reboot_required>
</parameter> </parameter>
...@@ -1922,7 +1920,7 @@ This is the amount of Y-axis magnetometer bias learned by the EKF and saved from ...@@ -1922,7 +1920,7 @@ This is the amount of Y-axis magnetometer bias learned by the EKF and saved from
This is the amount of Z-axis magnetometer bias learned by the EKF and saved from the last flight. It must be set to zero if the ground based magnetometer calibration is repeated</short_desc> This is the amount of Z-axis magnetometer bias learned by the EKF and saved from the last flight. It must be set to zero if the ground based magnetometer calibration is repeated</short_desc>
<min>-0.5</min> <min>-0.5</min>
<max>0.5</max> <max>0.5</max>
<unit>mGauss</unit> <unit>mgauss</unit>
<decimal>3</decimal> <decimal>3</decimal>
<reboot_required>true</reboot_required> <reboot_required>true</reboot_required>
</parameter> </parameter>
...@@ -1936,7 +1934,7 @@ Smaller values make the saved mag bias learn slower from flight to flight. Large ...@@ -1936,7 +1934,7 @@ Smaller values make the saved mag bias learn slower from flight to flight. Large
<parameter default="2.5E-7" name="EKF2_MAGB_VREF" type="FLOAT"> <parameter default="2.5E-7" name="EKF2_MAGB_VREF" type="FLOAT">
<short_desc>State variance assumed for magnetometer bias storage. <short_desc>State variance assumed for magnetometer bias storage.
This is a reference variance used to calculate the fraction of learned magnetometer bias that will be used to update the stored value. Smaller values will make the stored bias data adjust more slowly from flight to flight. Larger values will make it adjust faster</short_desc> This is a reference variance used to calculate the fraction of learned magnetometer bias that will be used to update the stored value. Smaller values will make the stored bias data adjust more slowly from flight to flight. Larger values will make it adjust faster</short_desc>
<unit>mGauss**2</unit> <unit>mgauss^2</unit>
<decimal>8</decimal> <decimal>8</decimal>
<reboot_required>true</reboot_required> <reboot_required>true</reboot_required>
</parameter> </parameter>
...@@ -1945,14 +1943,14 @@ This is a reference variance used to calculate the fraction of learned magnetome ...@@ -1945,14 +1943,14 @@ This is a reference variance used to calculate the fraction of learned magnetome
This parameter is used when the magnetometer fusion method is set automatically (EKF2_MAG_TYPE = 0). If the filtered horizontal acceleration is greater than this parameter value, then the EKF will use 3-axis magnetomer fusion</short_desc> This parameter is used when the magnetometer fusion method is set automatically (EKF2_MAG_TYPE = 0). If the filtered horizontal acceleration is greater than this parameter value, then the EKF will use 3-axis magnetomer fusion</short_desc>
<min>0.0</min> <min>0.0</min>
<max>5.0</max> <max>5.0</max>
<unit>m/s**2</unit> <unit>m/s^2</unit>
<decimal>2</decimal> <decimal>2</decimal>
</parameter> </parameter>
<parameter default="1.0e-4" name="EKF2_MAG_B_NOISE" type="FLOAT"> <parameter default="1.0e-4" name="EKF2_MAG_B_NOISE" type="FLOAT">
<short_desc>Process noise for body magnetic field prediction</short_desc> <short_desc>Process noise for body magnetic field prediction</short_desc>
<min>0.0</min> <min>0.0</min>
<max>0.1</max> <max>0.1</max>
<unit>Gauss/s</unit> <unit>gauss/s</unit>
<decimal>6</decimal> <decimal>6</decimal>
</parameter> </parameter>
<parameter default="0" name="EKF2_MAG_CHECK" type="INT32"> <parameter default="0" name="EKF2_MAG_CHECK" type="INT32">
...@@ -1976,7 +1974,7 @@ This parameter is used when the magnetometer fusion method is set automatically ...@@ -1976,7 +1974,7 @@ This parameter is used when the magnetometer fusion method is set automatically
<short_desc>Process noise for earth magnetic field prediction</short_desc> <short_desc>Process noise for earth magnetic field prediction</short_desc>
<min>0.0</min> <min>0.0</min>
<max>0.1</max> <max>0.1</max>
<unit>Gauss/s</unit> <unit>gauss/s</unit>
<decimal>6</decimal> <decimal>6</decimal>
</parameter> </parameter>
<parameter default="3.0" name="EKF2_MAG_GATE" type="FLOAT"> <parameter default="3.0" name="EKF2_MAG_GATE" type="FLOAT">
...@@ -1990,7 +1988,7 @@ This parameter is used when the magnetometer fusion method is set automatically ...@@ -1990,7 +1988,7 @@ This parameter is used when the magnetometer fusion method is set automatically
<short_desc>Measurement noise for magnetometer 3-axis fusion</short_desc> <short_desc>Measurement noise for magnetometer 3-axis fusion</short_desc>
<min>0.001</min> <min>0.001</min>
<max>1.0</max> <max>1.0</max>
<unit>Gauss</unit> <unit>gauss</unit>
<decimal>3</decimal> <decimal>3</decimal>
</parameter> </parameter>
<parameter default="0" name="EKF2_MAG_TYPE" type="INT32"> <parameter default="0" name="EKF2_MAG_TYPE" type="INT32">
...@@ -2047,7 +2045,7 @@ Baro and Magnetometer data will be averaged before downsampling, other data will ...@@ -2047,7 +2045,7 @@ Baro and Magnetometer data will be averaged before downsampling, other data will
<short_desc>Maximum lapsed time from last fusion of measurements that constrain velocity drift before the EKF will report the horizontal nav solution as invalid</short_desc> <short_desc>Maximum lapsed time from last fusion of measurements that constrain velocity drift before the EKF will report the horizontal nav solution as invalid</short_desc>
<min>500000</min> <min>500000</min>
<max>10000000</max> <max>10000000</max>
<unit>uSec</unit> <unit>us</unit>
</parameter> </parameter>
<parameter default="5" name="EKF2_OF_DELAY" type="FLOAT"> <parameter default="5" name="EKF2_OF_DELAY" type="FLOAT">
<short_desc>Optical flow measurement delay relative to IMU measurements <short_desc>Optical flow measurement delay relative to IMU measurements
...@@ -2316,7 +2314,7 @@ This is the ratio of static pressure error to dynamic pressure generated by a wi ...@@ -2316,7 +2314,7 @@ This is the ratio of static pressure error to dynamic pressure generated by a wi
<short_desc>Process noise for wind velocity prediction</short_desc> <short_desc>Process noise for wind velocity prediction</short_desc>
<min>0.0</min> <min>0.0</min>
<max>1.0</max> <max>1.0</max>
<unit>m/s/s</unit> <unit>m/s^2</unit>
<decimal>3</decimal> <decimal>3</decimal>
</parameter> </parameter>
</group> </group>
...@@ -2338,21 +2336,21 @@ This is the ratio of static pressure error to dynamic pressure generated by a wi ...@@ -2338,21 +2336,21 @@ This is the ratio of static pressure error to dynamic pressure generated by a wi
<long_desc>This is the rate the controller is trying to achieve if the user applies full roll stick input in acro mode.</long_desc> <long_desc>This is the rate the controller is trying to achieve if the user applies full roll stick input in acro mode.</long_desc>
<min>45</min> <min>45</min>
<max>720</max> <max>720</max>
<unit>degrees</unit> <unit>deg</unit>
</parameter> </parameter>
<parameter default="90" name="FW_ACRO_Y_MAX" type="FLOAT"> <parameter default="90" name="FW_ACRO_Y_MAX" type="FLOAT">
<short_desc>Acro body y max rate</short_desc> <short_desc>Acro body y max rate</short_desc>
<long_desc>This is the body y rate the controller is trying to achieve if the user applies full pitch stick input in acro mode.</long_desc> <long_desc>This is the body y rate the controller is trying to achieve if the user applies full pitch stick input in acro mode.</long_desc>
<min>45</min> <min>45</min>
<max>720</max> <max>720</max>
<unit>degrees</unit> <unit>deg</unit>
</parameter> </parameter>
<parameter default="45" name="FW_ACRO_Z_MAX" type="FLOAT"> <parameter default="45" name="FW_ACRO_Z_MAX" type="FLOAT">
<short_desc>Acro body z max rate</short_desc> <short_desc>Acro body z max rate</short_desc>
<long_desc>This is the body z rate the controller is trying to achieve if the user applies full yaw stick input in acro mode.</long_desc> <long_desc>This is the body z rate the controller is trying to achieve if the user applies full yaw stick input in acro mode.</long_desc>
<min>10</min> <min>10</min>
<max>180</max> <max>180</max>
<unit>degrees</unit> <unit>deg</unit>
</parameter> </parameter>
<parameter default="0" name="FW_ARSP_MODE" type="INT32"> <parameter default="0" name="FW_ARSP_MODE" type="INT32">
<short_desc>Airspeed mode</short_desc> <short_desc>Airspeed mode</short_desc>
...@@ -2965,7 +2963,7 @@ Set to 0 to disable heading hold</short_desc> ...@@ -2965,7 +2963,7 @@ Set to 0 to disable heading hold</short_desc>
<short_desc>Catapult accelerometer threshold</short_desc> <short_desc>Catapult accelerometer threshold</short_desc>
<long_desc>LAUN_CAT_A for LAUN_CAT_T serves as threshold to trigger launch detection.</long_desc> <long_desc>LAUN_CAT_A for LAUN_CAT_T serves as threshold to trigger launch detection.</long_desc>
<min>0</min> <min>0</min>
<unit>m/s/s</unit> <unit>m/s^2</unit>
<decimal>1</decimal> <decimal>1</decimal>
<increment>0.5</increment> <increment>0.5</increment>
</parameter> </parameter>
...@@ -3154,7 +3152,7 @@ Set to 0 to disable heading hold</short_desc> ...@@ -3154,7 +3152,7 @@ Set to 0 to disable heading hold</short_desc>
<long_desc>This is the maximum vertical acceleration (in m/s/s) either up or down that the controller will use to correct speed or height errors. The default value of 7 m/s/s (equivalent to +- 0.7 g) allows for reasonably aggressive pitch changes if required to recover from under-speed conditions.</long_desc> <long_desc>This is the maximum vertical acceleration (in m/s/s) either up or down that the controller will use to correct speed or height errors. The default value of 7 m/s/s (equivalent to +- 0.7 g) allows for reasonably aggressive pitch changes if required to recover from under-speed conditions.</long_desc>
<min>1.0</min> <min>1.0</min>
<max>10.0</max> <max>10.0</max>
<unit>m/s/s</unit> <unit>m/s^2</unit>
<decimal>1</decimal> <decimal>1</decimal>
<increment>0.5</increment> <increment>0.5</increment>
</parameter> </parameter>
...@@ -3175,7 +3173,7 @@ automatic trigger system (ATS)</short_desc> ...@@ -3175,7 +3173,7 @@ automatic trigger system (ATS)</short_desc>
<parameter default="1900" name="FD_EXT_ATS_TRIG" type="INT32"> <parameter default="1900" name="FD_EXT_ATS_TRIG" type="INT32">
<short_desc>The PWM threshold from external automatic trigger system for engaging failsafe</short_desc> <short_desc>The PWM threshold from external automatic trigger system for engaging failsafe</short_desc>
<long_desc>External ATS is required by ASTM F3322-18.</long_desc> <long_desc>External ATS is required by ASTM F3322-18.</long_desc>
<unit>microseconds</unit> <unit>us</unit>
<decimal>2</decimal> <decimal>2</decimal>
</parameter> </parameter>
<parameter default="60" name="FD_FAIL_P" type="INT32"> <parameter default="60" name="FD_FAIL_P" type="INT32">
...@@ -3183,7 +3181,7 @@ automatic trigger system (ATS)</short_desc> ...@@ -3183,7 +3181,7 @@ automatic trigger system (ATS)</short_desc>
<long_desc>Maximum pitch angle before FailureDetector triggers the attitude_failure flag. The flag triggers flight termination (if @CBRK_FLIGHTTERM = 0), which sets outputs to their failsafe values. On takeoff the flag triggers lockdown (irrespective of @CBRK_FLIGHTTERM), which disarms motors but does not set outputs to failsafe values. Setting this parameter to 0 disables the check</long_desc> <long_desc>Maximum pitch angle before FailureDetector triggers the attitude_failure flag. The flag triggers flight termination (if @CBRK_FLIGHTTERM = 0), which sets outputs to their failsafe values. On takeoff the flag triggers lockdown (irrespective of @CBRK_FLIGHTTERM), which disarms motors but does not set outputs to failsafe values. Setting this parameter to 0 disables the check</long_desc>
<min>60</min> <min>60</min>
<max>180</max> <max>180</max>
<unit>degrees</unit> <unit>deg</unit>
</parameter> </parameter>
<parameter default="0.3" name="FD_FAIL_P_TTRI" type="FLOAT"> <parameter default="0.3" name="FD_FAIL_P_TTRI" type="FLOAT">
<short_desc>Pitch failure trigger time</short_desc> <short_desc>Pitch failure trigger time</short_desc>
...@@ -3198,7 +3196,7 @@ automatic trigger system (ATS)</short_desc> ...@@ -3198,7 +3196,7 @@ automatic trigger system (ATS)</short_desc>
<long_desc>Maximum roll angle before FailureDetector triggers the attitude_failure flag. The flag triggers flight termination (if @CBRK_FLIGHTTERM = 0), which sets outputs to their failsafe values. On takeoff the flag triggers lockdown (irrespective of @CBRK_FLIGHTTERM), which disarms motors but does not set outputs to failsafe values. Setting this parameter to 0 disables the check</long_desc> <long_desc>Maximum roll angle before FailureDetector triggers the attitude_failure flag. The flag triggers flight termination (if @CBRK_FLIGHTTERM = 0), which sets outputs to their failsafe values. On takeoff the flag triggers lockdown (irrespective of @CBRK_FLIGHTTERM), which disarms motors but does not set outputs to failsafe values. Setting this parameter to 0 disables the check</long_desc>
<min>60</min> <min>60</min>
<max>180</max> <max>180</max>
<unit>degrees</unit> <unit>deg</unit>
</parameter> </parameter>
<parameter default="0.3" name="FD_FAIL_R_TTRI" type="FLOAT"> <parameter default="0.3" name="FD_FAIL_R_TTRI" type="FLOAT">
<short_desc>Roll failure trigger time</short_desc> <short_desc>Roll failure trigger time</short_desc>
...@@ -3214,14 +3212,13 @@ automatic trigger system (ATS)</short_desc> ...@@ -3214,14 +3212,13 @@ automatic trigger system (ATS)</short_desc>
<short_desc>Distance to follow target from</short_desc> <short_desc>Distance to follow target from</short_desc>
<long_desc>The distance in meters to follow the target at</long_desc> <long_desc>The distance in meters to follow the target at</long_desc>
<min>1.0</min> <min>1.0</min>
<unit>meters</unit> <unit>m</unit>
</parameter> </parameter>
<parameter default="1" name="NAV_FT_FS" type="INT32"> <parameter default="1" name="NAV_FT_FS" type="INT32">
<short_desc>Side to follow target from</short_desc> <short_desc>Side to follow target from</short_desc>
<long_desc>The side to follow the target from (front right = 0, behind = 1, front = 2, front left = 3)</long_desc> <long_desc>The side to follow the target from (front right = 0, behind = 1, front = 2, front left = 3)</long_desc>
<min>0</min> <min>0</min>
<max>3</max> <max>3</max>
<unit>n/a</unit>
</parameter> </parameter>
<parameter default="0.5" name="NAV_FT_RS" type="FLOAT"> <parameter default="0.5" name="NAV_FT_RS" type="FLOAT">
<short_desc>Dynamic filtering algorithm responsiveness to target movement <short_desc>Dynamic filtering algorithm responsiveness to target movement
...@@ -3229,14 +3226,13 @@ lower numbers increase the responsiveness to changing long lat ...@@ -3229,14 +3226,13 @@ lower numbers increase the responsiveness to changing long lat
but also ignore less noise</short_desc> but also ignore less noise</short_desc>
<min>0.0</min> <min>0.0</min>
<max>1.0</max> <max>1.0</max>
<unit>n/a</unit>
<decimal>2</decimal> <decimal>2</decimal>
</parameter> </parameter>
<parameter default="8.0" name="NAV_MIN_FT_HT" type="FLOAT"> <parameter default="8.0" name="NAV_MIN_FT_HT" type="FLOAT">
<short_desc>Minimum follow target altitude</short_desc> <short_desc>Minimum follow target altitude</short_desc>
<long_desc>The minimum height in meters relative to home for following a target</long_desc> <long_desc>The minimum height in meters relative to home for following a target</long_desc>
<min>8.0</min> <min>8.0</min>
<unit>meters</unit> <unit>m</unit>
</parameter> </parameter>
</group> </group>
<group name="GPS"> <group name="GPS">
...@@ -3658,14 +3654,14 @@ by initializing the estimator to the LPE_LAT/LON parameters when global informat ...@@ -3658,14 +3654,14 @@ by initializing the estimator to the LPE_LAT/LON parameters when global informat
<short_desc>Optical flow rotation (roll/pitch) noise gain</short_desc> <short_desc>Optical flow rotation (roll/pitch) noise gain</short_desc>
<min>0.1</min> <min>0.1</min>
<max>10.0</max> <max>10.0</max>
<unit>m/s / (rad)</unit> <unit>m/s/rad</unit>
<decimal>3</decimal> <decimal>3</decimal>
</parameter> </parameter>
<parameter default="7.0" name="LPE_FLW_RR" type="FLOAT"> <parameter default="7.0" name="LPE_FLW_RR" type="FLOAT">
<short_desc>Optical flow angular velocity noise gain</short_desc> <short_desc>Optical flow angular velocity noise gain</short_desc>
<min>0.0</min> <min>0.0</min>
<max>10.0</max> <max>10.0</max>
<unit>m/s / (rad/s)</unit> <unit>m/rad</unit>
<decimal>3</decimal> <decimal>3</decimal>
</parameter> </parameter>
<parameter default="1.3" name="LPE_FLW_SCALE" type="FLOAT"> <parameter default="1.3" name="LPE_FLW_SCALE" type="FLOAT">
...@@ -3695,7 +3691,7 @@ by initializing the estimator to the LPE_LAT/LON parameters when global informat ...@@ -3695,7 +3691,7 @@ by initializing the estimator to the LPE_LAT/LON parameters when global informat
<short_desc>GPS delay compensaton</short_desc> <short_desc>GPS delay compensaton</short_desc>
<min>0</min> <min>0</min>
<max>0.4</max> <max>0.4</max>
<unit>sec</unit> <unit>s</unit>
<decimal>2</decimal> <decimal>2</decimal>
</parameter> </parameter>
<parameter default="0.25" name="LPE_GPS_VXY" type="FLOAT"> <parameter default="0.25" name="LPE_GPS_VXY" type="FLOAT">
...@@ -3780,7 +3776,7 @@ EPV used if greater than this value</short_desc> ...@@ -3780,7 +3776,7 @@ EPV used if greater than this value</short_desc>
<short_desc>Accel bias propagation noise density</short_desc> <short_desc>Accel bias propagation noise density</short_desc>
<min>0</min> <min>0</min>
<max>1</max> <max>1</max>
<unit>(m/s^2)/s/sqrt(Hz)</unit> <unit>m/s^3/sqrt(Hz)</unit>
<decimal>8</decimal> <decimal>8</decimal>
</parameter> </parameter>
<parameter default="0.1" name="LPE_PN_P" type="FLOAT"> <parameter default="0.1" name="LPE_PN_P" type="FLOAT">
...@@ -3795,7 +3791,7 @@ EPV used if greater than this value</short_desc> ...@@ -3795,7 +3791,7 @@ EPV used if greater than this value</short_desc>
<short_desc>Terrain random walk noise density, hilly/outdoor (0.1), flat/Indoor (0.001)</short_desc> <short_desc>Terrain random walk noise density, hilly/outdoor (0.1), flat/Indoor (0.001)</short_desc>
<min>0</min> <min>0</min>
<max>1</max> <max>1</max>
<unit>(m/s)/(sqrt(hz))</unit> <unit>m/s/sqrt(Hz)</unit>
<decimal>3</decimal> <decimal>3</decimal>
</parameter> </parameter>
<parameter default="0.1" name="LPE_PN_V" type="FLOAT"> <parameter default="0.1" name="LPE_PN_V" type="FLOAT">
...@@ -3803,7 +3799,7 @@ EPV used if greater than this value</short_desc> ...@@ -3803,7 +3799,7 @@ EPV used if greater than this value</short_desc>
<long_desc>Increase to trust measurements more. Decrease to trust model more.</long_desc> <long_desc>Increase to trust measurements more. Decrease to trust model more.</long_desc>
<min>0</min> <min>0</min>
<max>1</max> <max>1</max>
<unit>(m/s)/s/sqrt(Hz)</unit> <unit>m/s^2/sqrt(Hz)</unit>
<decimal>8</decimal> <decimal>8</decimal>
</parameter> </parameter>
<parameter default="0.00" name="LPE_SNR_OFF_Z" type="FLOAT"> <parameter default="0.00" name="LPE_SNR_OFF_Z" type="FLOAT">
...@@ -3840,7 +3836,7 @@ Used to calculate increased terrain random walk nosie due to movement</short_des ...@@ -3840,7 +3836,7 @@ Used to calculate increased terrain random walk nosie due to movement</short_des
<long_desc>Set to zero to enable automatic compensation from measurement timestamps</long_desc> <long_desc>Set to zero to enable automatic compensation from measurement timestamps</long_desc>
<min>0</min> <min>0</min>
<max>0.1</max> <max>0.1</max>
<unit>sec</unit> <unit>s</unit>
<decimal>2</decimal> <decimal>2</decimal>
</parameter> </parameter>
<parameter default="0.1" name="LPE_VIS_XY" type="FLOAT"> <parameter default="0.1" name="LPE_VIS_XY" type="FLOAT">
...@@ -4492,7 +4488,7 @@ if required by the gimbal (only in AUX output mode)</short_desc> ...@@ -4492,7 +4488,7 @@ if required by the gimbal (only in AUX output mode)</short_desc>
<long_desc>Pitch proportional gain, i.e. desired angular speed in rad/s for error 1 rad.</long_desc> <long_desc>Pitch proportional gain, i.e. desired angular speed in rad/s for error 1 rad.</long_desc>
<min>0.0</min> <min>0.0</min>
<max>12</max> <max>12</max>
<unit>1/s</unit> <unit>Hz</unit>
<decimal>2</decimal> <decimal>2</decimal>
<increment>0.1</increment> <increment>0.1</increment>
</parameter> </parameter>
...@@ -4518,7 +4514,7 @@ if required by the gimbal (only in AUX output mode)</short_desc> ...@@ -4518,7 +4514,7 @@ if required by the gimbal (only in AUX output mode)</short_desc>
<long_desc>Roll proportional gain, i.e. desired angular speed in rad/s for error 1 rad.</long_desc> <long_desc>Roll proportional gain, i.e. desired angular speed in rad/s for error 1 rad.</long_desc>
<min>0.0</min> <min>0.0</min>
<max>12</max> <max>12</max>
<unit>1/s</unit> <unit>Hz</unit>
<decimal>2</decimal> <decimal>2</decimal>
<increment>0.1</increment> <increment>0.1</increment>
</parameter> </parameter>
...@@ -4535,7 +4531,7 @@ if required by the gimbal (only in AUX output mode)</short_desc> ...@@ -4535,7 +4531,7 @@ if required by the gimbal (only in AUX output mode)</short_desc>
<long_desc>Yaw proportional gain, i.e. desired angular speed in rad/s for error 1 rad.</long_desc> <long_desc>Yaw proportional gain, i.e. desired angular speed in rad/s for error 1 rad.</long_desc>
<min>0.0</min> <min>0.0</min>
<max>5</max> <max>5</max>
<unit>1/s</unit> <unit>Hz</unit>
<decimal>2</decimal> <decimal>2</decimal>
<increment>0.1</increment> <increment>0.1</increment>
</parameter> </parameter>
...@@ -4544,7 +4540,7 @@ if required by the gimbal (only in AUX output mode)</short_desc> ...@@ -4544,7 +4540,7 @@ if required by the gimbal (only in AUX output mode)</short_desc>
<long_desc>A fraction [0,1] deprioritizing yaw compared to roll and pitch in non-linear attitude control. Deprioritizing yaw is necessary because multicopters have much less control authority in yaw compared to the other axes and it makes sense because yaw is not critical for stable hovering or 3D navigation. For yaw control tuning use MC_YAW_P. This ratio has no inpact on the yaw gain.</long_desc> <long_desc>A fraction [0,1] deprioritizing yaw compared to roll and pitch in non-linear attitude control. Deprioritizing yaw is necessary because multicopters have much less control authority in yaw compared to the other axes and it makes sense because yaw is not critical for stable hovering or 3D navigation. For yaw control tuning use MC_YAW_P. This ratio has no inpact on the yaw gain.</long_desc>
<min>0.0</min> <min>0.0</min>
<max>1.0</max> <max>1.0</max>
<unit>1/s</unit> <unit>Hz</unit>
<decimal>2</decimal> <decimal>2</decimal>
<increment>0.1</increment> <increment>0.1</increment>
</parameter> </parameter>
...@@ -4564,14 +4560,14 @@ if required by the gimbal (only in AUX output mode)</short_desc> ...@@ -4564,14 +4560,14 @@ if required by the gimbal (only in AUX output mode)</short_desc>
<long_desc>Only used in Position mode.</long_desc> <long_desc>Only used in Position mode.</long_desc>
<min>0</min> <min>0</min>
<max>1</max> <max>1</max>
<unit>seconds</unit> <unit>s</unit>
</parameter> </parameter>
<parameter default="-1.0" name="CP_DIST" type="FLOAT"> <parameter default="-1.0" name="CP_DIST" type="FLOAT">
<short_desc>Minimum distance the vehicle should keep to all obstacles</short_desc> <short_desc>Minimum distance the vehicle should keep to all obstacles</short_desc>
<long_desc>Only used in Position mode. Collision avoidance is disabled by setting this parameter to a negative value</long_desc> <long_desc>Only used in Position mode. Collision avoidance is disabled by setting this parameter to a negative value</long_desc>
<min>-1</min> <min>-1</min>
<max>15</max> <max>15</max>
<unit>meters</unit> <unit>m</unit>
</parameter> </parameter>
<parameter default="0" name="CP_GO_NO_DATA" type="FLOAT"> <parameter default="0" name="CP_GO_NO_DATA" type="FLOAT">
<short_desc>Boolean to allow moving into directions where there is no sensor data (outside FOV)</short_desc> <short_desc>Boolean to allow moving into directions where there is no sensor data (outside FOV)</short_desc>
...@@ -4582,7 +4578,7 @@ if required by the gimbal (only in AUX output mode)</short_desc> ...@@ -4582,7 +4578,7 @@ if required by the gimbal (only in AUX output mode)</short_desc>
<long_desc>Only used in Position mode.</long_desc> <long_desc>Only used in Position mode.</long_desc>
<min>0</min> <min>0</min>
<max>90</max> <max>90</max>
<unit>[deg]</unit> <unit>deg</unit>
</parameter> </parameter>
<parameter default="0.0" name="MC_MAN_TILT_TAU" type="FLOAT"> <parameter default="0.0" name="MC_MAN_TILT_TAU" type="FLOAT">
<short_desc>Manual tilt input filter time constant <short_desc>Manual tilt input filter time constant
...@@ -4596,7 +4592,7 @@ Setting this parameter to 0 disables the filter</short_desc> ...@@ -4596,7 +4592,7 @@ Setting this parameter to 0 disables the filter</short_desc>
<short_desc>Maximum vertical acceleration in velocity controlled modes down</short_desc> <short_desc>Maximum vertical acceleration in velocity controlled modes down</short_desc>
<min>2.0</min> <min>2.0</min>
<max>15.0</max> <max>15.0</max>
<unit>m/s/s</unit> <unit>m/s^2</unit>
<decimal>2</decimal> <decimal>2</decimal>
<increment>1</increment> <increment>1</increment>
</parameter> </parameter>
...@@ -4605,7 +4601,7 @@ Setting this parameter to 0 disables the filter</short_desc> ...@@ -4605,7 +4601,7 @@ Setting this parameter to 0 disables the filter</short_desc>
<long_desc>Note: In manual, this parameter is only used in MPC_POS_MODE 1.</long_desc> <long_desc>Note: In manual, this parameter is only used in MPC_POS_MODE 1.</long_desc>
<min>2.0</min> <min>2.0</min>
<max>15.0</max> <max>15.0</max>
<unit>m/s/s</unit> <unit>m/s^2</unit>
<decimal>2</decimal> <decimal>2</decimal>
<increment>1</increment> <increment>1</increment>
</parameter> </parameter>
...@@ -4614,7 +4610,7 @@ Setting this parameter to 0 disables the filter</short_desc> ...@@ -4614,7 +4610,7 @@ Setting this parameter to 0 disables the filter</short_desc>
<long_desc>Maximum deceleration for MPC_POS_MODE 1. Maximum acceleration and deceleration for MPC_POS_MODE 3.</long_desc> <long_desc>Maximum deceleration for MPC_POS_MODE 1. Maximum acceleration and deceleration for MPC_POS_MODE 3.</long_desc>
<min>2.0</min> <min>2.0</min>
<max>15.0</max> <max>15.0</max>
<unit>m/s/s</unit> <unit>m/s^2</unit>
<decimal>2</decimal> <decimal>2</decimal>
<increment>1</increment> <increment>1</increment>
</parameter> </parameter>
...@@ -4622,7 +4618,7 @@ Setting this parameter to 0 disables the filter</short_desc> ...@@ -4622,7 +4618,7 @@ Setting this parameter to 0 disables the filter</short_desc>
<short_desc>Maximum vertical acceleration in velocity controlled modes upward</short_desc> <short_desc>Maximum vertical acceleration in velocity controlled modes upward</short_desc>
<min>2.0</min> <min>2.0</min>
<max>15.0</max> <max>15.0</max>
<unit>m/s/s</unit> <unit>m/s^2</unit>
<decimal>2</decimal> <decimal>2</decimal>
<increment>1</increment> <increment>1</increment>
</parameter> </parameter>
...@@ -4642,7 +4638,7 @@ Setting this parameter to 0 disables the filter</short_desc> ...@@ -4642,7 +4638,7 @@ Setting this parameter to 0 disables the filter</short_desc>
<long_desc>Note: This is only used when MPC_POS_MODE is set to 1.</long_desc> <long_desc>Note: This is only used when MPC_POS_MODE is set to 1.</long_desc>
<min>0.5</min> <min>0.5</min>
<max>10.0</max> <max>10.0</max>
<unit>m/s/s</unit> <unit>m/s^2</unit>
<decimal>2</decimal> <decimal>2</decimal>
<increment>1</increment> <increment>1</increment>
</parameter> </parameter>
...@@ -4671,7 +4667,7 @@ Setting this parameter to 0 disables the filter</short_desc> ...@@ -4671,7 +4667,7 @@ Setting this parameter to 0 disables the filter</short_desc>
<long_desc>Limit the maximum jerk of the vehicle (how fast the acceleration can change). A lower value leads to smoother vehicle motions, but it also limits its agility.</long_desc> <long_desc>Limit the maximum jerk of the vehicle (how fast the acceleration can change). A lower value leads to smoother vehicle motions, but it also limits its agility.</long_desc>
<min>1.0</min> <min>1.0</min>
<max>80.0</max> <max>80.0</max>
<unit>m/s/s/s</unit> <unit>m/s^3</unit>
<decimal>1</decimal> <decimal>1</decimal>
<increment>1</increment> <increment>1</increment>
</parameter> </parameter>
...@@ -4680,7 +4676,7 @@ Setting this parameter to 0 disables the filter</short_desc> ...@@ -4680,7 +4676,7 @@ Setting this parameter to 0 disables the filter</short_desc>
<long_desc>Limit the maximum jerk of the vehicle (how fast the acceleration can change). A lower value leads to smoother vehicle motions, but it also limits its agility (how fast it can change directions or break). Setting this to the maximum value essentially disables the limit. Note: This is only used when MPC_POS_MODE is set to a smoothing mode 1 or 3.</long_desc> <long_desc>Limit the maximum jerk of the vehicle (how fast the acceleration can change). A lower value leads to smoother vehicle motions, but it also limits its agility (how fast it can change directions or break). Setting this to the maximum value essentially disables the limit. Note: This is only used when MPC_POS_MODE is set to a smoothing mode 1 or 3.</long_desc>
<min>0.5</min> <min>0.5</min>
<max>500.0</max> <max>500.0</max>
<unit>m/s/s/s</unit> <unit>m/s^3</unit>
<decimal>2</decimal> <decimal>2</decimal>
<increment>1</increment> <increment>1</increment>
</parameter> </parameter>
...@@ -4689,7 +4685,7 @@ Setting this parameter to 0 disables the filter</short_desc> ...@@ -4689,7 +4685,7 @@ Setting this parameter to 0 disables the filter</short_desc>
<long_desc>If this is not zero, a velocity-based maximum jerk limit is used: the applied jerk limit linearly increases with the vehicle's velocity between MPC_JERK_MIN (zero velocity) and MPC_JERK_MAX (maximum velocity). This means that the vehicle's motions are smooth for low velocities, but still allows fast direction changes or breaking at higher velocities. Set this to zero to use a fixed maximum jerk limit (MPC_JERK_MAX). Note: This is only used when MPC_POS_MODE is set to 1.</long_desc> <long_desc>If this is not zero, a velocity-based maximum jerk limit is used: the applied jerk limit linearly increases with the vehicle's velocity between MPC_JERK_MIN (zero velocity) and MPC_JERK_MAX (maximum velocity). This means that the vehicle's motions are smooth for low velocities, but still allows fast direction changes or breaking at higher velocities. Set this to zero to use a fixed maximum jerk limit (MPC_JERK_MAX). Note: This is only used when MPC_POS_MODE is set to 1.</long_desc>
<min>0</min> <min>0</min>
<max>30.0</max> <max>30.0</max>
<unit>m/s/s/s</unit> <unit>m/s^3</unit>
<decimal>2</decimal> <decimal>2</decimal>
<increment>1</increment> <increment>1</increment>
</parameter> </parameter>
...@@ -7661,7 +7657,7 @@ default 1.5 turns per second</short_desc> ...@@ -7661,7 +7657,7 @@ default 1.5 turns per second</short_desc>
<long_desc>Defines the half-angle of a cone centered around the destination position that affects the altitude at which the vehicle returns.</long_desc> <long_desc>Defines the half-angle of a cone centered around the destination position that affects the altitude at which the vehicle returns.</long_desc>
<min>0</min> <min>0</min>
<max>90</max> <max>90</max>
<unit>degrees</unit> <unit>deg</unit>
<values> <values>
<value code="0">No cone, always climb to RTL_RETURN_ALT above destination.</value> <value code="0">No cone, always climb to RTL_RETURN_ALT above destination.</value>
<value code="25">25 degrees half cone angle.</value> <value code="25">25 degrees half cone angle.</value>
...@@ -8858,14 +8854,14 @@ is less than 50% of this value</short_desc> ...@@ -8858,14 +8854,14 @@ is less than 50% of this value</short_desc>
<short_desc>Airspeed sensor tube diameter. Only used for the Tube Pressure Drop Compensation</short_desc> <short_desc>Airspeed sensor tube diameter. Only used for the Tube Pressure Drop Compensation</short_desc>
<min>0.1</min> <min>0.1</min>
<max>100</max> <max>100</max>
<unit>millimeter</unit> <unit>mm</unit>
</parameter> </parameter>
<parameter default="0.2" name="CAL_AIR_TUBELEN" type="FLOAT"> <parameter default="0.2" name="CAL_AIR_TUBELEN" type="FLOAT">
<short_desc>Airspeed sensor tube length</short_desc> <short_desc>Airspeed sensor tube length</short_desc>
<long_desc>See the CAL_AIR_CMODEL explanation on how this parameter should be set.</long_desc> <long_desc>See the CAL_AIR_CMODEL explanation on how this parameter should be set.</long_desc>
<min>0.01</min> <min>0.01</min>
<max>2.00</max> <max>2.00</max>
<unit>meter</unit> <unit>m</unit>
</parameter> </parameter>
<parameter default="1" name="CAL_MAG_ROT_AUTO" type="INT32"> <parameter default="1" name="CAL_MAG_ROT_AUTO" type="INT32">
<short_desc>Automatically set external rotations</short_desc> <short_desc>Automatically set external rotations</short_desc>
...@@ -8955,7 +8951,6 @@ is less than 50% of this value</short_desc> ...@@ -8955,7 +8951,6 @@ is less than 50% of this value</short_desc>
<short_desc>INA226 Power Monitor Config</short_desc> <short_desc>INA226 Power Monitor Config</short_desc>
<min>0</min> <min>0</min>
<max>65535</max> <max>65535</max>
<unit>u</unit>
<decimal>1</decimal> <decimal>1</decimal>
<increment>1</increment> <increment>1</increment>
</parameter> </parameter>
...@@ -9217,21 +9212,21 @@ How often the sensor is readout</short_desc> ...@@ -9217,21 +9212,21 @@ How often the sensor is readout</short_desc>
<short_desc>Target IMU temperature</short_desc> <short_desc>Target IMU temperature</short_desc>
<min>0</min> <min>0</min>
<max>85.0</max> <max>85.0</max>
<unit>C</unit> <unit>celcius</unit>
<decimal>3</decimal> <decimal>3</decimal>
</parameter> </parameter>
<parameter category="System" default="0.025" name="SENS_IMU_TEMP_I" type="FLOAT"> <parameter category="System" default="0.025" name="SENS_IMU_TEMP_I" type="FLOAT">
<short_desc>IMU heater controller integrator gain value</short_desc> <short_desc>IMU heater controller integrator gain value</short_desc>
<min>0</min> <min>0</min>
<max>1.0</max> <max>1.0</max>
<unit>microseconds/C</unit> <unit>us/C</unit>
<decimal>3</decimal> <decimal>3</decimal>
</parameter> </parameter>
<parameter category="System" default="1.0" name="SENS_IMU_TEMP_P" type="FLOAT"> <parameter category="System" default="1.0" name="SENS_IMU_TEMP_P" type="FLOAT">
<short_desc>IMU heater controller proportional gain value</short_desc> <short_desc>IMU heater controller proportional gain value</short_desc>
<min>0</min> <min>0</min>
<max>2.0</max> <max>2.0</max>
<unit>microseconds/C</unit> <unit>us/C</unit>
<decimal>3</decimal> <decimal>3</decimal>
</parameter> </parameter>
<parameter default="0" name="SENS_LEDDAR1_CFG" type="INT32"> <parameter default="0" name="SENS_LEDDAR1_CFG" type="INT32">
...@@ -10059,21 +10054,21 @@ How often the sensor is readout</short_desc> ...@@ -10059,21 +10054,21 @@ How often the sensor is readout</short_desc>
<short_desc>Vehicle inertia about X axis</short_desc> <short_desc>Vehicle inertia about X axis</short_desc>
<long_desc>The intertia is a 3 by 3 symmetric matrix. It represents the difficulty of the vehicle to modify its angular rate.</long_desc> <long_desc>The intertia is a 3 by 3 symmetric matrix. It represents the difficulty of the vehicle to modify its angular rate.</long_desc>
<min>0.0</min> <min>0.0</min>
<unit>kg*m*m</unit> <unit>kg m^2</unit>
<decimal>3</decimal> <decimal>3</decimal>
<increment>0.005</increment> <increment>0.005</increment>
</parameter> </parameter>
<parameter default="0.0" name="SIH_IXY" type="FLOAT"> <parameter default="0.0" name="SIH_IXY" type="FLOAT">
<short_desc>Vehicle cross term inertia xy</short_desc> <short_desc>Vehicle cross term inertia xy</short_desc>
<long_desc>The intertia is a 3 by 3 symmetric matrix. This value can be set to 0 for a quad symmetric about its center of mass.</long_desc> <long_desc>The intertia is a 3 by 3 symmetric matrix. This value can be set to 0 for a quad symmetric about its center of mass.</long_desc>
<unit>kg*m*m</unit> <unit>kg m^2</unit>
<decimal>3</decimal> <decimal>3</decimal>
<increment>0.005</increment> <increment>0.005</increment>
</parameter> </parameter>
<parameter default="0.0" name="SIH_IXZ" type="FLOAT"> <parameter default="0.0" name="SIH_IXZ" type="FLOAT">
<short_desc>Vehicle cross term inertia xz</short_desc> <short_desc>Vehicle cross term inertia xz</short_desc>
<long_desc>The intertia is a 3 by 3 symmetric matrix. This value can be set to 0 for a quad symmetric about its center of mass.</long_desc> <long_desc>The intertia is a 3 by 3 symmetric matrix. This value can be set to 0 for a quad symmetric about its center of mass.</long_desc>
<unit>kg*m*m</unit> <unit>kg m^2</unit>
<decimal>3</decimal> <decimal>3</decimal>
<increment>0.005</increment> <increment>0.005</increment>
</parameter> </parameter>
...@@ -10081,14 +10076,14 @@ How often the sensor is readout</short_desc> ...@@ -10081,14 +10076,14 @@ How often the sensor is readout</short_desc>
<short_desc>Vehicle inertia about Y axis</short_desc> <short_desc>Vehicle inertia about Y axis</short_desc>
<long_desc>The intertia is a 3 by 3 symmetric matrix. It represents the difficulty of the vehicle to modify its angular rate.</long_desc> <long_desc>The intertia is a 3 by 3 symmetric matrix. It represents the difficulty of the vehicle to modify its angular rate.</long_desc>
<min>0.0</min> <min>0.0</min>
<unit>kg*m*m</unit> <unit>kg m^2</unit>
<decimal>3</decimal> <decimal>3</decimal>
<increment>0.005</increment> <increment>0.005</increment>
</parameter> </parameter>
<parameter default="0.0" name="SIH_IYZ" type="FLOAT"> <parameter default="0.0" name="SIH_IYZ" type="FLOAT">
<short_desc>Vehicle cross term inertia yz</short_desc> <short_desc>Vehicle cross term inertia yz</short_desc>
<long_desc>The intertia is a 3 by 3 symmetric matrix. This value can be set to 0 for a quad symmetric about its center of mass.</long_desc> <long_desc>The intertia is a 3 by 3 symmetric matrix. This value can be set to 0 for a quad symmetric about its center of mass.</long_desc>
<unit>kg*m*m</unit> <unit>kg m^2</unit>
<decimal>3</decimal> <decimal>3</decimal>
<increment>0.005</increment> <increment>0.005</increment>
</parameter> </parameter>
...@@ -10096,7 +10091,7 @@ How often the sensor is readout</short_desc> ...@@ -10096,7 +10091,7 @@ How often the sensor is readout</short_desc>
<short_desc>Vehicle inertia about Z axis</short_desc> <short_desc>Vehicle inertia about Z axis</short_desc>
<long_desc>The intertia is a 3 by 3 symmetric matrix. It represents the difficulty of the vehicle to modify its angular rate.</long_desc> <long_desc>The intertia is a 3 by 3 symmetric matrix. It represents the difficulty of the vehicle to modify its angular rate.</long_desc>
<min>0.0</min> <min>0.0</min>
<unit>kg*m*m</unit> <unit>kg m^2</unit>
<decimal>3</decimal> <decimal>3</decimal>
<increment>0.005</increment> <increment>0.005</increment>
</parameter> </parameter>
...@@ -10130,21 +10125,21 @@ How often the sensor is readout</short_desc> ...@@ -10130,21 +10125,21 @@ How often the sensor is readout</short_desc>
<long_desc>This value represents the North-South location on Earth where the simulation begins. A value of 45 deg should be written 450000000. LAT0, LON0, H0, MU_X, MU_Y, and MU_Z should ideally be consistent among each others to represent a physical ground location on Earth.</long_desc> <long_desc>This value represents the North-South location on Earth where the simulation begins. A value of 45 deg should be written 450000000. LAT0, LON0, H0, MU_X, MU_Y, and MU_Z should ideally be consistent among each others to represent a physical ground location on Earth.</long_desc>
<min>-850000000</min> <min>-850000000</min>
<max>850000000</max> <max>850000000</max>
<unit>1e-7 deg</unit> <unit>deg*1e7</unit>
</parameter> </parameter>
<parameter default="-737578370" name="SIH_LOC_LON0" type="INT32"> <parameter default="-737578370" name="SIH_LOC_LON0" type="INT32">
<short_desc>Initial geodetic longitude</short_desc> <short_desc>Initial geodetic longitude</short_desc>
<long_desc>This value represents the East-West location on Earth where the simulation begins. A value of 45 deg should be written 450000000. LAT0, LON0, H0, MU_X, MU_Y, and MU_Z should ideally be consistent among each others to represent a physical ground location on Earth.</long_desc> <long_desc>This value represents the East-West location on Earth where the simulation begins. A value of 45 deg should be written 450000000. LAT0, LON0, H0, MU_X, MU_Y, and MU_Z should ideally be consistent among each others to represent a physical ground location on Earth.</long_desc>
<min>-1800000000</min> <min>-1800000000</min>
<max>1800000000</max> <max>1800000000</max>
<unit>1e-7 deg</unit> <unit>deg*1e7</unit>
</parameter> </parameter>
<parameter default="0.179" name="SIH_LOC_MU_X" type="FLOAT"> <parameter default="0.179" name="SIH_LOC_MU_X" type="FLOAT">
<short_desc>North magnetic field at the initial location</short_desc> <short_desc>North magnetic field at the initial location</short_desc>
<long_desc>This value represents the North magnetic field at the initial location. A magnetic field calculator can be found on the NOAA website Note, the values need to be converted from nano Tesla to Gauss LAT0, LON0, H0, MU_X, MU_Y, and MU_Z should ideally be consistent among each others to represent a physical ground location on Earth.</long_desc> <long_desc>This value represents the North magnetic field at the initial location. A magnetic field calculator can be found on the NOAA website Note, the values need to be converted from nano Tesla to Gauss LAT0, LON0, H0, MU_X, MU_Y, and MU_Z should ideally be consistent among each others to represent a physical ground location on Earth.</long_desc>
<min>-1.0</min> <min>-1.0</min>
<max>1.0</max> <max>1.0</max>
<unit>Gauss</unit> <unit>gauss</unit>
<decimal>2</decimal> <decimal>2</decimal>
<increment>0.001</increment> <increment>0.001</increment>
</parameter> </parameter>
...@@ -10153,7 +10148,7 @@ How often the sensor is readout</short_desc> ...@@ -10153,7 +10148,7 @@ How often the sensor is readout</short_desc>
<long_desc>This value represents the East magnetic field at the initial location. A magnetic field calculator can be found on the NOAA website Note, the values need to be converted from nano Tesla to Gauss LAT0, LON0, H0, MU_X, MU_Y, and MU_Z should ideally be consistent among each others to represent a physical ground location on Earth.</long_desc> <long_desc>This value represents the East magnetic field at the initial location. A magnetic field calculator can be found on the NOAA website Note, the values need to be converted from nano Tesla to Gauss LAT0, LON0, H0, MU_X, MU_Y, and MU_Z should ideally be consistent among each others to represent a physical ground location on Earth.</long_desc>
<min>-1.0</min> <min>-1.0</min>
<max>1.0</max> <max>1.0</max>
<unit>Gauss</unit> <unit>gauss</unit>
<decimal>2</decimal> <decimal>2</decimal>
<increment>0.001</increment> <increment>0.001</increment>
</parameter> </parameter>
...@@ -10162,7 +10157,7 @@ How often the sensor is readout</short_desc> ...@@ -10162,7 +10157,7 @@ How often the sensor is readout</short_desc>
<long_desc>This value represents the Down magnetic field at the initial location. A magnetic field calculator can be found on the NOAA website Note, the values need to be converted from nano Tesla to Gauss LAT0, LON0, H0, MU_X, MU_Y, and MU_Z should ideally be consistent among each others to represent a physical ground location on Earth.</long_desc> <long_desc>This value represents the Down magnetic field at the initial location. A magnetic field calculator can be found on the NOAA website Note, the values need to be converted from nano Tesla to Gauss LAT0, LON0, H0, MU_X, MU_Y, and MU_Z should ideally be consistent among each others to represent a physical ground location on Earth.</long_desc>
<min>-1.0</min> <min>-1.0</min>
<max>1.0</max> <max>1.0</max>
<unit>Gauss</unit> <unit>gauss</unit>
<decimal>2</decimal> <decimal>2</decimal>
<increment>0.001</increment> <increment>0.001</increment>
</parameter> </parameter>
...@@ -10263,17 +10258,17 @@ How often the sensor is readout</short_desc> ...@@ -10263,17 +10258,17 @@ How often the sensor is readout</short_desc>
<short_desc>Required temperature rise during thermal calibration</short_desc> <short_desc>Required temperature rise during thermal calibration</short_desc>
<long_desc>A temperature increase greater than this value is required during calibration. Calibration will complete for each sensor when the temperature increase above the starting temeprature exceeds the value set by SYS_CAL_TDEL. If the temperature rise is insufficient, the calibration will continue indefinitely and the board will need to be repowered to exit.</long_desc> <long_desc>A temperature increase greater than this value is required during calibration. Calibration will complete for each sensor when the temperature increase above the starting temeprature exceeds the value set by SYS_CAL_TDEL. If the temperature rise is insufficient, the calibration will continue indefinitely and the board will need to be repowered to exit.</long_desc>
<min>10</min> <min>10</min>
<unit>deg C</unit> <unit>celcius</unit>
</parameter> </parameter>
<parameter default="10" name="SYS_CAL_TMAX" type="INT32"> <parameter default="10" name="SYS_CAL_TMAX" type="INT32">
<short_desc>Maximum starting temperature for thermal calibration</short_desc> <short_desc>Maximum starting temperature for thermal calibration</short_desc>
<long_desc>Temperature calibration will not start if the temperature of any sensor is higher than the value set by SYS_CAL_TMAX.</long_desc> <long_desc>Temperature calibration will not start if the temperature of any sensor is higher than the value set by SYS_CAL_TMAX.</long_desc>
<unit>deg C</unit> <unit>celcius</unit>
</parameter> </parameter>
<parameter default="5" name="SYS_CAL_TMIN" type="INT32"> <parameter default="5" name="SYS_CAL_TMIN" type="INT32">
<short_desc>Minimum starting temperature for thermal calibration</short_desc> <short_desc>Minimum starting temperature for thermal calibration</short_desc>
<long_desc>Temperature calibration for each sensor will ignore data if the temperature is lower than the value set by SYS_CAL_TMIN.</long_desc> <long_desc>Temperature calibration for each sensor will ignore data if the temperature is lower than the value set by SYS_CAL_TMIN.</long_desc>
<unit>deg C</unit> <unit>celcius</unit>
</parameter> </parameter>
<parameter default="1" name="SYS_HAS_BARO" type="INT32"> <parameter default="1" name="SYS_HAS_BARO" type="INT32">
<short_desc>Control if the vehicle has a barometer</short_desc> <short_desc>Control if the vehicle has a barometer</short_desc>
...@@ -10928,7 +10923,7 @@ How often the sensor is readout</short_desc> ...@@ -10928,7 +10923,7 @@ How often the sensor is readout</short_desc>
<short_desc>Backtransition deceleration setpoint to pitch feedforward gain</short_desc> <short_desc>Backtransition deceleration setpoint to pitch feedforward gain</short_desc>
<min>0</min> <min>0</min>
<max>0.2</max> <max>0.2</max>
<unit>rad*s*s/m</unit> <unit>rad s^2/m</unit>
<decimal>1</decimal> <decimal>1</decimal>
<increment>0.05</increment> <increment>0.05</increment>
</parameter> </parameter>
...@@ -10936,7 +10931,7 @@ How often the sensor is readout</short_desc> ...@@ -10936,7 +10931,7 @@ How often the sensor is readout</short_desc>
<short_desc>Backtransition deceleration setpoint to pitch I gain</short_desc> <short_desc>Backtransition deceleration setpoint to pitch I gain</short_desc>
<min>0</min> <min>0</min>
<max>0.3</max> <max>0.3</max>
<unit>rad*s/m</unit> <unit>rad s/m</unit>
<decimal>1</decimal> <decimal>1</decimal>
<increment>0.05</increment> <increment>0.05</increment>
</parameter> </parameter>
...@@ -10945,7 +10940,7 @@ How often the sensor is readout</short_desc> ...@@ -10945,7 +10940,7 @@ How often the sensor is readout</short_desc>
<long_desc>The approximate deceleration during a back transition in m/s/s Used to calculate back transition distance in mission mode. A lower value will make the VTOL transition further from the destination waypoint. For standard vtol and tiltrotors a controller is used to track this value during the transition.</long_desc> <long_desc>The approximate deceleration during a back transition in m/s/s Used to calculate back transition distance in mission mode. A lower value will make the VTOL transition further from the destination waypoint. For standard vtol and tiltrotors a controller is used to track this value during the transition.</long_desc>
<min>0.5</min> <min>0.5</min>
<max>10</max> <max>10</max>
<unit>m/s/s</unit> <unit>m/s^2</unit>
<decimal>2</decimal> <decimal>2</decimal>
<increment>0.1</increment> <increment>0.1</increment>
</parameter> </parameter>
...@@ -11098,7 +11093,7 @@ tailsitter, tiltrotor: main throttle</short_desc> ...@@ -11098,7 +11093,7 @@ tailsitter, tiltrotor: main throttle</short_desc>
<long_desc>The duration of the front transition when there is no airspeed feedback available.</long_desc> <long_desc>The duration of the front transition when there is no airspeed feedback available.</long_desc>
<min>1.0</min> <min>1.0</min>
<max>30.0</max> <max>30.0</max>
<unit>seconds</unit> <unit>s</unit>
</parameter> </parameter>
<parameter default="900" name="VT_IDLE_PWM_MC" type="INT32"> <parameter default="900" name="VT_IDLE_PWM_MC" type="INT32">
<short_desc>Idle speed of VTOL when in multicopter mode</short_desc> <short_desc>Idle speed of VTOL when in multicopter mode</short_desc>
...@@ -11197,7 +11192,7 @@ to fixed wing mode. Zero or negative values will produce an instant throttle ris ...@@ -11197,7 +11192,7 @@ to fixed wing mode. Zero or negative values will produce an instant throttle ris
<long_desc>The desired gain to convert roll sp into yaw rate sp.</long_desc> <long_desc>The desired gain to convert roll sp into yaw rate sp.</long_desc>
<min>0.0</min> <min>0.0</min>
<max>3.0</max> <max>3.0</max>
<unit>1/s</unit> <unit>Hz</unit>
<decimal>3</decimal> <decimal>3</decimal>
<increment>0.01</increment> <increment>0.01</increment>
</parameter> </parameter>
......
...@@ -28,8 +28,8 @@ Item { ...@@ -28,8 +28,8 @@ Item {
property double _ar: QGroundControl.videoManager.aspectRatio property double _ar: QGroundControl.videoManager.aspectRatio
property bool _showGrid: QGroundControl.settingsManager.videoSettings.gridLines.rawValue > 0 property bool _showGrid: QGroundControl.settingsManager.videoSettings.gridLines.rawValue > 0
property var _dynamicCameras: activeVehicle ? activeVehicle.cameraManager : null property var _dynamicCameras: globals.activeVehicle ? globals.activeVehicle.cameraManager : null
property bool _connected: activeVehicle ? !activeVehicle.connectionLost : false property bool _connected: globals.activeVehicle ? !globals.activeVehicle.connectionLost : false
property int _curCameraIndex: _dynamicCameras ? _dynamicCameras.currentCamera : 0 property int _curCameraIndex: _dynamicCameras ? _dynamicCameras.currentCamera : 0
property bool _isCamera: _dynamicCameras ? _dynamicCameras.cameras.count > 0 : false property bool _isCamera: _dynamicCameras ? _dynamicCameras.cameras.count > 0 : false
property var _camera: _isCamera ? _dynamicCameras.cameras.get(_curCameraIndex) : null property var _camera: _isCamera ? _dynamicCameras.cameras.get(_curCameraIndex) : null
......
...@@ -43,10 +43,11 @@ FlightMap { ...@@ -43,10 +43,11 @@ FlightMap {
property bool pipMode: false // true: map is shown in a small pip mode property bool pipMode: false // true: map is shown in a small pip mode
property var toolInsets // Insets for the center viewport area property var toolInsets // Insets for the center viewport area
property var _activeVehicle: QGroundControl.multiVehicleManager.activeVehicle
property var _planMasterController: planMasterController property var _planMasterController: planMasterController
property var _geoFenceController: planMasterController.geoFenceController property var _geoFenceController: planMasterController.geoFenceController
property var _rallyPointController: planMasterController.rallyPointController property var _rallyPointController: planMasterController.rallyPointController
property var _activeVehicleCoordinate: activeVehicle ? activeVehicle.coordinate : QtPositioning.coordinate() property var _activeVehicleCoordinate: _activeVehicle ? _activeVehicle.coordinate : QtPositioning.coordinate()
property real _toolButtonTopMargin: parent.height - mainWindow.height + (ScreenTools.defaultFontPixelHeight / 2) property real _toolButtonTopMargin: parent.height - mainWindow.height + (ScreenTools.defaultFontPixelHeight / 2)
property bool _airspaceEnabled: QGroundControl.airmapSupported ? (QGroundControl.settingsManager.airMapSettings.enableAirMap.rawValue && QGroundControl.airspaceManager.connected): false property bool _airspaceEnabled: QGroundControl.airmapSupported ? (QGroundControl.settingsManager.airMapSettings.enableAirMap.rawValue && QGroundControl.airspaceManager.connected): false
property var _flyViewSettings: QGroundControl.settingsManager.flyViewSettings property var _flyViewSettings: QGroundControl.settingsManager.flyViewSettings
...@@ -231,11 +232,11 @@ FlightMap { ...@@ -231,11 +232,11 @@ FlightMap {
Connections { Connections {
target: QGroundControl.multiVehicleManager target: QGroundControl.multiVehicleManager
onActiveVehicleChanged: trajectoryPolyline.path = activeVehicle ? activeVehicle.trajectoryPoints.list() : [] onActiveVehicleChanged: trajectoryPolyline.path = _activeVehicle ? _activeVehicle.trajectoryPoints.list() : []
} }
Connections { Connections {
target: activeVehicle ? activeVehicle.trajectoryPoints : null target: _activeVehicle ? _activeVehicle.trajectoryPoints : null
onPointAdded: trajectoryPolyline.addCoordinate(coordinate) onPointAdded: trajectoryPolyline.addCoordinate(coordinate)
onUpdateLastPoint: trajectoryPolyline.replaceCoordinate(trajectoryPolyline.pathLength() - 1, coordinate) onUpdateLastPoint: trajectoryPolyline.replaceCoordinate(trajectoryPolyline.pathLength() - 1, coordinate)
onPointsCleared: trajectoryPolyline.path = [] onPointsCleared: trajectoryPolyline.path = []
...@@ -318,7 +319,7 @@ FlightMap { ...@@ -318,7 +319,7 @@ FlightMap {
myGeoFenceController: _geoFenceController myGeoFenceController: _geoFenceController
interactive: false interactive: false
planView: false planView: false
homePosition: activeVehicle && activeVehicle.homePosition.isValid ? activeVehicle.homePosition : QtPositioning.coordinate() homePosition: _activeVehicle && _activeVehicle.homePosition.isValid ? _activeVehicle.homePosition : QtPositioning.coordinate()
} }
// Rally points on map // Rally points on map
...@@ -341,7 +342,7 @@ FlightMap { ...@@ -341,7 +342,7 @@ FlightMap {
// Camera trigger points // Camera trigger points
MapItemView { MapItemView {
model: activeVehicle ? activeVehicle.cameraTriggerPoints : 0 model: _activeVehicle ? _activeVehicle.cameraTriggerPoints : 0
delegate: CameraTriggerIndicator { delegate: CameraTriggerIndicator {
coordinate: object.coordinate coordinate: object.coordinate
...@@ -362,7 +363,7 @@ FlightMap { ...@@ -362,7 +363,7 @@ FlightMap {
label: qsTr("Go here", "Go to location waypoint") label: qsTr("Go here", "Go to location waypoint")
} }
property bool inGotoFlightMode: activeVehicle ? activeVehicle.flightMode === activeVehicle.gotoFlightMode : false property bool inGotoFlightMode: _activeVehicle ? _activeVehicle.flightMode === _activeVehicle.gotoFlightMode : false
onInGotoFlightModeChanged: { onInGotoFlightModeChanged: {
if (!inGotoFlightMode && gotoLocationItem.visible) { if (!inGotoFlightMode && gotoLocationItem.visible) {
...@@ -372,7 +373,7 @@ FlightMap { ...@@ -372,7 +373,7 @@ FlightMap {
} }
Connections { Connections {
target: mainWindow target: QGroundControl.multiVehicleManager
onActiveVehicleChanged: { onActiveVehicleChanged: {
if (!activeVehicle) { if (!activeVehicle) {
gotoLocationItem.visible = false gotoLocationItem.visible = false
...@@ -410,7 +411,7 @@ FlightMap { ...@@ -410,7 +411,7 @@ FlightMap {
readonly property real defaultRadius: 30 readonly property real defaultRadius: 30
Connections { Connections {
target: mainWindow target: QGroundControl.multiVehicleManager
onActiveVehicleChanged: { onActiveVehicleChanged: {
if (!activeVehicle) { if (!activeVehicle) {
orbitMapCircle.visible = false orbitMapCircle.visible = false
...@@ -441,7 +442,7 @@ FlightMap { ...@@ -441,7 +442,7 @@ FlightMap {
return _mapCircle.radius.rawValue return _mapCircle.radius.rawValue
} }
Component.onCompleted: mainWindow.guidedControllerFlyView.orbitMapCircle = orbitMapCircle Component.onCompleted: globals.guidedControllerFlyView.orbitMapCircle = orbitMapCircle
QGCMapCircle { QGCMapCircle {
id: _mapCircle id: _mapCircle
...@@ -455,7 +456,7 @@ FlightMap { ...@@ -455,7 +456,7 @@ FlightMap {
// ROI Location visuals // ROI Location visuals
MapQuickItem { MapQuickItem {
id: roiLocationItem id: roiLocationItem
visible: activeVehicle && activeVehicle.isROIEnabled visible: _activeVehicle && _activeVehicle.isROIEnabled
z: QGroundControl.zOrderMapItems z: QGroundControl.zOrderMapItems
anchorPoint.x: sourceItem.anchorPointX anchorPoint.x: sourceItem.anchorPointX
anchorPoint.y: sourceItem.anchorPointY anchorPoint.y: sourceItem.anchorPointY
...@@ -484,15 +485,15 @@ FlightMap { ...@@ -484,15 +485,15 @@ FlightMap {
QGCMapCircleVisuals { QGCMapCircleVisuals {
id: orbitTelemetryCircle id: orbitTelemetryCircle
mapControl: parent mapControl: parent
mapCircle: activeVehicle ? activeVehicle.orbitMapCircle : null mapCircle: _activeVehicle ? _activeVehicle.orbitMapCircle : null
visible: activeVehicle ? activeVehicle.orbitActive : false visible: _activeVehicle ? _activeVehicle.orbitActive : false
} }
MapQuickItem { MapQuickItem {
id: orbitCenterIndicator id: orbitCenterIndicator
anchorPoint.x: sourceItem.anchorPointX anchorPoint.x: sourceItem.anchorPointX
anchorPoint.y: sourceItem.anchorPointY anchorPoint.y: sourceItem.anchorPointY
coordinate: activeVehicle ? activeVehicle.orbitMapCircle.center : QtPositioning.coordinate() coordinate: _activeVehicle ? _activeVehicle.orbitMapCircle.center : QtPositioning.coordinate()
visible: orbitTelemetryCircle.visible visible: orbitTelemetryCircle.visible
sourceItem: MissionItemIndexLabel { sourceItem: MissionItemIndexLabel {
...@@ -511,35 +512,35 @@ FlightMap { ...@@ -511,35 +512,35 @@ FlightMap {
property var coord property var coord
QGCMenuItem { QGCMenuItem {
text: qsTr("Go to location") text: qsTr("Go to location")
visible: mainWindow.guidedControllerFlyView.showGotoLocation visible: globals.guidedControllerFlyView.showGotoLocation
onTriggered: { onTriggered: {
gotoLocationItem.show(clickMenu.coord) gotoLocationItem.show(clickMenu.coord)
mainWindow.guidedControllerFlyView.confirmAction(mainWindow.guidedControllerFlyView.actionGoto, clickMenu.coord, gotoLocationItem) globals.guidedControllerFlyView.confirmAction(globals.guidedControllerFlyView.actionGoto, clickMenu.coord, gotoLocationItem)
} }
} }
QGCMenuItem { QGCMenuItem {
text: qsTr("Orbit at location") text: qsTr("Orbit at location")
visible: mainWindow.guidedControllerFlyView.showOrbit visible: globals.guidedControllerFlyView.showOrbit
onTriggered: { onTriggered: {
orbitMapCircle.show(clickMenu.coord) orbitMapCircle.show(clickMenu.coord)
mainWindow.guidedControllerFlyView.confirmAction(mainWindow.guidedControllerFlyView.actionOrbit, clickMenu.coord, orbitMapCircle) globals.guidedControllerFlyView.confirmAction(globals.guidedControllerFlyView.actionOrbit, clickMenu.coord, orbitMapCircle)
} }
} }
QGCMenuItem { QGCMenuItem {
text: qsTr("ROI at location") text: qsTr("ROI at location")
visible: mainWindow.guidedControllerFlyView.showROI visible: globals.guidedControllerFlyView.showROI
onTriggered: { onTriggered: {
roiLocationItem.show(clickMenu.coord) roiLocationItem.show(clickMenu.coord)
mainWindow.guidedControllerFlyView.confirmAction(mainWindow.guidedControllerFlyView.actionROI, clickMenu.coord, roiLocationItem) globals.guidedControllerFlyView.confirmAction(globals.guidedControllerFlyView.actionROI, clickMenu.coord, roiLocationItem)
} }
} }
} }
onClicked: { onClicked: {
if (!mainWindow.guidedControllerFlyView.guidedUIVisible && (mainWindow.guidedControllerFlyView.showGotoLocation || mainWindow.guidedControllerFlyView.showOrbit || mainWindow.guidedControllerFlyView.showROI)) { if (!globals.guidedControllerFlyView.guidedUIVisible && (globals.guidedControllerFlyView.showGotoLocation || globals.guidedControllerFlyView.showOrbit || globals.guidedControllerFlyView.showROI)) {
orbitMapCircle.hide() orbitMapCircle.hide()
gotoLocationItem.hide() gotoLocationItem.hide()
var clickCoord = _root.toCoordinate(Qt.point(mouse.x, mouse.y), false /* clipToViewPort */) var clickCoord = _root.toCoordinate(Qt.point(mouse.x, mouse.y), false /* clipToViewPort */)
......
...@@ -108,15 +108,15 @@ Item { ...@@ -108,15 +108,15 @@ Item {
ColumnLayout { ColumnLayout {
Layout.fillWidth: true Layout.fillWidth: true
spacing: ScreenTools.defaultFontPixelHeight spacing: ScreenTools.defaultFontPixelHeight
visible: !_activeVehicle.connectionLost && mainWindow.guidedControllerFlyView.showResumeMission visible: !_activeVehicle.connectionLost && globals.guidedControllerFlyView.showResumeMission
QGCButton { QGCButton {
Layout.fillWidth: true Layout.fillWidth: true
Layout.alignment: Qt.AlignHCenter Layout.alignment: Qt.AlignHCenter
text: qsTr("Resume Mission From Waypoint %1").arg(mainWindow.guidedControllerFlyView._resumeMissionIndex) text: qsTr("Resume Mission From Waypoint %1").arg(globals.guidedControllerFlyView._resumeMissionIndex)
onClicked: { onClicked: {
mainWindow.guidedControllerFlyView.executeAction(mainWindow.guidedControllerFlyView.actionResumeMission, null, null) globals.guidedControllerFlyView.executeAction(globals.guidedControllerFlyView.actionResumeMission, null, null)
hideDialog() hideDialog()
} }
} }
...@@ -133,7 +133,7 @@ Item { ...@@ -133,7 +133,7 @@ Item {
wrapMode: Text.WordWrap wrapMode: Text.WordWrap
color: qgcPal.warningText color: qgcPal.warningText
text: qsTr("If you are changing batteries for Resume Mission do not disconnect from the vehicle.") text: qsTr("If you are changing batteries for Resume Mission do not disconnect from the vehicle.")
visible: mainWindow.guidedControllerFlyView.showResumeMission visible: globals.guidedControllerFlyView.showResumeMission
} }
} }
} }
......
...@@ -39,11 +39,11 @@ Item { ...@@ -39,11 +39,11 @@ Item {
property var mapControl property var mapControl
property var _activeVehicle: QGroundControl.multiVehicleManager.activeVehicle property var _activeVehicle: QGroundControl.multiVehicleManager.activeVehicle
property var _planMasterController: mainWindow.planMasterControllerFlyView property var _planMasterController: globals.planMasterControllerFlyView
property var _missionController: _planMasterController.missionController property var _missionController: _planMasterController.missionController
property var _geoFenceController: _planMasterController.geoFenceController property var _geoFenceController: _planMasterController.geoFenceController
property var _rallyPointController: _planMasterController.rallyPointController property var _rallyPointController: _planMasterController.rallyPointController
property var _guidedController: mainWindow.guidedControllerFlyView property var _guidedController: globals.guidedControllerFlyView
property real _margins: ScreenTools.defaultFontPixelWidth / 2 property real _margins: ScreenTools.defaultFontPixelWidth / 2
property real _toolsMargin: ScreenTools.defaultFontPixelWidth * 0.75 property real _toolsMargin: ScreenTools.defaultFontPixelWidth * 0.75
property rect _centerViewport: Qt.rect(0, 0, width, height) property rect _centerViewport: Qt.rect(0, 0, width, height)
...@@ -156,12 +156,12 @@ Item { ...@@ -156,12 +156,12 @@ Item {
z: QGroundControl.zOrderTopMost + 1 z: QGroundControl.zOrderTopMost + 1
width: parent.width - (_pipOverlay.width / 2) width: parent.width - (_pipOverlay.width / 2)
height: Math.min(parent.height * 0.25, ScreenTools.defaultFontPixelWidth * 16) height: Math.min(parent.height * 0.25, ScreenTools.defaultFontPixelWidth * 16)
visible: _virtualJoystickEnabled && !QGroundControl.videoManager.fullScreen && !(activeVehicle ? activeVehicle.highLatencyLink : false) visible: _virtualJoystickEnabled && !QGroundControl.videoManager.fullScreen && !(_activeVehicle ? _activeVehicle.highLatencyLink : false)
anchors.bottom: parent.bottom anchors.bottom: parent.bottom
anchors.bottomMargin: parentToolInsets.leftEdgeBottomInset + ScreenTools.defaultFontPixelHeight * 2 anchors.bottomMargin: parentToolInsets.leftEdgeBottomInset + ScreenTools.defaultFontPixelHeight * 2
anchors.horizontalCenter: parent.horizontalCenter anchors.horizontalCenter: parent.horizontalCenter
source: "qrc:/qml/VirtualJoystick.qml" source: "qrc:/qml/VirtualJoystick.qml"
active: _virtualJoystickEnabled && !(activeVehicle ? activeVehicle.highLatencyLink : false) active: _virtualJoystickEnabled && !(_activeVehicle ? _activeVehicle.highLatencyLink : false)
property bool autoCenterThrottle: QGroundControl.settingsManager.appSettings.virtualJoystickAutoCenterThrottle.rawValue property bool autoCenterThrottle: QGroundControl.settingsManager.appSettings.virtualJoystickAutoCenterThrottle.rawValue
......
...@@ -101,21 +101,22 @@ Item { ...@@ -101,21 +101,22 @@ Item {
readonly property int actionActionList: 23 readonly property int actionActionList: 23
readonly property int actionForceArm: 24 readonly property int actionForceArm: 24
property var _activeVehicle: QGroundControl.multiVehicleManager.activeVehicle
property bool _useChecklist: QGroundControl.settingsManager.appSettings.useChecklist.rawValue && QGroundControl.corePlugin.options.preFlightChecklistUrl.toString().length property bool _useChecklist: QGroundControl.settingsManager.appSettings.useChecklist.rawValue && QGroundControl.corePlugin.options.preFlightChecklistUrl.toString().length
property bool _enforceChecklist: _useChecklist && QGroundControl.settingsManager.appSettings.enforceChecklist.rawValue property bool _enforceChecklist: _useChecklist && QGroundControl.settingsManager.appSettings.enforceChecklist.rawValue
property bool _canArm: activeVehicle ? (_useChecklist ? (_enforceChecklist ? activeVehicle.checkListState === Vehicle.CheckListPassed : true) : true) : false property bool _canArm: _activeVehicle ? (_useChecklist ? (_enforceChecklist ? _activeVehicle.checkListState === Vehicle.CheckListPassed : true) : true) : false
property bool showEmergenyStop: _guidedActionsEnabled && !_hideEmergenyStop && _vehicleArmed && _vehicleFlying property bool showEmergenyStop: _guidedActionsEnabled && !_hideEmergenyStop && _vehicleArmed && _vehicleFlying
property bool showArm: _guidedActionsEnabled && !_vehicleArmed && _canArm property bool showArm: _guidedActionsEnabled && !_vehicleArmed && _canArm
property bool showForceArm: _guidedActionsEnabled && !_vehicleArmed property bool showForceArm: _guidedActionsEnabled && !_vehicleArmed
property bool showDisarm: _guidedActionsEnabled && _vehicleArmed && !_vehicleFlying property bool showDisarm: _guidedActionsEnabled && _vehicleArmed && !_vehicleFlying
property bool showRTL: _guidedActionsEnabled && _vehicleArmed && activeVehicle.guidedModeSupported && _vehicleFlying && !_vehicleInRTLMode property bool showRTL: _guidedActionsEnabled && _vehicleArmed && _activeVehicle.guidedModeSupported && _vehicleFlying && !_vehicleInRTLMode
property bool showTakeoff: _guidedActionsEnabled && activeVehicle.takeoffVehicleSupported && !_vehicleFlying && _canArm property bool showTakeoff: _guidedActionsEnabled && _activeVehicle.takeoffVehicleSupported && !_vehicleFlying && _canArm
property bool showLand: _guidedActionsEnabled && activeVehicle.guidedModeSupported && _vehicleArmed && !activeVehicle.fixedWing && !_vehicleInLandMode property bool showLand: _guidedActionsEnabled && _activeVehicle.guidedModeSupported && _vehicleArmed && !_activeVehicle.fixedWing && !_vehicleInLandMode
property bool showStartMission: _guidedActionsEnabled && _missionAvailable && !_missionActive && !_vehicleFlying && _canArm property bool showStartMission: _guidedActionsEnabled && _missionAvailable && !_missionActive && !_vehicleFlying && _canArm
property bool showContinueMission: _guidedActionsEnabled && _missionAvailable && !_missionActive && _vehicleArmed && _vehicleFlying && (_currentMissionIndex < _missionItemCount - 1) property bool showContinueMission: _guidedActionsEnabled && _missionAvailable && !_missionActive && _vehicleArmed && _vehicleFlying && (_currentMissionIndex < _missionItemCount - 1)
property bool showPause: _guidedActionsEnabled && _vehicleArmed && activeVehicle.pauseVehicleSupported && _vehicleFlying && !_vehiclePaused && !_fixedWingOnApproach property bool showPause: _guidedActionsEnabled && _vehicleArmed && _activeVehicle.pauseVehicleSupported && _vehicleFlying && !_vehiclePaused && !_fixedWingOnApproach
property bool showChangeAlt: _guidedActionsEnabled && _vehicleFlying && activeVehicle.guidedModeSupported && _vehicleArmed && !_missionActive property bool showChangeAlt: _guidedActionsEnabled && _vehicleFlying && _activeVehicle.guidedModeSupported && _vehicleArmed && !_missionActive
property bool showOrbit: _guidedActionsEnabled && _vehicleFlying && __orbitSupported && !_missionActive property bool showOrbit: _guidedActionsEnabled && _vehicleFlying && __orbitSupported && !_missionActive
property bool showROI: _guidedActionsEnabled && _vehicleFlying && __roiSupported && !_missionActive property bool showROI: _guidedActionsEnabled && _vehicleFlying && __roiSupported && !_missionActive
property bool showLandAbort: _guidedActionsEnabled && _vehicleFlying && _fixedWingOnApproach property bool showLandAbort: _guidedActionsEnabled && _vehicleFlying && _fixedWingOnApproach
...@@ -123,19 +124,19 @@ Item { ...@@ -123,19 +124,19 @@ Item {
property bool showActionList: _guidedActionsEnabled && (showStartMission || showResumeMission || showChangeAlt || showLandAbort) property bool showActionList: _guidedActionsEnabled && (showStartMission || showResumeMission || showChangeAlt || showLandAbort)
// Note: The '_missionItemCount - 2' is a hack to not trigger resume mission when a mission ends with an RTL item // Note: The '_missionItemCount - 2' is a hack to not trigger resume mission when a mission ends with an RTL item
property bool showResumeMission: activeVehicle && !_vehicleArmed && _vehicleWasFlying && _missionAvailable && _resumeMissionIndex > 0 && (_resumeMissionIndex < _missionItemCount - 2) property bool showResumeMission: _activeVehicle && !_vehicleArmed && _vehicleWasFlying && _missionAvailable && _resumeMissionIndex > 0 && (_resumeMissionIndex < _missionItemCount - 2)
property bool guidedUIVisible: confirmDialog.visible || actionList.visible property bool guidedUIVisible: confirmDialog.visible || actionList.visible
property var _corePlugin: QGroundControl.corePlugin property var _corePlugin: QGroundControl.corePlugin
property var _corePluginOptions: QGroundControl.corePlugin.options property var _corePluginOptions: QGroundControl.corePlugin.options
property bool _guidedActionsEnabled: (!ScreenTools.isDebug && _corePluginOptions.guidedActionsRequireRCRSSI && activeVehicle) ? _rcRSSIAvailable : activeVehicle property bool _guidedActionsEnabled: (!ScreenTools.isDebug && _corePluginOptions.guidedActionsRequireRCRSSI && _activeVehicle) ? _rcRSSIAvailable : _activeVehicle
property string _flightMode: activeVehicle ? activeVehicle.flightMode : "" property string _flightMode: _activeVehicle ? _activeVehicle.flightMode : ""
property bool _missionAvailable: missionController.containsItems property bool _missionAvailable: missionController.containsItems
property bool _missionActive: activeVehicle ? _vehicleArmed && (_vehicleInLandMode || _vehicleInRTLMode || _vehicleInMissionMode) : false property bool _missionActive: _activeVehicle ? _vehicleArmed && (_vehicleInLandMode || _vehicleInRTLMode || _vehicleInMissionMode) : false
property bool _vehicleArmed: activeVehicle ? activeVehicle.armed : false property bool _vehicleArmed: _activeVehicle ? _activeVehicle.armed : false
property bool _vehicleFlying: activeVehicle ? activeVehicle.flying : false property bool _vehicleFlying: _activeVehicle ? _activeVehicle.flying : false
property bool _vehicleLanding: activeVehicle ? activeVehicle.landing : false property bool _vehicleLanding: _activeVehicle ? _activeVehicle.landing : false
property bool _vehiclePaused: false property bool _vehiclePaused: false
property bool _vehicleInMissionMode: false property bool _vehicleInMissionMode: false
property bool _vehicleInRTLMode: false property bool _vehicleInRTLMode: false
...@@ -147,28 +148,23 @@ Item { ...@@ -147,28 +148,23 @@ Item {
property bool _hideOrbit: !_corePluginOptions.flyView.guidedBarShowOrbit property bool _hideOrbit: !_corePluginOptions.flyView.guidedBarShowOrbit
property bool _hideROI: !_corePluginOptions.flyView.guidedBarShowROI property bool _hideROI: !_corePluginOptions.flyView.guidedBarShowROI
property bool _vehicleWasFlying: false property bool _vehicleWasFlying: false
property bool _rcRSSIAvailable: activeVehicle ? activeVehicle.rcRSSI > 0 && activeVehicle.rcRSSI <= 100 : false property bool _rcRSSIAvailable: _activeVehicle ? _activeVehicle.rcRSSI > 0 && _activeVehicle.rcRSSI <= 100 : false
property bool _fixedWingOnApproach: activeVehicle ? activeVehicle.fixedWing && _vehicleLanding : false property bool _fixedWingOnApproach: _activeVehicle ? _activeVehicle.fixedWing && _vehicleLanding : false
// You can turn on log output for GuidedActionsController by turning on GuidedActionsControllerLog category // You can turn on log output for GuidedActionsController by turning on GuidedActionsControllerLog category
property bool __guidedModeSupported: activeVehicle ? activeVehicle.guidedModeSupported : false property bool __guidedModeSupported: _activeVehicle ? _activeVehicle.guidedModeSupported : false
property bool __pauseVehicleSupported: activeVehicle ? activeVehicle.pauseVehicleSupported : false property bool __pauseVehicleSupported: _activeVehicle ? _activeVehicle.pauseVehicleSupported : false
property bool __roiSupported: activeVehicle ? !_hideROI && activeVehicle.roiModeSupported : false property bool __roiSupported: _activeVehicle ? !_hideROI && _activeVehicle.roiModeSupported : false
property bool __orbitSupported: activeVehicle ? !_hideOrbit && activeVehicle.orbitModeSupported : false property bool __orbitSupported: _activeVehicle ? !_hideOrbit && _activeVehicle.orbitModeSupported : false
property bool __flightMode: _flightMode property bool __flightMode: _flightMode
function _outputState() { function _outputState() {
if (_corePlugin.guidedActionsControllerLogging()) { if (_corePlugin.guidedActionsControllerLogging()) {
console.log(qsTr("activeVehicle(%1) _vehicleArmed(%2) guidedModeSupported(%3) _vehicleFlying(%4) _vehicleWasFlying(%5) _vehicleInRTLMode(%6) pauseVehicleSupported(%7) _vehiclePaused(%8) _flightMode(%9) _missionItemCount(%10) roiSupported(%11) orbitSupported(%12) _missionActive(%13) _hideROI(%14) _hideOrbit(%15)").arg(activeVehicle ? 1 : 0).arg(_vehicleArmed ? 1 : 0).arg(__guidedModeSupported ? 1 : 0).arg(_vehicleFlying ? 1 : 0).arg(_vehicleWasFlying ? 1 : 0).arg(_vehicleInRTLMode ? 1 : 0).arg(__pauseVehicleSupported ? 1 : 0).arg(_vehiclePaused ? 1 : 0).arg(_flightMode).arg(_missionItemCount).arg(__roiSupported).arg(__orbitSupported).arg(_missionActive).arg(_hideROI).arg(_hideOrbit)) console.log(qsTr("_activeVehicle(%1) _vehicleArmed(%2) guidedModeSupported(%3) _vehicleFlying(%4) _vehicleWasFlying(%5) _vehicleInRTLMode(%6) pauseVehicleSupported(%7) _vehiclePaused(%8) _flightMode(%9) _missionItemCount(%10) roiSupported(%11) orbitSupported(%12) _missionActive(%13) _hideROI(%14) _hideOrbit(%15)").arg(_activeVehicle ? 1 : 0).arg(_vehicleArmed ? 1 : 0).arg(__guidedModeSupported ? 1 : 0).arg(_vehicleFlying ? 1 : 0).arg(_vehicleWasFlying ? 1 : 0).arg(_vehicleInRTLMode ? 1 : 0).arg(__pauseVehicleSupported ? 1 : 0).arg(_vehiclePaused ? 1 : 0).arg(_flightMode).arg(_missionItemCount).arg(__roiSupported).arg(__orbitSupported).arg(_missionActive).arg(_hideROI).arg(_hideOrbit))
} }
} }
Connections { on_ActiveVehicleChanged: _outputState()
target: mainWindow
onActiveVehicleChanged: {
_outputState()
}
}
Component.onCompleted: _outputState() Component.onCompleted: _outputState()
on_VehicleArmedChanged: _outputState() on_VehicleArmedChanged: _outputState()
...@@ -264,10 +260,10 @@ Item { ...@@ -264,10 +260,10 @@ Item {
property var _actionData property var _actionData
on_FlightModeChanged: { on_FlightModeChanged: {
_vehiclePaused = activeVehicle ? _flightMode === activeVehicle.pauseFlightMode : false _vehiclePaused = _activeVehicle ? _flightMode === _activeVehicle.pauseFlightMode : false
_vehicleInRTLMode = activeVehicle ? _flightMode === activeVehicle.rtlFlightMode || _flightMode === activeVehicle.smartRTLFlightMode : false _vehicleInRTLMode = _activeVehicle ? _flightMode === _activeVehicle.rtlFlightMode || _flightMode === _activeVehicle.smartRTLFlightMode : false
_vehicleInLandMode = activeVehicle ? _flightMode === activeVehicle.landFlightMode : false _vehicleInLandMode = _activeVehicle ? _flightMode === _activeVehicle.landFlightMode : false
_vehicleInMissionMode = activeVehicle ? _flightMode === activeVehicle.missionFlightMode : false // Must be last to get correct signalling for showStartMission popups _vehicleInMissionMode = _activeVehicle ? _flightMode === _activeVehicle.missionFlightMode : false // Must be last to get correct signalling for showStartMission popups
} }
Connections { Connections {
...@@ -392,7 +388,7 @@ Item { ...@@ -392,7 +388,7 @@ Item {
case actionRTL: case actionRTL:
confirmDialog.title = rtlTitle confirmDialog.title = rtlTitle
confirmDialog.message = rtlMessage confirmDialog.message = rtlMessage
if (activeVehicle.supportsSmartRTL) { if (_activeVehicle.supportsSmartRTL) {
confirmDialog.optionText = qsTr("Smart RTL") confirmDialog.optionText = qsTr("Smart RTL")
confirmDialog.optionChecked = false confirmDialog.optionChecked = false
} }
...@@ -469,13 +465,13 @@ Item { ...@@ -469,13 +465,13 @@ Item {
var rgVehicle; var rgVehicle;
switch (actionCode) { switch (actionCode) {
case actionRTL: case actionRTL:
activeVehicle.guidedModeRTL(optionChecked) _activeVehicle.guidedModeRTL(optionChecked)
break break
case actionLand: case actionLand:
activeVehicle.guidedModeLand() _activeVehicle.guidedModeLand()
break break
case actionTakeoff: case actionTakeoff:
activeVehicle.guidedModeTakeoff(actionAltitudeChange) _activeVehicle.guidedModeTakeoff(actionAltitudeChange)
break break
case actionResumeMission: case actionResumeMission:
case actionResumeMissionUploadFail: case actionResumeMissionUploadFail:
...@@ -483,7 +479,7 @@ Item { ...@@ -483,7 +479,7 @@ Item {
break break
case actionStartMission: case actionStartMission:
case actionContinueMission: case actionContinueMission:
activeVehicle.startMission() _activeVehicle.startMission()
break break
case actionMVStartMission: case actionMVStartMission:
rgVehicle = QGroundControl.multiVehicleManager.vehicles rgVehicle = QGroundControl.multiVehicleManager.vehicles
...@@ -492,35 +488,35 @@ Item { ...@@ -492,35 +488,35 @@ Item {
} }
break break
case actionArm: case actionArm:
activeVehicle.armed = true _activeVehicle.armed = true
break break
case actionForceArm: case actionForceArm:
activeVehicle.forceArm() _activeVehicle.forceArm()
break break
case actionDisarm: case actionDisarm:
activeVehicle.armed = false _activeVehicle.armed = false
break break
case actionEmergencyStop: case actionEmergencyStop:
activeVehicle.emergencyStop() _activeVehicle.emergencyStop()
break break
case actionChangeAlt: case actionChangeAlt:
activeVehicle.guidedModeChangeAltitude(actionAltitudeChange) _activeVehicle.guidedModeChangeAltitude(actionAltitudeChange)
break break
case actionGoto: case actionGoto:
activeVehicle.guidedModeGotoLocation(actionData) _activeVehicle.guidedModeGotoLocation(actionData)
break break
case actionSetWaypoint: case actionSetWaypoint:
activeVehicle.setCurrentMissionSequence(actionData) _activeVehicle.setCurrentMissionSequence(actionData)
break break
case actionOrbit: case actionOrbit:
activeVehicle.guidedModeOrbit(orbitMapCircle.center, orbitMapCircle.radius() * (orbitMapCircle.clockwiseRotation ? 1 : -1), activeVehicle.altitudeAMSL.rawValue + actionAltitudeChange) _activeVehicle.guidedModeOrbit(orbitMapCircle.center, orbitMapCircle.radius() * (orbitMapCircle.clockwiseRotation ? 1 : -1), _activeVehicle.altitudeAMSL.rawValue + actionAltitudeChange)
break break
case actionLandAbort: case actionLandAbort:
activeVehicle.abortLanding(50) // hardcoded value for climbOutAltitude that is currently ignored _activeVehicle.abortLanding(50) // hardcoded value for climbOutAltitude that is currently ignored
break break
case actionPause: case actionPause:
activeVehicle.pauseVehicle() _activeVehicle.pauseVehicle()
activeVehicle.guidedModeChangeAltitude(actionAltitudeChange) _activeVehicle.guidedModeChangeAltitude(actionAltitudeChange)
break break
case actionMVPause: case actionMVPause:
rgVehicle = QGroundControl.multiVehicleManager.vehicles rgVehicle = QGroundControl.multiVehicleManager.vehicles
...@@ -529,13 +525,13 @@ Item { ...@@ -529,13 +525,13 @@ Item {
} }
break break
case actionVtolTransitionToFwdFlight: case actionVtolTransitionToFwdFlight:
activeVehicle.vtolInFwdFlight = true _activeVehicle.vtolInFwdFlight = true
break break
case actionVtolTransitionToMRFlight: case actionVtolTransitionToMRFlight:
activeVehicle.vtolInFwdFlight = false _activeVehicle.vtolInFwdFlight = false
break break
case actionROI: case actionROI:
activeVehicle.guidedModeROI(actionData) _activeVehicle.guidedModeROI(actionData)
break break
default: default:
console.warn(qsTr("Internal error: unknown actionCode"), actionCode) console.warn(qsTr("Internal error: unknown actionCode"), actionCode)
......
...@@ -21,12 +21,13 @@ Rectangle { ...@@ -21,12 +21,13 @@ Rectangle {
readonly property real _maxAlt: 121.92 // 400 feet readonly property real _maxAlt: 121.92 // 400 feet
readonly property real _minAlt: 3 readonly property real _minAlt: 3
property var _activeVehicle: QGroundControl.multiVehicleManager.activeVehicle
property var _flyViewSettings: QGroundControl.settingsManager.flyViewSettings property var _flyViewSettings: QGroundControl.settingsManager.flyViewSettings
property real _vehicleAltitude: activeVehicle ? activeVehicle.altitudeRelative.rawValue : 0 property real _vehicleAltitude: _activeVehicle ? _activeVehicle.altitudeRelative.rawValue : 0
property bool _fixedWing: activeVehicle ? activeVehicle.fixedWing : false property bool _fixedWing: _activeVehicle ? _activeVehicle.fixedWing : false
property real _sliderMaxAlt: _flyViewSettings ? _flyViewSettings.guidedMaximumAltitude.rawValue : 0 property real _sliderMaxAlt: _flyViewSettings ? _flyViewSettings.guidedMaximumAltitude.rawValue : 0
property real _sliderMinAlt: _flyViewSettings ? _flyViewSettings.guidedMinimumAltitude.rawValue : 0 property real _sliderMinAlt: _flyViewSettings ? _flyViewSettings.guidedMinimumAltitude.rawValue : 0
property bool _flying: activeVehicle ? activeVehicle.flying : false property bool _flying: _activeVehicle ? _activeVehicle.flying : false
function reset() { function reset() {
altSlider.value = 0 altSlider.value = 0
...@@ -77,7 +78,7 @@ Rectangle { ...@@ -77,7 +78,7 @@ Rectangle {
property string newAltitudeAppUnits: QGroundControl.unitsConversion.metersToAppSettingsHorizontalDistanceUnits(newAltitudeMeters).toFixed(1) property string newAltitudeAppUnits: QGroundControl.unitsConversion.metersToAppSettingsHorizontalDistanceUnits(newAltitudeMeters).toFixed(1)
function setToMinimumTakeoff() { function setToMinimumTakeoff() {
altSlider.value = Math.pow(activeVehicle.minimumTakeoffAltitude() / altGainRange, 1.0/3.0) altSlider.value = Math.pow(_activeVehicle.minimumTakeoffAltitude() / altGainRange, 1.0/3.0)
} }
} }
} }
......
...@@ -13,7 +13,7 @@ ToolStripAction { ...@@ -13,7 +13,7 @@ ToolStripAction {
property int actionID property int actionID
property string message property string message
property var _guidedController: mainWindow.guidedControllerFlyView property var _guidedController: globals.guidedControllerFlyView
onTriggered: { onTriggered: {
_guidedController.closeAll() _guidedController.closeAll()
......
...@@ -23,7 +23,7 @@ Item { ...@@ -23,7 +23,7 @@ Item {
property real _widgetHeight: ScreenTools.defaultFontPixelHeight * 3 property real _widgetHeight: ScreenTools.defaultFontPixelHeight * 3
property color _textColor: "black" property color _textColor: "black"
property real _rectOpacity: 0.8 property real _rectOpacity: 0.8
property var _guidedController: mainWindow.guidedControllerFlyView property var _guidedController: globals.guidedControllerFlyView
QGCPalette { id: qgcPal } QGCPalette { id: qgcPal }
......
...@@ -25,7 +25,7 @@ PreFlightCheckButton { ...@@ -25,7 +25,7 @@ PreFlightCheckButton {
property int failurePercent: 40 property int failurePercent: 40
property bool allowFailurePercentOverride: false property bool allowFailurePercentOverride: false
property var _batteryValue: activeVehicle ? activeVehicle.battery.percentRemaining.value : 0 property var _batteryValue: globals.activeVehicle ? globals.activeVehicle.battery.percentRemaining.value : 0
property var _batPercentRemaining: isNaN(_batteryValue) ? 0 : _batteryValue property var _batPercentRemaining: isNaN(_batteryValue) ? 0 : _batteryValue
property bool _batLow: _batPercentRemaining < failurePercent property bool _batLow: _batPercentRemaining < failurePercent
} }
...@@ -19,7 +19,7 @@ import QGroundControl.Vehicle 1.0 ...@@ -19,7 +19,7 @@ import QGroundControl.Vehicle 1.0
Rectangle { Rectangle {
width: mainColumn.width + ScreenTools.defaultFontPixelWidth * 3 width: mainColumn.width + ScreenTools.defaultFontPixelWidth * 3
height: Math.min(mainWindow.availableHeight - (_verticalMargin * 2), mainColumn.height + ScreenTools.defaultFontPixelHeight) height: Math.min(mainWindow.height - (_verticalMargin * 2), mainColumn.height + ScreenTools.defaultFontPixelHeight)
color: qgcPal.windowShade color: qgcPal.windowShade
radius: 3 radius: 3
...@@ -31,7 +31,7 @@ Rectangle { ...@@ -31,7 +31,7 @@ Rectangle {
} }
property bool allChecksPassed: false property bool allChecksPassed: false
property var vehicleCopy: activeVehicle property var vehicleCopy: globals.activeVehicle
onVehicleCopyChanged: { onVehicleCopyChanged: {
checkListRepeater.model.reset() checkListRepeater.model.reset()
...@@ -39,9 +39,9 @@ Rectangle { ...@@ -39,9 +39,9 @@ Rectangle {
onAllChecksPassedChanged: { onAllChecksPassedChanged: {
if (allChecksPassed) { if (allChecksPassed) {
activeVehicle.checkListState = Vehicle.CheckListPassed globals.activeVehicle.checkListState = Vehicle.CheckListPassed
} else { } else {
activeVehicle.checkListState = Vehicle.CheckListFailed globals.activeVehicle.checkListState = Vehicle.CheckListFailed
} }
} }
...@@ -71,7 +71,7 @@ Rectangle { ...@@ -71,7 +71,7 @@ Rectangle {
//-- Pick a checklist model that matches the current airframe type (if any) //-- Pick a checklist model that matches the current airframe type (if any)
function _updateModel() { function _updateModel() {
var vehicle = activeVehicle var vehicle = globals.activeVehicle
if (!vehicle) { if (!vehicle) {
vehicle = QGroundControl.multiVehicleManager.offlineEditingVehicle vehicle = QGroundControl.multiVehicleManager.offlineEditingVehicle
} }
...@@ -97,7 +97,7 @@ Rectangle { ...@@ -97,7 +97,7 @@ Rectangle {
} }
onVisibleChanged: { onVisibleChanged: {
if(activeVehicle) { if(globals.activeVehicle) {
if(visible) { if(visible) {
_updateModel() _updateModel()
} }
......
...@@ -24,8 +24,8 @@ PreFlightCheckButton { ...@@ -24,8 +24,8 @@ PreFlightCheckButton {
property bool allowOverrideSatCount: false ///< true: sat count above failureSatCount reguired to pass, false: user can click past satCount <= failureSetCount property bool allowOverrideSatCount: false ///< true: sat count above failureSatCount reguired to pass, false: user can click past satCount <= failureSetCount
property int failureSatCount: -1 ///< -1 indicates no sat count check property int failureSatCount: -1 ///< -1 indicates no sat count check
property bool _3dLock: activeVehicle ? activeVehicle.gps.lock.rawValue >= 3 : false property bool _3dLock: globals.activeVehicle ? globals.activeVehicle.gps.lock.rawValue >= 3 : false
property int _satCount: activeVehicle ? activeVehicle.gps.count.rawValue : 0 property int _satCount: globals.activeVehicle ? globals.activeVehicle.gps.count.rawValue : 0
property bool _3dLockFailure: !_3dLock property bool _3dLockFailure: !_3dLock
property bool _satCountFailure: failureSatCount !== -1 && _satCount <= failureSatCount property bool _satCountFailure: failureSatCount !== -1 && _satCount <= failureSatCount
property string _satCountFailureText: allowOverrideSatCount ? qsTr("Warning - Sat count below %1.").arg(failureSatCount + 1) : qsTr("Waiting for sat count above %1.").arg(failureSatCount) property string _satCountFailureText: allowOverrideSatCount ? qsTr("Warning - Sat count below %1.").arg(failureSatCount + 1) : qsTr("Waiting for sat count above %1.").arg(failureSatCount)
......
...@@ -19,5 +19,5 @@ PreFlightCheckButton { ...@@ -19,5 +19,5 @@ PreFlightCheckButton {
telemetryTextFailure: qsTr("No signal or invalid autopilot-RC config. Check RC and console.") telemetryTextFailure: qsTr("No signal or invalid autopilot-RC config. Check RC and console.")
telemetryFailure: _unhealthySensors & Vehicle.SysStatusSensorRCReceiver telemetryFailure: _unhealthySensors & Vehicle.SysStatusSensorRCReceiver
property int _unhealthySensors: activeVehicle ? activeVehicle.sensorsUnhealthyBits : 0 property int _unhealthySensors: globals.activeVehicle ? globals.activeVehicle.sensorsUnhealthyBits : 0
} }
...@@ -17,7 +17,7 @@ PreFlightCheckButton { ...@@ -17,7 +17,7 @@ PreFlightCheckButton {
name: qsTr("Sensors") name: qsTr("Sensors")
telemetryFailure: _unhealthySensors & _allCheckedSensors telemetryFailure: _unhealthySensors & _allCheckedSensors
property int _unhealthySensors: activeVehicle ? activeVehicle.sensorsUnhealthyBits : 1 property int _unhealthySensors: globals.activeVehicle ? globals.activeVehicle.sensorsUnhealthyBits : 1
property int _allCheckedSensors: Vehicle.SysStatusSensor3dMag | property int _allCheckedSensors: Vehicle.SysStatusSensor3dMag |
Vehicle.SysStatusSensor3dAccel | Vehicle.SysStatusSensor3dAccel |
Vehicle.SysStatusSensor3dGyro | Vehicle.SysStatusSensor3dGyro |
......
...@@ -27,8 +27,8 @@ Item { ...@@ -27,8 +27,8 @@ Item {
running: QGroundControl.settingsManager.appSettings.virtualJoystick.value && activeVehicle running: QGroundControl.settingsManager.appSettings.virtualJoystick.value && activeVehicle
repeat: true repeat: true
onTriggered: { onTriggered: {
if (activeVehicle) { if (_activeVehicle) {
activeVehicle.virtualTabletJoystickValue(rightStick.xAxis, rightStick.yAxis, leftStick.xAxis, leftStick.yAxis) _activeVehicle.virtualTabletJoystickValue(rightStick.xAxis, rightStick.yAxis, leftStick.xAxis, leftStick.yAxis)
} }
} }
} }
......
...@@ -45,7 +45,8 @@ Map { ...@@ -45,7 +45,8 @@ Map {
readonly property real maxZoomLevel: 20 readonly property real maxZoomLevel: 20
property var activeVehicleCoordinate: activeVehicle ? activeVehicle.coordinate : QtPositioning.coordinate() property var _activeVehicle: QGroundControl.multiVehicleManager.activeVehicle
property var _activeVehicleCoordinate: _activeVehicle ? _activeVehicle.coordinate : QtPositioning.coordinate()
function setVisibleRegion(region) { function setVisibleRegion(region) {
// TODO: Is this still necessary with Qt 5.11? // TODO: Is this still necessary with Qt 5.11?
...@@ -57,9 +58,9 @@ Map { ...@@ -57,9 +58,9 @@ Map {
} }
function _possiblyCenterToVehiclePosition() { function _possiblyCenterToVehiclePosition() {
if (!firstVehiclePositionReceived && allowVehicleLocationCenter && activeVehicleCoordinate.isValid) { if (!firstVehiclePositionReceived && allowVehicleLocationCenter && _activeVehicleCoordinate.isValid) {
firstVehiclePositionReceived = true firstVehiclePositionReceived = true
center = activeVehicleCoordinate center = _activeVehicleCoordinate
zoomLevel = QGroundControl.flightMapInitialZoom zoomLevel = QGroundControl.flightMapInitialZoom
} }
} }
...@@ -81,8 +82,8 @@ Map { ...@@ -81,8 +82,8 @@ Map {
if (gcsPosition.isValid && allowGCSLocationCenter && !firstGCSPositionReceived && !firstVehiclePositionReceived) { if (gcsPosition.isValid && allowGCSLocationCenter && !firstGCSPositionReceived && !firstVehiclePositionReceived) {
firstGCSPositionReceived = true firstGCSPositionReceived = true
//-- Only center on gsc if we have no vehicle (and we are supposed to do so) //-- Only center on gsc if we have no vehicle (and we are supposed to do so)
var activeVehicleCoordinate = activeVehicle ? activeVehicle.coordinate : QtPositioning.coordinate() var _activeVehicleCoordinate = _activeVehicle ? _activeVehicle.coordinate : QtPositioning.coordinate()
if(QGroundControl.settingsManager.flyViewSettings.keepMapCenteredOnVehicle.rawValue || !activeVehicleCoordinate.isValid) if(QGroundControl.settingsManager.flyViewSettings.keepMapCenteredOnVehicle.rawValue || !_activeVehicleCoordinate.isValid)
center = gcsPosition center = gcsPosition
} }
} }
...@@ -99,7 +100,7 @@ Map { ...@@ -99,7 +100,7 @@ Map {
} }
} }
onActiveVehicleCoordinateChanged: _possiblyCenterToVehiclePosition() on_ActiveVehicleCoordinateChanged: _possiblyCenterToVehiclePosition()
Component.onCompleted: { Component.onCompleted: {
updateActiveMapType() updateActiveMapType()
......
...@@ -30,7 +30,7 @@ Item { ...@@ -30,7 +30,7 @@ Item {
property var _missionController: masterController.missionController property var _missionController: masterController.missionController
property var _geoFenceController: masterController.geoFenceController property var _geoFenceController: masterController.geoFenceController
property var _rallyPointController: masterController.rallyPointController property var _rallyPointController: masterController.rallyPointController
property var _guidedController: mainWindow.guidedControllerFlyView property var _guidedController: globals.guidedControllerFlyView
property var _missionLineViewComponent property var _missionLineViewComponent
property bool _isActiveVehicle: vehicle.active property bool _isActiveVehicle: vehicle.active
......
...@@ -221,11 +221,11 @@ DropButton { ...@@ -221,11 +221,11 @@ DropButton {
QGCButton { QGCButton {
text: qsTr("Vehicle") text: qsTr("Vehicle")
Layout.fillWidth: true Layout.fillWidth: true
enabled: activeVehicle && activeVehicle.latitude != 0 && activeVehicle.longitude != 0 && !followVehicleCheckBox.checked enabled: globals.activeVehicle && globals.activeVehicle.latitude != 0 && globals.activeVehicle.longitude != 0 && !followVehicleCheckBox.checked
onClicked: { onClicked: {
dropButton.hideDropDown() dropButton.hideDropDown()
map.center = activeVehicle.coordinate map.center = globals.activeVehicle.coordinate
} }
} }
......
...@@ -63,11 +63,11 @@ ColumnLayout { ...@@ -63,11 +63,11 @@ ColumnLayout {
QGCButton { QGCButton {
text: qsTr("Vehicle") text: qsTr("Vehicle")
Layout.fillWidth: true Layout.fillWidth: true
enabled: activeVehicle && activeVehicle.coordinate.isValid enabled: globals.activeVehicle && globals.activeVehicle.coordinate.isValid
onClicked: { onClicked: {
dropPanel.hide() dropPanel.hide()
map.center = activeVehicle.coordinate map.center = globals.activeVehicle.coordinate
} }
} }
......
...@@ -31,14 +31,15 @@ Item { ...@@ -31,14 +31,15 @@ Item {
property real size: _defaultSize property real size: _defaultSize
property var vehicle: null property var vehicle: null
property real _defaultSize: ScreenTools.defaultFontPixelHeight * (10) property var _activeVehicle: QGroundControl.multiVehicleManager.activeVehicle
property real _sizeRatio: ScreenTools.isTinyScreen ? (size / _defaultSize) * 0.5 : size / _defaultSize property real _defaultSize: ScreenTools.defaultFontPixelHeight * (10)
property int _fontSize: ScreenTools.defaultFontPointSize * _sizeRatio property real _sizeRatio: ScreenTools.isTinyScreen ? (size / _defaultSize) * 0.5 : size / _defaultSize
property real _heading: vehicle ? vehicle.heading.rawValue : 0 property int _fontSize: ScreenTools.defaultFontPointSize * _sizeRatio
property real _headingToHome: vehicle ? vehicle.headingToHome.rawValue : 0 property real _heading: vehicle ? vehicle.heading.rawValue : 0
property real _groundSpeed: vehicle ? vehicle.groundSpeed.rawValue : 0 property real _headingToHome: vehicle ? vehicle.headingToHome.rawValue : 0
property real _headingToNextWP: vehicle ? vehicle.headingToNextWP.rawValue : 0 property real _groundSpeed: vehicle ? vehicle.groundSpeed.rawValue : 0
property real _courseOverGround:activeVehicle ? activeVehicle.gps.courseOverGround.rawValue : 0 property real _headingToNextWP: vehicle ? vehicle.headingToNextWP.rawValue : 0
property real _courseOverGround: _activeVehicle ? _activeVehicle.gps.courseOverGround.rawValue : 0
property bool usedByMultipleVehicleList: false property bool usedByMultipleVehicleList: false
......
...@@ -43,7 +43,7 @@ ColumnLayout { ...@@ -43,7 +43,7 @@ ColumnLayout {
anchors.leftMargin: _topBottomMargin anchors.leftMargin: _topBottomMargin
anchors.left: parent.left anchors.left: parent.left
size: _innerRadius * 2 size: _innerRadius * 2
vehicle: activeVehicle vehicle: globals.activeVehicle
anchors.verticalCenter: parent.verticalCenter anchors.verticalCenter: parent.verticalCenter
} }
...@@ -52,7 +52,7 @@ ColumnLayout { ...@@ -52,7 +52,7 @@ ColumnLayout {
anchors.leftMargin: _spacing anchors.leftMargin: _spacing
anchors.left: attitude.right anchors.left: attitude.right
size: _innerRadius * 2 size: _innerRadius * 2
vehicle: activeVehicle vehicle: globals.activeVehicle
anchors.verticalCenter: parent.verticalCenter anchors.verticalCenter: parent.verticalCenter
} }
} }
......
...@@ -44,7 +44,7 @@ Rectangle { ...@@ -44,7 +44,7 @@ Rectangle {
anchors.margins : _margins anchors.margins : _margins
anchors.top: parent.top anchors.top: parent.top
size: _innerRadius * 2 size: _innerRadius * 2
vehicle: activeVehicle vehicle: globals.activeVehicle
} }
QGCCompassWidget { QGCCompassWidget {
...@@ -53,6 +53,6 @@ Rectangle { ...@@ -53,6 +53,6 @@ Rectangle {
anchors.margins: _margins anchors.margins: _margins
anchors.top: attitude.bottom anchors.top: attitude.bottom
size: _innerRadius * 2 size: _innerRadius * 2
vehicle: activeVehicle vehicle: globals.activeVehicle
} }
} }
...@@ -14,6 +14,7 @@ ...@@ -14,6 +14,7 @@
#include "SimpleMissionItem.h" #include "SimpleMissionItem.h"
#include "PlanMasterController.h" #include "PlanMasterController.h"
#include "FlightPathSegment.h" #include "FlightPathSegment.h"
#include "TakeoffMissionItem.h"
#include <QPolygonF> #include <QPolygonF>
...@@ -29,6 +30,15 @@ LandingComplexItem::LandingComplexItem(PlanMasterController* masterController, b ...@@ -29,6 +30,15 @@ LandingComplexItem::LandingComplexItem(PlanMasterController* masterController, b
qgcApp()->addCompressedSignal(QMetaMethod::fromSignal(&LandingComplexItem::_updateFlightPathSegmentsSignal)); qgcApp()->addCompressedSignal(QMetaMethod::fromSignal(&LandingComplexItem::_updateFlightPathSegmentsSignal));
} }
void LandingComplexItem::setLandingHeadingToTakeoffHeading()
{
TakeoffMissionItem* takeoffMissionItem = _missionController->takeoffMissionItem();
if (takeoffMissionItem && takeoffMissionItem->specifiesCoordinate()) {
qreal heading = takeoffMissionItem->launchCoordinate().azimuthTo(takeoffMissionItem->coordinate());
landingHeading()->setRawValue(heading);
}
}
double LandingComplexItem::complexDistance(void) const double LandingComplexItem::complexDistance(void) const
{ {
return loiterCoordinate().distanceTo(loiterTangentCoordinate()) + loiterTangentCoordinate().distanceTo(landingCoordinate()); return loiterCoordinate().distanceTo(loiterTangentCoordinate()) + loiterTangentCoordinate().distanceTo(landingCoordinate());
......
...@@ -40,6 +40,8 @@ public: ...@@ -40,6 +40,8 @@ public:
Q_PROPERTY(QGeoCoordinate landingCoordinate READ landingCoordinate WRITE setLandingCoordinate NOTIFY landingCoordinateChanged) Q_PROPERTY(QGeoCoordinate landingCoordinate READ landingCoordinate WRITE setLandingCoordinate NOTIFY landingCoordinateChanged)
Q_PROPERTY(bool landingCoordSet MEMBER _landingCoordSet NOTIFY landingCoordSetChanged) Q_PROPERTY(bool landingCoordSet MEMBER _landingCoordSet NOTIFY landingCoordSetChanged)
Q_INVOKABLE void setLandingHeadingToTakeoffHeading();
virtual Fact* loiterAltitude (void) = 0; virtual Fact* loiterAltitude (void) = 0;
virtual Fact* loiterRadius (void) = 0; virtual Fact* loiterRadius (void) = 0;
virtual Fact* landingAltitude (void) = 0; virtual Fact* landingAltitude (void) = 0;
......
...@@ -166,6 +166,7 @@ void MissionController::_newMissionItemsAvailableFromVehicle(bool removeAllReque ...@@ -166,6 +166,7 @@ void MissionController::_newMissionItemsAvailableFromVehicle(bool removeAllReque
_visualItems->deleteLater(); _visualItems->deleteLater();
_visualItems = nullptr; _visualItems = nullptr;
_settingsItem = nullptr; _settingsItem = nullptr;
_takeoffMissionItem = nullptr;
_updateContainsItems(); // This will clear containsItems which will be set again below. This will re-pop Start Mission confirmation. _updateContainsItems(); // This will clear containsItems which will be set again below. This will re-pop Start Mission confirmation.
QmlObjectListModel* newControllerMissionItems = new QmlObjectListModel(this); QmlObjectListModel* newControllerMissionItems = new QmlObjectListModel(this);
...@@ -192,9 +193,9 @@ void MissionController::_newMissionItemsAvailableFromVehicle(bool removeAllReque ...@@ -192,9 +193,9 @@ void MissionController::_newMissionItemsAvailableFromVehicle(bool removeAllReque
SimpleMissionItem* simpleItem = new SimpleMissionItem(_masterController, _flyView, *missionItem, this); SimpleMissionItem* simpleItem = new SimpleMissionItem(_masterController, _flyView, *missionItem, this);
if (TakeoffMissionItem::isTakeoffCommand(static_cast<MAV_CMD>(simpleItem->command()))) { if (TakeoffMissionItem::isTakeoffCommand(static_cast<MAV_CMD>(simpleItem->command()))) {
// This needs to be a TakeoffMissionItem // This needs to be a TakeoffMissionItem
TakeoffMissionItem* takeoffItem = new TakeoffMissionItem(*missionItem, _masterController, _flyView, settingsItem, this); _takeoffMissionItem = new TakeoffMissionItem(*missionItem, _masterController, _flyView, settingsItem, this);
simpleItem->deleteLater(); simpleItem->deleteLater();
simpleItem = takeoffItem; simpleItem = _takeoffMissionItem;
} }
newControllerMissionItems->append(simpleItem); newControllerMissionItems->append(simpleItem);
} }
...@@ -359,34 +360,34 @@ VisualMissionItem* MissionController::insertSimpleMissionItem(QGeoCoordinate coo ...@@ -359,34 +360,34 @@ VisualMissionItem* MissionController::insertSimpleMissionItem(QGeoCoordinate coo
VisualMissionItem* MissionController::insertTakeoffItem(QGeoCoordinate /*coordinate*/, int visualItemIndex, bool makeCurrentItem) VisualMissionItem* MissionController::insertTakeoffItem(QGeoCoordinate /*coordinate*/, int visualItemIndex, bool makeCurrentItem)
{ {
int sequenceNumber = _nextSequenceNumber(); int sequenceNumber = _nextSequenceNumber();
TakeoffMissionItem * newItem = new TakeoffMissionItem(_controllerVehicle->vtol() ? MAV_CMD_NAV_VTOL_TAKEOFF : MAV_CMD_NAV_TAKEOFF, _masterController, _flyView, _settingsItem, this); _takeoffMissionItem = new TakeoffMissionItem(_controllerVehicle->vtol() ? MAV_CMD_NAV_VTOL_TAKEOFF : MAV_CMD_NAV_TAKEOFF, _masterController, _flyView, _settingsItem, this);
newItem->setSequenceNumber(sequenceNumber); _takeoffMissionItem->setSequenceNumber(sequenceNumber);
_initVisualItem(newItem); _initVisualItem(_takeoffMissionItem);
if (newItem->specifiesAltitude()) { if (_takeoffMissionItem->specifiesAltitude()) {
double prevAltitude; double prevAltitude;
int prevAltitudeMode; int prevAltitudeMode;
if (_findPreviousAltitude(visualItemIndex, &prevAltitude, &prevAltitudeMode)) { if (_findPreviousAltitude(visualItemIndex, &prevAltitude, &prevAltitudeMode)) {
newItem->altitude()->setRawValue(prevAltitude); _takeoffMissionItem->altitude()->setRawValue(prevAltitude);
newItem->setAltitudeMode(static_cast<QGroundControlQmlGlobal::AltitudeMode>(prevAltitudeMode)); _takeoffMissionItem->setAltitudeMode(static_cast<QGroundControlQmlGlobal::AltitudeMode>(prevAltitudeMode));
} }
} }
if (visualItemIndex == -1) { if (visualItemIndex == -1) {
_visualItems->append(newItem); _visualItems->append(_takeoffMissionItem);
} else { } else {
_visualItems->insert(visualItemIndex, newItem); _visualItems->insert(visualItemIndex, _takeoffMissionItem);
} }
_recalcAll(); _recalcAll();
if (makeCurrentItem) { if (makeCurrentItem) {
setCurrentPlanViewSeqNum(newItem->sequenceNumber(), true); setCurrentPlanViewSeqNum(_takeoffMissionItem->sequenceNumber(), true);
} }
_firstItemAdded(); _firstItemAdded();
return newItem; return _takeoffMissionItem;
} }
VisualMissionItem* MissionController::insertLandItem(QGeoCoordinate coordinate, int visualItemIndex, bool makeCurrentItem) VisualMissionItem* MissionController::insertLandItem(QGeoCoordinate coordinate, int visualItemIndex, bool makeCurrentItem)
...@@ -536,6 +537,10 @@ void MissionController::removeVisualItem(int viIndex) ...@@ -536,6 +537,10 @@ void MissionController::removeVisualItem(int viIndex)
bool removeSurveyStyle = _visualItems->value<SurveyComplexItem*>(viIndex) || _visualItems->value<CorridorScanComplexItem*>(viIndex); bool removeSurveyStyle = _visualItems->value<SurveyComplexItem*>(viIndex) || _visualItems->value<CorridorScanComplexItem*>(viIndex);
VisualMissionItem* item = qobject_cast<VisualMissionItem*>(_visualItems->removeAt(viIndex)); VisualMissionItem* item = qobject_cast<VisualMissionItem*>(_visualItems->removeAt(viIndex));
if (item == _takeoffMissionItem) {
_takeoffMissionItem = nullptr;
}
_deinitVisualItem(item); _deinitVisualItem(item);
item->deleteLater(); item->deleteLater();
...@@ -591,6 +596,7 @@ void MissionController::removeAll(void) ...@@ -591,6 +596,7 @@ void MissionController::removeAll(void)
_visualItems->clearAndDeleteContents(); _visualItems->clearAndDeleteContents();
_visualItems->deleteLater(); _visualItems->deleteLater();
_settingsItem = nullptr; _settingsItem = nullptr;
_takeoffMissionItem = nullptr;
_visualItems = new QmlObjectListModel(this); _visualItems = new QmlObjectListModel(this);
_addMissionSettings(_visualItems); _addMissionSettings(_visualItems);
_initAllVisualItems(); _initAllVisualItems();
...@@ -983,8 +989,9 @@ void MissionController::_initLoadedVisualItems(QmlObjectListModel* loadedVisualI ...@@ -983,8 +989,9 @@ void MissionController::_initLoadedVisualItems(QmlObjectListModel* loadedVisualI
if (_visualItems) { if (_visualItems) {
_deinitAllVisualItems(); _deinitAllVisualItems();
_visualItems->deleteLater(); _visualItems->deleteLater();
_settingsItem = nullptr;
} }
_settingsItem = nullptr;
_takeoffMissionItem = nullptr;
_visualItems = loadedVisualItems; _visualItems = loadedVisualItems;
...@@ -1859,6 +1866,11 @@ void MissionController::_initAllVisualItems(void) ...@@ -1859,6 +1866,11 @@ void MissionController::_initAllVisualItems(void)
for (int i=0; i<_visualItems->count(); i++) { for (int i=0; i<_visualItems->count(); i++) {
VisualMissionItem* item = qobject_cast<VisualMissionItem*>(_visualItems->get(i)); VisualMissionItem* item = qobject_cast<VisualMissionItem*>(_visualItems->get(i));
_initVisualItem(item); _initVisualItem(item);
TakeoffMissionItem* takeoffItem = qobject_cast<TakeoffMissionItem*>(item);
if (takeoffItem) {
_takeoffMissionItem = takeoffItem;
}
} }
_recalcAll(); _recalcAll();
......
...@@ -22,12 +22,12 @@ ...@@ -22,12 +22,12 @@
class FlightPathSegment; class FlightPathSegment;
class VisualMissionItem; class VisualMissionItem;
class MissionItem; class MissionItem;
class MissionSettingsItem;
class AppSettings; class AppSettings;
class MissionManager; class MissionManager;
class SimpleMissionItem; class SimpleMissionItem;
class ComplexMissionItem; class ComplexMissionItem;
class MissionSettingsItem; class MissionSettingsItem;
class TakeoffMissionItem;
class QDomDocument; class QDomDocument;
class PlanViewSettings; class PlanViewSettings;
...@@ -86,6 +86,7 @@ public: ...@@ -86,6 +86,7 @@ public:
Q_PROPERTY(int currentPlanViewSeqNum READ currentPlanViewSeqNum NOTIFY currentPlanViewSeqNumChanged) Q_PROPERTY(int currentPlanViewSeqNum READ currentPlanViewSeqNum NOTIFY currentPlanViewSeqNumChanged)
Q_PROPERTY(int currentPlanViewVIIndex READ currentPlanViewVIIndex NOTIFY currentPlanViewVIIndexChanged) Q_PROPERTY(int currentPlanViewVIIndex READ currentPlanViewVIIndex NOTIFY currentPlanViewVIIndexChanged)
Q_PROPERTY(VisualMissionItem* currentPlanViewItem READ currentPlanViewItem NOTIFY currentPlanViewItemChanged) Q_PROPERTY(VisualMissionItem* currentPlanViewItem READ currentPlanViewItem NOTIFY currentPlanViewItemChanged)
Q_PROPERTY(TakeoffMissionItem* takeoffMissionItem READ takeoffMissionItem NOTIFY takeoffMissionItemChanged)
Q_PROPERTY(double missionDistance READ missionDistance NOTIFY missionDistanceChanged) Q_PROPERTY(double missionDistance READ missionDistance NOTIFY missionDistanceChanged)
Q_PROPERTY(double missionTime READ missionTime NOTIFY missionTimeChanged) Q_PROPERTY(double missionTime READ missionTime NOTIFY missionTimeChanged)
Q_PROPERTY(double missionHoverDistance READ missionHoverDistance NOTIFY missionHoverDistanceChanged) Q_PROPERTY(double missionHoverDistance READ missionHoverDistance NOTIFY missionHoverDistanceChanged)
...@@ -225,6 +226,7 @@ public: ...@@ -225,6 +226,7 @@ public:
QStringList complexMissionItemNames (void) const; QStringList complexMissionItemNames (void) const;
QGeoCoordinate plannedHomePosition (void) const; QGeoCoordinate plannedHomePosition (void) const;
VisualMissionItem* currentPlanViewItem (void) const { return _currentPlanViewItem; } VisualMissionItem* currentPlanViewItem (void) const { return _currentPlanViewItem; }
TakeoffMissionItem* takeoffMissionItem (void) const { return _takeoffMissionItem; }
double progressPct (void) const { return _progressPct; } double progressPct (void) const { return _progressPct; }
QString surveyComplexItemName (void) const; QString surveyComplexItemName (void) const;
QString corridorScanComplexItemName (void) const; QString corridorScanComplexItemName (void) const;
...@@ -280,6 +282,7 @@ signals: ...@@ -280,6 +282,7 @@ signals:
void currentPlanViewSeqNumChanged (void); void currentPlanViewSeqNumChanged (void);
void currentPlanViewVIIndexChanged (void); void currentPlanViewVIIndexChanged (void);
void currentPlanViewItemChanged (void); void currentPlanViewItemChanged (void);
void takeoffMissionItemChanged (void);
void missionBoundingCubeChanged (void); void missionBoundingCubeChanged (void);
void missionItemCountChanged (int missionItemCount); void missionItemCountChanged (int missionItemCount);
void onlyInsertTakeoffValidChanged (void); void onlyInsertTakeoffValidChanged (void);
...@@ -379,6 +382,7 @@ private: ...@@ -379,6 +382,7 @@ private:
int _currentPlanViewSeqNum = -1; int _currentPlanViewSeqNum = -1;
int _currentPlanViewVIIndex = -1; int _currentPlanViewVIIndex = -1;
VisualMissionItem* _currentPlanViewItem = nullptr; VisualMissionItem* _currentPlanViewItem = nullptr;
TakeoffMissionItem* _takeoffMissionItem = nullptr;
QTimer _updateTimer; QTimer _updateTimer;
QGCGeoBoundingCube _travelBoundingCube; QGCGeoBoundingCube _travelBoundingCube;
QGeoCoordinate _takeoffCoordinate; QGeoCoordinate _takeoffCoordinate;
......
...@@ -97,8 +97,8 @@ Rectangle { ...@@ -97,8 +97,8 @@ Rectangle {
QGCButton { QGCButton {
text: _setToVehicleHeadingStr text: _setToVehicleHeadingStr
visible: activeVehicle visible: globals.activeVehicle
onClicked: missionItem.landingHeading.rawValue = activeVehicle.heading.rawValue onClicked: missionItem.landingHeading.rawValue = globals.activeVehicle.heading.rawValue
} }
} }
...@@ -167,9 +167,9 @@ Rectangle { ...@@ -167,9 +167,9 @@ Rectangle {
QGCButton { QGCButton {
text: _setToVehicleLocationStr text: _setToVehicleLocationStr
visible: activeVehicle visible: globals.activeVehicle
Layout.columnSpan: 2 Layout.columnSpan: 2
onClicked: missionItem.landingCoordinate = activeVehicle.coordinate onClicked: missionItem.landingCoordinate = globals.activeVehicle.coordinate
} }
} }
} }
...@@ -278,17 +278,18 @@ Rectangle { ...@@ -278,17 +278,18 @@ Rectangle {
anchors.right: parent.right anchors.right: parent.right
horizontalAlignment: Text.AlignHCenter horizontalAlignment: Text.AlignHCenter
text: qsTr("- or -") text: qsTr("- or -")
visible: activeVehicle visible: globals.activeVehicle
} }
QGCButton { QGCButton {
anchors.horizontalCenter: parent.horizontalCenter anchors.horizontalCenter: parent.horizontalCenter
text: _setToVehicleLocationStr text: _setToVehicleLocationStr
visible: activeVehicle visible: globals.activeVehicle
onClicked: { onClicked: {
missionItem.landingCoordinate = activeVehicle.coordinate missionItem.landingCoordinate = globals.activeVehicle.coordinate
missionItem.landingHeading.rawValue = activeVehicle.heading.rawValue missionItem.landingHeading.rawValue = globals.activeVehicle.heading.rawValue
missionItem.setLandingHeadingToTakeoffHeading()
} }
} }
} }
......
...@@ -189,6 +189,7 @@ Item { ...@@ -189,6 +189,7 @@ Item {
coordinate.longitude = coordinate.longitude.toFixed(_decimalPlaces) coordinate.longitude = coordinate.longitude.toFixed(_decimalPlaces)
coordinate.altitude = coordinate.altitude.toFixed(_decimalPlaces) coordinate.altitude = coordinate.altitude.toFixed(_decimalPlaces)
_missionItem.landingCoordinate = coordinate _missionItem.landingCoordinate = coordinate
_missionItem.setLandingHeadingToTakeoffHeading()
} }
} }
} }
......
...@@ -13,8 +13,8 @@ import QGroundControl.Palette 1.0 ...@@ -13,8 +13,8 @@ import QGroundControl.Palette 1.0
Item { Item {
width: missionStats.width + _margins width: missionStats.width + _margins
property var _planMasterController: mainWindow.planMasterControllerPlanView property var _planMasterController: globals.planMasterControllerPlanView
property var _currentMissionItem: mainWindow.currentPlanMissionItem ///< Mission item to display status for property var _currentMissionItem: globals.currentPlanMissionItem ///< Mission item to display status for
property var missionItems: _controllerValid ? _planMasterController.missionController.visualItems : undefined property var missionItems: _controllerValid ? _planMasterController.missionController.visualItems : undefined
property real missionDistance: _controllerValid ? _planMasterController.missionController.missionDistance : NaN property real missionDistance: _controllerValid ? _planMasterController.missionController.missionDistance : NaN
......
...@@ -218,7 +218,7 @@ Item { ...@@ -218,7 +218,7 @@ Item {
Component.onCompleted: { Component.onCompleted: {
_planMasterController.start() _planMasterController.start()
_missionController.setCurrentPlanViewSeqNum(0, true) _missionController.setCurrentPlanViewSeqNum(0, true)
mainWindow.planMasterControllerPlanView = _planMasterController globals.planMasterControllerPlanView = _planMasterController
} }
onPromptForPlanUsageOnVehicleChange: { onPromptForPlanUsageOnVehicleChange: {
...@@ -1040,7 +1040,7 @@ Item { ...@@ -1040,7 +1040,7 @@ Item {
id: unsavedChangedLabel id: unsavedChangedLabel
Layout.fillWidth: true Layout.fillWidth: true
wrapMode: Text.WordWrap wrapMode: Text.WordWrap
text: activeVehicle ? text: globals.activeVehicle ?
qsTr("You have unsaved changes. You should upload to your vehicle, or save to a file.") : qsTr("You have unsaved changes. You should upload to your vehicle, or save to a file.") :
qsTr("You have unsaved changes.") qsTr("You have unsaved changes.")
visible: _planMasterController.dirty visible: _planMasterController.dirty
......
...@@ -105,8 +105,8 @@ Rectangle { ...@@ -105,8 +105,8 @@ Rectangle {
QGCButton { QGCButton {
text: _setToVehicleHeadingStr text: _setToVehicleHeadingStr
visible: activeVehicle visible: globals.activeVehicle
onClicked: missionItem.landingHeading.rawValue = activeVehicle.heading.rawValue onClicked: missionItem.landingHeading.rawValue = globals.activeVehicle.heading.rawValue
} }
} }
...@@ -154,9 +154,9 @@ Rectangle { ...@@ -154,9 +154,9 @@ Rectangle {
QGCButton { QGCButton {
text: _setToVehicleLocationStr text: _setToVehicleLocationStr
visible: activeVehicle visible: globals.activeVehicle
Layout.columnSpan: 2 Layout.columnSpan: 2
onClicked: missionItem.landingCoordinate = activeVehicle.coordinate onClicked: missionItem.landingCoordinate = globals.activeVehicle.coordinate
} }
} }
} }
...@@ -265,17 +265,18 @@ Rectangle { ...@@ -265,17 +265,18 @@ Rectangle {
anchors.right: parent.right anchors.right: parent.right
horizontalAlignment: Text.AlignHCenter horizontalAlignment: Text.AlignHCenter
text: qsTr("- or -") text: qsTr("- or -")
visible: activeVehicle visible: globals.activeVehicle
} }
QGCButton { QGCButton {
anchors.horizontalCenter: parent.horizontalCenter anchors.horizontalCenter: parent.horizontalCenter
text: _setToVehicleLocationStr text: _setToVehicleLocationStr
visible: activeVehicle visible: globals.activeVehicle
onClicked: { onClicked: {
missionItem.landingCoordinate = activeVehicle.coordinate missionItem.landingCoordinate = globals.activeVehicle.coordinate
missionItem.landingHeading.rawValue = activeVehicle.heading.rawValue missionItem.landingHeading.rawValue = globals.activeVehicle.heading.rawValue
missionItem.setLandingHeadingToTakeoffHeading()
} }
} }
} }
......
...@@ -159,6 +159,7 @@ Item { ...@@ -159,6 +159,7 @@ Item {
coordinate.longitude = coordinate.longitude.toFixed(_decimalPlaces) coordinate.longitude = coordinate.longitude.toFixed(_decimalPlaces)
coordinate.altitude = coordinate.altitude.toFixed(_decimalPlaces) coordinate.altitude = coordinate.altitude.toFixed(_decimalPlaces)
_missionItem.landingCoordinate = coordinate _missionItem.landingCoordinate = coordinate
_missionItem.setLandingHeadingToTakeoffHeading()
} }
} }
} }
......
...@@ -449,6 +449,9 @@ void QGCApplication::setLanguage() ...@@ -449,6 +449,9 @@ void QGCApplication::setLanguage()
case 19: case 19:
_locale = QLocale(QLocale::Turkish); _locale = QLocale(QLocale::Turkish);
break; break;
case 20:
_locale = QLocale(QLocale::Azerbaijani);
break;
} }
} }
//-- We have specific fonts for Korean //-- We have specific fonts for Korean
...@@ -783,7 +786,7 @@ QObject* QGCApplication::_rootQmlObject() ...@@ -783,7 +786,7 @@ QObject* QGCApplication::_rootQmlObject()
return nullptr; return nullptr;
} }
void QGCApplication::showVehicleMessage(const QString& message) void QGCApplication::showCriticalVehicleMessage(const QString& message)
{ {
// PreArm messages are handled by Vehicle and shown in Map // PreArm messages are handled by Vehicle and shown in Map
if (message.startsWith(QStringLiteral("PreArm")) || message.startsWith(QStringLiteral("preflight"), Qt::CaseInsensitive)) { if (message.startsWith(QStringLiteral("PreArm")) || message.startsWith(QStringLiteral("preflight"), Qt::CaseInsensitive)) {
...@@ -793,10 +796,10 @@ void QGCApplication::showVehicleMessage(const QString& message) ...@@ -793,10 +796,10 @@ void QGCApplication::showVehicleMessage(const QString& message)
if (rootQmlObject) { if (rootQmlObject) {
QVariant varReturn; QVariant varReturn;
QVariant varMessage = QVariant::fromValue(message); QVariant varMessage = QVariant::fromValue(message);
QMetaObject::invokeMethod(_rootQmlObject(), "showVehicleMessage", Q_RETURN_ARG(QVariant, varReturn), Q_ARG(QVariant, varMessage)); QMetaObject::invokeMethod(_rootQmlObject(), "showCriticalVehicleMessage", Q_RETURN_ARG(QVariant, varReturn), Q_ARG(QVariant, varMessage));
} else if (runningUnitTests()) { } else if (runningUnitTests()) {
// Unit tests can run without UI // Unit tests can run without UI
qDebug() << "QGCApplication::showVehicleMessage unittest" << message; qDebug() << "QGCApplication::showCriticalVehicleMessage unittest" << message;
} else { } else {
qWarning() << "Internal error"; qWarning() << "Internal error";
} }
......
...@@ -78,7 +78,7 @@ public: ...@@ -78,7 +78,7 @@ public:
void reportMissingParameter(int componentId, const QString& name); void reportMissingParameter(int componentId, const QString& name);
/// Show non-modal vehicle message to the user /// Show non-modal vehicle message to the user
Q_SLOT void showVehicleMessage(const QString& message); Q_SLOT void showCriticalVehicleMessage(const QString& message);
/// Show modal application message to the user /// Show modal application message to the user
Q_SLOT void showAppMessage(const QString& message, const QString& title = QString()); Q_SLOT void showAppMessage(const QString& message, const QString& title = QString());
......
...@@ -15,7 +15,7 @@ Rectangle { ...@@ -15,7 +15,7 @@ Rectangle {
property var _logReplayLink: null property var _logReplayLink: null
function pickLogFile() { function pickLogFile() {
if (mainWindow.activeVehicle) { if (globals.activeVehicle) {
mainWindow.showMessageDialog(qsTr("Log Replay"), qsTr("You must close all connections prior to replaying a log.")) mainWindow.showMessageDialog(qsTr("Log Replay"), qsTr("You must close all connections prior to replaying a log."))
return return
} }
......
...@@ -27,18 +27,18 @@ RowLayout { ...@@ -27,18 +27,18 @@ RowLayout {
property real _chartHeight: ScreenTools.defaultFontPixelHeight * 20 property real _chartHeight: ScreenTools.defaultFontPixelHeight * 20
property real _margins: ScreenTools.defaultFontPixelHeight / 2 property real _margins: ScreenTools.defaultFontPixelHeight / 2
property string _currentTuneType: tuneList[0] property string _currentTuneType: tuneList[0]
property real _roll: activeVehicle.roll.value property real _roll: globals.activeVehicle.roll.value
property real _rollSetpoint: activeVehicle.setpoint.roll.value property real _rollSetpoint: globals.activeVehicle.setpoint.roll.value
property real _rollRate: activeVehicle.rollRate.value property real _rollRate: globals.activeVehicle.rollRate.value
property real _rollRateSetpoint: activeVehicle.setpoint.rollRate.value property real _rollRateSetpoint: globals.activeVehicle.setpoint.rollRate.value
property real _pitch: activeVehicle.pitch.value property real _pitch: globals.activeVehicle.pitch.value
property real _pitchSetpoint: activeVehicle.setpoint.pitch.value property real _pitchSetpoint: globals.activeVehicle.setpoint.pitch.value
property real _pitchRate: activeVehicle.pitchRate.value property real _pitchRate: globals.activeVehicle.pitchRate.value
property real _pitchRateSetpoint: activeVehicle.setpoint.pitchRate.value property real _pitchRateSetpoint: globals.activeVehicle.setpoint.pitchRate.value
property real _yaw: activeVehicle.heading.value property real _yaw: globals.activeVehicle.heading.value
property real _yawSetpoint: activeVehicle.setpoint.yaw.value property real _yawSetpoint: globals.activeVehicle.setpoint.yaw.value
property real _yawRate: activeVehicle.yawRate.value property real _yawRate: globals.activeVehicle.yawRate.value
property real _yawRateSetpoint: activeVehicle.setpoint.yawRate.value property real _yawRateSetpoint: globals.activeVehicle.setpoint.yawRate.value
property var _valueXAxis: valueXAxis property var _valueXAxis: valueXAxis
property var _valueRateXAxis: valueRateXAxis property var _valueRateXAxis: valueRateXAxis
property var _valueYAxis: valueYAxis property var _valueYAxis: valueYAxis
...@@ -142,11 +142,11 @@ RowLayout { ...@@ -142,11 +142,11 @@ RowLayout {
} }
Component.onCompleted: { Component.onCompleted: {
activeVehicle.setPIDTuningTelemetryMode(true) globals.activeVehicle.setPIDTuningTelemetryMode(true)
saveTuningParamValues() saveTuningParamValues()
} }
Component.onDestruction: activeVehicle.setPIDTuningTelemetryMode(false) Component.onDestruction: globals.activeVehicle.setPIDTuningTelemetryMode(false)
on_CurrentTuneTypeChanged: { on_CurrentTuneTypeChanged: {
saveTuningParamValues() saveTuningParamValues()
...@@ -369,7 +369,7 @@ RowLayout { ...@@ -369,7 +369,7 @@ RowLayout {
onClicked: { onClicked: {
dataTimer.running = !dataTimer.running dataTimer.running = !dataTimer.running
if (autoModeChange.checked) { if (autoModeChange.checked) {
activeVehicle.flightMode = dataTimer.running ? "Stabilized" : activeVehicle.pauseFlightMode globals.activeVehicle.flightMode = dataTimer.running ? "Stabilized" : globals.activeVehicle.pauseFlightMode
} }
} }
} }
...@@ -388,7 +388,7 @@ RowLayout { ...@@ -388,7 +388,7 @@ RowLayout {
} }
QGCLabel { QGCLabel {
text: qsTr("Switches to '%1' when you click Stop.").arg(activeVehicle.pauseFlightMode) text: qsTr("Switches to '%1' when you click Stop.").arg(globals.activeVehicle.pauseFlightMode)
font.pointSize: ScreenTools.smallFontPointSize font.pointSize: ScreenTools.smallFontPointSize
} }
} }
......
...@@ -112,7 +112,7 @@ Item { ...@@ -112,7 +112,7 @@ Item {
} }
QGCMenuItem { QGCMenuItem {
text: qsTr("Reset to vehicle's configuration defaults") text: qsTr("Reset to vehicle's configuration defaults")
visible: !activeVehicle.apmFirmware visible: !_activeVehicle.apmFirmware
onTriggered: mainWindow.showComponentDialog(resetToVehicleConfigurationConfirmComponent, qsTr("Reset All"), mainWindow.showDialogDefaultWidth, StandardButton.Cancel | StandardButton.Reset) onTriggered: mainWindow.showComponentDialog(resetToVehicleConfigurationConfirmComponent, qsTr("Reset All"), mainWindow.showDialogDefaultWidth, StandardButton.Cancel | StandardButton.Reset)
} }
QGCMenuSeparator { } QGCMenuSeparator { }
...@@ -345,7 +345,7 @@ Item { ...@@ -345,7 +345,7 @@ Item {
QGCViewDialog { QGCViewDialog {
function accept() { function accept() {
activeVehicle.rebootVehicle() _activeVehicle.rebootVehicle()
hideDialog() hideDialog()
} }
......
...@@ -101,7 +101,7 @@ QGCViewDialog { ...@@ -101,7 +101,7 @@ QGCViewDialog {
Column { Column {
id: _column id: _column
spacing: defaultTextHeight spacing: globals.defaultTextHeight
anchors.left: parent.left anchors.left: parent.left
anchors.right: parent.right anchors.right: parent.right
......
...@@ -249,8 +249,8 @@ ...@@ -249,8 +249,8 @@
"name": "language", "name": "language",
"shortDesc": "Language", "shortDesc": "Language",
"type": "uint32", "type": "uint32",
"enumStrings": "System,български (Bulgarian),中文 (Chinese),Nederlands (Dutch),English,Suomi (Finnish),Français (French),Deutsche (German),Ελληνικά (Greek), עברית (Hebrew),Italiano (Italian),日本人 (Japanese),한국어 (Korean),Norsk (Norwegian),Polskie (Polish),Português (Portuguese),Pусский (Russian),Español (Spanish),Svenska (Swedish),Türk (Turkish)", "enumStrings": "System,български (Bulgarian),中文 (Chinese),Nederlands (Dutch),English,Suomi (Finnish),Français (French),Deutsche (German),Ελληνικά (Greek), עברית (Hebrew),Italiano (Italian),日本人 (Japanese),한국어 (Korean),Norsk (Norwegian),Polskie (Polish),Português (Portuguese),Pусский (Russian),Español (Spanish),Svenska (Swedish),Türk (Turkish),Azerbaijani (Azerbaijani)",
"enumValues": "0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19", "enumValues": "0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20",
"default": 0 "default": 0
}, },
{ {
......
...@@ -1959,7 +1959,7 @@ bool Vehicle::xConfigMotors() ...@@ -1959,7 +1959,7 @@ bool Vehicle::xConfigMotors()
return _firmwarePlugin->multiRotorXConfig(this); return _firmwarePlugin->multiRotorXConfig(this);
} }
QString Vehicle::formatedMessages() QString Vehicle::formattedMessages()
{ {
QString messages; QString messages;
for(UASMessage* message: _toolbox->uasMessageHandler()->messages()) { for(UASMessage* message: _toolbox->uasMessageHandler()->messages()) {
...@@ -1975,10 +1975,8 @@ void Vehicle::clearMessages() ...@@ -1975,10 +1975,8 @@ void Vehicle::clearMessages()
void Vehicle::_handletextMessageReceived(UASMessage* message) void Vehicle::_handletextMessageReceived(UASMessage* message)
{ {
if(message) if (message) {
{ emit newFormattedMessage(message->getFormatedText());
_formatedMessage = message->getFormatedText();
emit formatedMessageChanged();
} }
} }
......
...@@ -149,8 +149,7 @@ public: ...@@ -149,8 +149,7 @@ public:
Q_PROPERTY(bool messageTypeError READ messageTypeError NOTIFY messageTypeChanged) Q_PROPERTY(bool messageTypeError READ messageTypeError NOTIFY messageTypeChanged)
Q_PROPERTY(int newMessageCount READ newMessageCount NOTIFY newMessageCountChanged) Q_PROPERTY(int newMessageCount READ newMessageCount NOTIFY newMessageCountChanged)
Q_PROPERTY(int messageCount READ messageCount NOTIFY messageCountChanged) Q_PROPERTY(int messageCount READ messageCount NOTIFY messageCountChanged)
Q_PROPERTY(QString formatedMessages READ formatedMessages NOTIFY formatedMessagesChanged) Q_PROPERTY(QString formattedMessages READ formattedMessages NOTIFY formattedMessagesChanged)
Q_PROPERTY(QString formatedMessage READ formatedMessage NOTIFY formatedMessageChanged)
Q_PROPERTY(QString latestError READ latestError NOTIFY latestErrorChanged) Q_PROPERTY(QString latestError READ latestError NOTIFY latestErrorChanged)
Q_PROPERTY(bool joystickEnabled READ joystickEnabled WRITE setJoystickEnabled NOTIFY joystickEnabledChanged) Q_PROPERTY(bool joystickEnabled READ joystickEnabled WRITE setJoystickEnabled NOTIFY joystickEnabledChanged)
Q_PROPERTY(bool active READ active WRITE setActive NOTIFY activeChanged) Q_PROPERTY(bool active READ active WRITE setActive NOTIFY activeChanged)
...@@ -227,7 +226,7 @@ public: ...@@ -227,7 +226,7 @@ public:
Q_PROPERTY(qreal gimbalPitch READ gimbalPitch NOTIFY gimbalPitchChanged) Q_PROPERTY(qreal gimbalPitch READ gimbalPitch NOTIFY gimbalPitchChanged)
Q_PROPERTY(qreal gimbalYaw READ gimbalYaw NOTIFY gimbalYawChanged) Q_PROPERTY(qreal gimbalYaw READ gimbalYaw NOTIFY gimbalYawChanged)
Q_PROPERTY(bool gimbalData READ gimbalData NOTIFY gimbalDataChanged) Q_PROPERTY(bool gimbalData READ gimbalData NOTIFY gimbalDataChanged)
Q_PROPERTY(bool iARDURsROIEnabled READ isROIEnabled NOTIFY isROIEnabledChanged) Q_PROPERTY(bool isROIEnabled READ isROIEnabled NOTIFY isROIEnabledChanged)
Q_PROPERTY(CheckList checkListState READ checkListState WRITE setCheckListState NOTIFY checkListStateChanged) Q_PROPERTY(CheckList checkListState READ checkListState WRITE setCheckListState NOTIFY checkListStateChanged)
Q_PROPERTY(bool readyToFlyAvailable READ readyToFlyAvailable NOTIFY readyToFlyAvailableChanged) ///< true: readyToFly signalling is available on this vehicle Q_PROPERTY(bool readyToFlyAvailable READ readyToFlyAvailable NOTIFY readyToFlyAvailableChanged) ///< true: readyToFly signalling is available on this vehicle
Q_PROPERTY(bool readyToFly READ readyToFly NOTIFY readyToFlyChanged) Q_PROPERTY(bool readyToFly READ readyToFly NOTIFY readyToFlyChanged)
...@@ -506,8 +505,7 @@ public: ...@@ -506,8 +505,7 @@ public:
bool messageTypeError () { return _currentMessageType == MessageError; } bool messageTypeError () { return _currentMessageType == MessageError; }
int newMessageCount () { return _currentMessageCount; } int newMessageCount () { return _currentMessageCount; }
int messageCount () { return _messageCount; } int messageCount () { return _messageCount; }
QString formatedMessages (); QString formattedMessages ();
QString formatedMessage () { return _formatedMessage; }
QString latestError () { return _latestError; } QString latestError () { return _latestError; }
float latitude () { return static_cast<float>(_coordinate.latitude()); } float latitude () { return static_cast<float>(_coordinate.latitude()); }
float longitude () { return static_cast<float>(_coordinate.longitude()); } float longitude () { return static_cast<float>(_coordinate.longitude()); }
...@@ -814,8 +812,8 @@ signals: ...@@ -814,8 +812,8 @@ signals:
void messageTypeChanged (); void messageTypeChanged ();
void newMessageCountChanged (); void newMessageCountChanged ();
void messageCountChanged (); void messageCountChanged ();
void formatedMessagesChanged (); void formattedMessagesChanged ();
void formatedMessageChanged (); void newFormattedMessage (QString formattedMessage);
void latestErrorChanged (); void latestErrorChanged ();
void longitudeChanged (); void longitudeChanged ();
void currentConfigChanged (); void currentConfigChanged ();
...@@ -1015,7 +1013,6 @@ private: ...@@ -1015,7 +1013,6 @@ private:
MessageType_t _currentMessageType; MessageType_t _currentMessageType;
QString _latestError; QString _latestError;
int _updateCount; int _updateCount;
QString _formatedMessage;
int _rcRSSI; int _rcRSSI;
double _rcRSSIstore; double _rcRSSIstore;
bool _autoDisconnect; ///< true: Automatically disconnect vehicle when last connection goes away or lost heartbeat bool _autoDisconnect; ///< true: Automatically disconnect vehicle when last connection goes away or lost heartbeat
......
...@@ -26,7 +26,7 @@ SetupPage { ...@@ -26,7 +26,7 @@ SetupPage {
id: firmwarePage id: firmwarePage
pageComponent: firmwarePageComponent pageComponent: firmwarePageComponent
pageName: qsTr("Firmware") pageName: qsTr("Firmware")
showAdvanced: activeVehicle && activeVehicle.apmFirmware showAdvanced: globals.activeVehicle && globals.activeVehicle.apmFirmware
Component { Component {
id: firmwarePageComponent id: firmwarePageComponent
...@@ -97,7 +97,7 @@ SetupPage { ...@@ -97,7 +97,7 @@ SetupPage {
property var activeVehicle: QGroundControl.multiVehicleManager.activeVehicle property var activeVehicle: QGroundControl.multiVehicleManager.activeVehicle
onActiveVehicleChanged: { onActiveVehicleChanged: {
if (!activeVehicle) { if (!globals.activeVehicle) {
statusTextArea.append(plugInText) statusTextArea.append(plugInText)
} }
} }
...@@ -303,7 +303,7 @@ SetupPage { ...@@ -303,7 +303,7 @@ SetupPage {
id: mainColumn id: mainColumn
anchors.left: parent.left anchors.left: parent.left
anchors.right: parent.right anchors.right: parent.right
spacing: defaultTextHeight spacing: globals.defaultTextHeight
QGCLabel { QGCLabel {
width: parent.width width: parent.width
...@@ -511,7 +511,7 @@ SetupPage { ...@@ -511,7 +511,7 @@ SetupPage {
id: flashBootloaderButton id: flashBootloaderButton
text: qsTr("Flash ChibiOS Bootloader") text: qsTr("Flash ChibiOS Bootloader")
visible: firmwarePage.advanced visible: firmwarePage.advanced
onClicked: activeVehicle.flashBootloader() onClicked: globals.activeVehicle.flashBootloader()
} }
TextArea { TextArea {
......
...@@ -59,12 +59,12 @@ Item { ...@@ -59,12 +59,12 @@ Item {
//------------------------------------------------------------- //-------------------------------------------------------------
QGCLabel { QGCLabel {
text: qsTr("Allow negative Thrust") text: qsTr("Allow negative Thrust")
visible: activeVehicle.supportsNegativeThrust visible: globals.activeVehicle.supportsNegativeThrust
Layout.alignment: Qt.AlignVCenter Layout.alignment: Qt.AlignVCenter
} }
QGCCheckBox { QGCCheckBox {
visible: activeVehicle.supportsNegativeThrust visible: globals.activeVehicle.supportsNegativeThrust
enabled: _activeJoystick.negativeThrust = activeVehicle.supportsNegativeThrust enabled: _activeJoystick.negativeThrust = globals.activeVehicle.supportsNegativeThrust
checked: _activeJoystick ? _activeJoystick.negativeThrust : false checked: _activeJoystick ? _activeJoystick.negativeThrust : false
onClicked: _activeJoystick.negativeThrust = checked onClicked: _activeJoystick.negativeThrust = checked
} }
...@@ -96,10 +96,10 @@ Item { ...@@ -96,10 +96,10 @@ Item {
} }
QGCCheckBox { QGCCheckBox {
id: advancedSettings id: advancedSettings
checked: activeVehicle.joystickMode !== 0 checked: globals.activeVehicle.joystickMode !== 0
onClicked: { onClicked: {
if (!checked) { if (!checked) {
activeVehicle.joystickMode = 0 globals.activeVehicle.joystickMode = 0
} }
} }
} }
...@@ -171,7 +171,7 @@ Item { ...@@ -171,7 +171,7 @@ Item {
visible: advancedSettings.checked visible: advancedSettings.checked
} }
QGCCheckBox { QGCCheckBox {
checked: activeVehicle.joystickMode !== 0 checked: globals.activeVehicle.joystickMode !== 0
enabled: advancedSettings.checked enabled: advancedSettings.checked
Component.onCompleted: { Component.onCompleted: {
checked = _activeJoystick.circleCorrection checked = _activeJoystick.circleCorrection
......
...@@ -22,7 +22,7 @@ import QGroundControl.FactControls 1.0 ...@@ -22,7 +22,7 @@ import QGroundControl.FactControls 1.0
Item { Item {
width: availableWidth width: availableWidth
height: (activeVehicle.supportsJSButton ? buttonCol.height : flowColumn.height) + (ScreenTools.defaultFontPixelHeight * 2) height: (globals.activeVehicle.supportsJSButton ? buttonCol.height : flowColumn.height) + (ScreenTools.defaultFontPixelHeight * 2)
Connections { Connections {
target: _activeJoystick target: _activeJoystick
onRawButtonPressedChanged: { onRawButtonPressedChanged: {
...@@ -48,7 +48,7 @@ Item { ...@@ -48,7 +48,7 @@ Item {
id: buttonFlow id: buttonFlow
Layout.preferredWidth: parent.width Layout.preferredWidth: parent.width
spacing: ScreenTools.defaultFontPixelWidth spacing: ScreenTools.defaultFontPixelWidth
visible: !activeVehicle.supportsJSButton visible: !globals.activeVehicle.supportsJSButton
Repeater { Repeater {
id: buttonActionRepeater id: buttonActionRepeater
model: _activeJoystick ? Math.min(_activeJoystick.totalButtonCount, _maxButtons) : [] model: _activeJoystick ? Math.min(_activeJoystick.totalButtonCount, _maxButtons) : []
...@@ -113,7 +113,7 @@ Item { ...@@ -113,7 +113,7 @@ Item {
Column { Column {
id: buttonCol id: buttonCol
width: parent.width width: parent.width
visible: activeVehicle.supportsJSButton visible: globals.activeVehicle.supportsJSButton
spacing: ScreenTools.defaultFontPixelHeight / 3 spacing: ScreenTools.defaultFontPixelHeight / 3
Row { Row {
spacing: ScreenTools.defaultFontPixelWidth spacing: ScreenTools.defaultFontPixelWidth
...@@ -137,7 +137,7 @@ Item { ...@@ -137,7 +137,7 @@ Item {
Row { Row {
spacing: ScreenTools.defaultFontPixelWidth spacing: ScreenTools.defaultFontPixelWidth
visible: activeVehicle.supportsJSButton visible: globals.activeVehicle.supportsJSButton
property bool pressed property bool pressed
......
...@@ -42,21 +42,21 @@ Item { ...@@ -42,21 +42,21 @@ Item {
QGCCheckBox { QGCCheckBox {
id: enabledSwitch id: enabledSwitch
enabled: _activeJoystick ? _activeJoystick.calibrated : false enabled: _activeJoystick ? _activeJoystick.calibrated : false
onClicked: activeVehicle.joystickEnabled = checked onClicked: globals.activeVehicle.joystickEnabled = checked
Component.onCompleted: { Component.onCompleted: {
checked = activeVehicle.joystickEnabled checked = globals.activeVehicle.joystickEnabled
} }
Connections { Connections {
target: activeVehicle target: globals.activeVehicle
onJoystickEnabledChanged: { onJoystickEnabledChanged: {
enabledSwitch.checked = activeVehicle.joystickEnabled enabledSwitch.checked = globals.activeVehicle.joystickEnabled
} }
} }
Connections { Connections {
target: joystickManager target: joystickManager
onActiveJoystickChanged: { onActiveJoystickChanged: {
if(_activeJoystick) { if(_activeJoystick) {
enabledSwitch.checked = Qt.binding(function() { return _activeJoystick.calibrated && activeVehicle.joystickEnabled }) enabledSwitch.checked = Qt.binding(function() { return _activeJoystick.calibrated && globals.activeVehicle.joystickEnabled })
} }
} }
} }
...@@ -148,7 +148,7 @@ Item { ...@@ -148,7 +148,7 @@ Item {
rowSpacing: ScreenTools.defaultFontPixelHeight rowSpacing: ScreenTools.defaultFontPixelHeight
anchors.centerIn: parent anchors.centerIn: parent
QGCLabel { QGCLabel {
text: activeVehicle.sub ? qsTr("Lateral") : qsTr("Roll") text: globals.activeVehicle.sub ? qsTr("Lateral") : qsTr("Roll")
Layout.minimumWidth: ScreenTools.defaultFontPixelWidth * 12 Layout.minimumWidth: ScreenTools.defaultFontPixelWidth * 12
} }
AxisMonitor { AxisMonitor {
...@@ -162,7 +162,7 @@ Item { ...@@ -162,7 +162,7 @@ Item {
QGCLabel { QGCLabel {
id: pitchLabel id: pitchLabel
width: _attitudeLabelWidth width: _attitudeLabelWidth
text: activeVehicle.sub ? qsTr("Forward") : qsTr("Pitch") text: globals.activeVehicle.sub ? qsTr("Forward") : qsTr("Pitch")
} }
AxisMonitor { AxisMonitor {
id: pitchAxis id: pitchAxis
......
...@@ -24,7 +24,7 @@ Item { ...@@ -24,7 +24,7 @@ Item {
font.family: ScreenTools.demiboldFontFamily font.family: ScreenTools.demiboldFontFamily
} }
Image { Image {
source: activeVehicle ? "image://QGCImages/" + activeVehicle.id + "/" + activeVehicle.flowImageIndex : "" source: globals.activeVehicle ? "image://QGCImages/" + globals.activeVehicle.id + "/" + globals.activeVehicle.flowImageIndex : ""
width: parent.width * 0.5 width: parent.width * 0.5
height: width * 0.75 height: width * 0.75
cache: false cache: false
......
...@@ -1252,7 +1252,7 @@ void MockLink::_sendStatusTextMessages(void) ...@@ -1252,7 +1252,7 @@ void MockLink::_sendStatusTextMessages(void)
status->msg, status->msg,
0, // Not a chunked sequence 0, // Not a chunked sequence
0); // Not a chunked sequence 0); // Not a chunked sequence
//respondWithMavlinkMessage(msg); respondWithMavlinkMessage(msg);
} }
_sendChunkedStatusText(1, false /* missingChunks */); _sendChunkedStatusText(1, false /* missingChunks */);
......
...@@ -9,6 +9,7 @@ ...@@ -9,6 +9,7 @@
#pragma once #pragma once
#include <QObject>
#include <QString> #include <QString>
#include <QList> #include <QList>
......
...@@ -202,7 +202,7 @@ void UASMessageHandler::handleTextMessage(int, int compId, int severity, QString ...@@ -202,7 +202,7 @@ void UASMessageHandler::handleTextMessage(int, int compId, int severity, QString
emit textMessageCountChanged(count); emit textMessageCountChanged(count);
if (_showErrorsInToolbar && message->severityIsError()) { if (_showErrorsInToolbar && message->severityIsError()) {
_app->showVehicleMessage(message->getText()); _app->showCriticalVehicleMessage(message->getText());
} }
} }
......
...@@ -75,19 +75,18 @@ ApplicationWindow { ...@@ -75,19 +75,18 @@ ApplicationWindow {
//------------------------------------------------------------------------- //-------------------------------------------------------------------------
//-- Global Scope Variables //-- Global Scope Variables
property var activeVehicle: QGroundControl.multiVehicleManager.activeVehicle QtObject {
property string formatedMessage: activeVehicle ? activeVehicle.formatedMessage : "" id: globals
/// Indicates usable height between toolbar and footer
property real availableHeight: mainWindow.height - mainWindow.header.height - mainWindow.footer.height
property var planMasterControllerPlanView: null readonly property var activeVehicle: QGroundControl.multiVehicleManager.activeVehicle
property var currentPlanMissionItem: planMasterControllerPlanView ? planMasterControllerPlanView.missionController.currentPlanViewItem : null readonly property real defaultTextHeight: ScreenTools.defaultFontPixelHeight
property var planMasterControllerFlyView: flightView.planController readonly property real defaultTextWidth: ScreenTools.defaultFontPixelWidth
property var guidedControllerFlyView: flightView.guidedController readonly property var planMasterControllerFlyView: flightView.planController
readonly property var guidedControllerFlyView: flightView.guidedController
readonly property string navButtonWidth: ScreenTools.defaultFontPixelWidth * 24 property var planMasterControllerPlanView: null
readonly property real defaultTextHeight: ScreenTools.defaultFontPixelHeight property var currentPlanMissionItem: planMasterControllerPlanView ? planMasterControllerPlanView.missionController.currentPlanViewItem : null
readonly property real defaultTextWidth: ScreenTools.defaultFontPixelWidth }
/// Default color palette used throughout the UI /// Default color palette used throughout the UI
QGCPalette { id: qgcPal; colorGroupEnabled: true } QGCPalette { id: qgcPal; colorGroupEnabled: true }
...@@ -265,7 +264,7 @@ ApplicationWindow { ...@@ -265,7 +264,7 @@ ApplicationWindow {
visible: false visible: false
onYes: pendingParameterWritesCloseDialog.check() onYes: pendingParameterWritesCloseDialog.check()
function check() { function check() {
if (planMasterControllerPlanView && planMasterControllerPlanView.dirty) { if (globals.planMasterControllerPlanView && globals.planMasterControllerPlanView.dirty) {
unsavedMissionCloseDialog.open() unsavedMissionCloseDialog.open()
} else { } else {
pendingParameterWritesCloseDialog.check() pendingParameterWritesCloseDialog.check()
...@@ -534,132 +533,23 @@ ApplicationWindow { ...@@ -534,132 +533,23 @@ ApplicationWindow {
} }
//------------------------------------------------------------------------- //-------------------------------------------------------------------------
//-- Vehicle Messages //-- Critical Vehicle Message Popup
function formatMessage(message) {
message = message.replace(new RegExp("<#E>", "g"), "color: " + qgcPal.warningText + "; font: " + (ScreenTools.defaultFontPointSize.toFixed(0) - 1) + "pt monospace;");
message = message.replace(new RegExp("<#I>", "g"), "color: " + qgcPal.warningText + "; font: " + (ScreenTools.defaultFontPointSize.toFixed(0) - 1) + "pt monospace;");
message = message.replace(new RegExp("<#N>", "g"), "color: " + qgcPal.text + "; font: " + (ScreenTools.defaultFontPointSize.toFixed(0) - 1) + "pt monospace;");
return message;
}
function showVehicleMessages() {
if(!vehicleMessageArea.visible) {
if(QGroundControl.multiVehicleManager.activeVehicleAvailable) {
messageText.text = formatMessage(activeVehicle.formatedMessages)
//-- Hack to scroll to last message
for (var i = 0; i < activeVehicle.messageCount; i++)
messageFlick.flick(0,-5000)
activeVehicle.resetMessages()
} else {
messageText.text = qsTr("No Messages")
}
vehicleMessageArea.open()
}
}
onFormatedMessageChanged: { property var _vehicleMessageQueue: []
if(vehicleMessageArea.visible) { property string _vehicleMessage: ""
messageText.append(formatMessage(formatedMessage))
//-- Hack to scroll down
messageFlick.flick(0,-500)
}
}
Popup { function showCriticalVehicleMessage(message) {
id: vehicleMessageArea indicatorPopup.close()
width: mainWindow.width * 0.666 if (criticalVehicleMessagePopup.visible || QGroundControl.videoManager.fullScreen) {
height: mainWindow.height * 0.666 _vehicleMessageQueue.push(message)
modal: true
focus: true
x: Math.round((mainWindow.width - width) * 0.5)
y: Math.round((mainWindow.height - height) * 0.5)
closePolicy: Popup.CloseOnEscape | Popup.CloseOnPressOutside
background: Rectangle {
anchors.fill: parent
color: qgcPal.window
border.color: qgcPal.text
radius: ScreenTools.defaultFontPixelHeight * 0.5
}
QGCFlickable {
id: messageFlick
anchors.margins: ScreenTools.defaultFontPixelHeight
anchors.fill: parent
contentHeight: messageText.height
contentWidth: messageText.width
pixelAligned: true
clip: true
TextEdit {
id: messageText
readOnly: true
textFormat: TextEdit.RichText
color: qgcPal.text
}
}
//-- Dismiss Vehicle Messages
QGCColoredImage {
anchors.margins: ScreenTools.defaultFontPixelHeight * 0.5
anchors.top: parent.top
anchors.right: parent.right
width: ScreenTools.isMobile ? ScreenTools.defaultFontPixelHeight * 1.5 : ScreenTools.defaultFontPixelHeight
height: width
sourceSize.height: width
source: "/res/XDelete.svg"
fillMode: Image.PreserveAspectFit
mipmap: true
smooth: true
color: qgcPal.text
MouseArea {
anchors.fill: parent
anchors.margins: ScreenTools.isMobile ? -ScreenTools.defaultFontPixelHeight : 0
onClicked: {
vehicleMessageArea.close()
}
}
}
//-- Clear Messages
QGCColoredImage {
anchors.bottom: parent.bottom
anchors.right: parent.right
anchors.margins: ScreenTools.defaultFontPixelHeight * 0.5
height: ScreenTools.isMobile ? ScreenTools.defaultFontPixelHeight * 1.5 : ScreenTools.defaultFontPixelHeight
width: height
sourceSize.height: height
source: "/res/TrashDelete.svg"
fillMode: Image.PreserveAspectFit
mipmap: true
smooth: true
color: qgcPal.text
MouseArea {
anchors.fill: parent
onClicked: {
if(QGroundControl.multiVehicleManager.activeVehicleAvailable) {
activeVehicle.clearMessages();
vehicleMessageArea.close()
}
}
}
}
}
//-------------------------------------------------------------------------
//-- System Messages
property var _messageQueue: []
property string _systemMessage: ""
function showVehicleMessage(message) {
vehicleMessageArea.close()
if(systemMessageArea.visible || QGroundControl.videoManager.fullScreen) {
_messageQueue.push(message)
} else { } else {
_systemMessage = message _vehicleMessage = message
systemMessageArea.open() criticalVehicleMessagePopup.open()
} }
} }
Popup { Popup {
id: systemMessageArea id: criticalVehicleMessagePopup
y: ScreenTools.defaultFontPixelHeight y: ScreenTools.defaultFontPixelHeight
x: Math.round((mainWindow.width - width) * 0.5) x: Math.round((mainWindow.width - width) * 0.5)
width: mainWindow.width * 0.55 width: mainWindow.width * 0.55
...@@ -677,39 +567,39 @@ ApplicationWindow { ...@@ -677,39 +567,39 @@ ApplicationWindow {
} }
onOpened: { onOpened: {
systemMessageText.text = mainWindow._systemMessage criticalVehicleMessageText.text = mainWindow._vehicleMessage
} }
onClosed: { onClosed: {
//-- Are there messages in the waiting queue? //-- Are there messages in the waiting queue?
if(mainWindow._messageQueue.length) { if(mainWindow._vehicleMessageQueue.length) {
mainWindow._systemMessage = "" mainWindow._vehicleMessage = ""
//-- Show all messages in queue //-- Show all messages in queue
for (var i = 0; i < mainWindow._messageQueue.length; i++) { for (var i = 0; i < mainWindow._vehicleMessageQueue.length; i++) {
var text = mainWindow._messageQueue[i] var text = mainWindow._vehicleMessageQueue[i]
if(i) mainWindow._systemMessage += "<br>" if(i) mainWindow._vehicleMessage += "<br>"
mainWindow._systemMessage += text mainWindow._vehicleMessage += text
} }
//-- Clear it //-- Clear it
mainWindow._messageQueue = [] mainWindow._vehicleMessageQueue = []
systemMessageArea.open() criticalVehicleMessagePopup.open()
} else { } else {
mainWindow._systemMessage = "" mainWindow._vehicleMessage = ""
} }
} }
Flickable { Flickable {
id: systemMessageFlick id: criticalVehicleMessageFlick
anchors.margins: ScreenTools.defaultFontPixelHeight * 0.5 anchors.margins: ScreenTools.defaultFontPixelHeight * 0.5
anchors.fill: parent anchors.fill: parent
contentHeight: systemMessageText.height contentHeight: criticalVehicleMessageText.height
contentWidth: systemMessageText.width contentWidth: criticalVehicleMessageText.width
boundsBehavior: Flickable.StopAtBounds boundsBehavior: Flickable.StopAtBounds
pixelAligned: true pixelAligned: true
clip: true clip: true
TextEdit { TextEdit {
id: systemMessageText id: criticalVehicleMessageText
width: systemMessageArea.width - systemMessageClose.width - (ScreenTools.defaultFontPixelHeight * 2) width: criticalVehicleMessagePopup.width - criticalVehicleMessageClose.width - (ScreenTools.defaultFontPixelHeight * 2)
anchors.centerIn: parent anchors.centerIn: parent
readOnly: true readOnly: true
textFormat: TextEdit.RichText textFormat: TextEdit.RichText
...@@ -720,9 +610,9 @@ ApplicationWindow { ...@@ -720,9 +610,9 @@ ApplicationWindow {
} }
} }
//-- Dismiss Critical Message //-- Dismiss Vehicle Message
QGCColoredImage { QGCColoredImage {
id: systemMessageClose id: criticalVehicleMessageClose
anchors.margins: ScreenTools.defaultFontPixelHeight * 0.5 anchors.margins: ScreenTools.defaultFontPixelHeight * 0.5
anchors.top: parent.top anchors.top: parent.top
anchors.right: parent.right anchors.right: parent.right
...@@ -736,7 +626,7 @@ ApplicationWindow { ...@@ -736,7 +626,7 @@ ApplicationWindow {
anchors.fill: parent anchors.fill: parent
anchors.margins: -ScreenTools.defaultFontPixelHeight anchors.margins: -ScreenTools.defaultFontPixelHeight
onClicked: { onClicked: {
systemMessageArea.close() criticalVehicleMessagePopup.close()
} }
} }
} }
...@@ -751,12 +641,12 @@ ApplicationWindow { ...@@ -751,12 +641,12 @@ ApplicationWindow {
sourceSize.height: width sourceSize.height: width
source: "/res/ArrowDown.svg" source: "/res/ArrowDown.svg"
fillMode: Image.PreserveAspectFit fillMode: Image.PreserveAspectFit
visible: systemMessageText.lineCount > 5 visible: criticalVehicleMessageText.lineCount > 5
color: qgcPal.alertText color: qgcPal.alertText
MouseArea { MouseArea {
anchors.fill: parent anchors.fill: parent
onClicked: { onClicked: {
systemMessageFlick.flick(0,-500) criticalVehicleMessageFlick.flick(0,-500)
} }
} }
} }
......
...@@ -311,7 +311,7 @@ Rectangle { ...@@ -311,7 +311,7 @@ Rectangle {
} }
QGCLabel { QGCLabel {
width: _valueWidth width: _valueWidth
text: activeVehicle ? activeVehicle.mavlinkSentCount : qsTr("Not Connected") text: globals.activeVehicle ? globals.activeVehicle.mavlinkSentCount : qsTr("Not Connected")
anchors.verticalCenter: parent.verticalCenter anchors.verticalCenter: parent.verticalCenter
} }
} }
...@@ -326,7 +326,7 @@ Rectangle { ...@@ -326,7 +326,7 @@ Rectangle {
} }
QGCLabel { QGCLabel {
width: _valueWidth width: _valueWidth
text: activeVehicle ? activeVehicle.mavlinkReceivedCount : qsTr("Not Connected") text: globals.activeVehicle ? globals.activeVehicle.mavlinkReceivedCount : qsTr("Not Connected")
anchors.verticalCenter: parent.verticalCenter anchors.verticalCenter: parent.verticalCenter
} }
} }
...@@ -341,7 +341,7 @@ Rectangle { ...@@ -341,7 +341,7 @@ Rectangle {
} }
QGCLabel { QGCLabel {
width: _valueWidth width: _valueWidth
text: activeVehicle ? activeVehicle.mavlinkLossCount : qsTr("Not Connected") text: globals.activeVehicle ? globals.activeVehicle.mavlinkLossCount : qsTr("Not Connected")
anchors.verticalCenter: parent.verticalCenter anchors.verticalCenter: parent.verticalCenter
} }
} }
...@@ -356,7 +356,7 @@ Rectangle { ...@@ -356,7 +356,7 @@ Rectangle {
} }
QGCLabel { QGCLabel {
width: _valueWidth width: _valueWidth
text: activeVehicle ? activeVehicle.mavlinkLossPercent.toFixed(0) + '%' : qsTr("Not Connected") text: globals.activeVehicle ? globals.activeVehicle.mavlinkLossPercent.toFixed(0) + '%' : qsTr("Not Connected")
anchors.verticalCenter: parent.verticalCenter anchors.verticalCenter: parent.verticalCenter
} }
} }
......
...@@ -27,13 +27,15 @@ Item { ...@@ -27,13 +27,15 @@ Item {
property bool showIndicator: true property bool showIndicator: true
property var _activeVehicle: QGroundControl.multiVehicleManager.activeVehicle
Row { Row {
id: batteryIndicatorRow id: batteryIndicatorRow
anchors.top: parent.top anchors.top: parent.top
anchors.bottom: parent.bottom anchors.bottom: parent.bottom
Repeater { Repeater {
model: activeVehicle ? activeVehicle.batteries : 0 model: _activeVehicle ? _activeVehicle.batteries : 0
Loader { Loader {
anchors.top: parent.top anchors.top: parent.top
...@@ -149,7 +151,7 @@ Item { ...@@ -149,7 +151,7 @@ Item {
ColumnLayout { ColumnLayout {
Repeater { Repeater {
model: activeVehicle ? activeVehicle.batteries : 0 model: _activeVehicle ? _activeVehicle.batteries : 0
ColumnLayout { ColumnLayout {
spacing: 0 spacing: 0
...@@ -177,7 +179,7 @@ Item { ...@@ -177,7 +179,7 @@ Item {
ColumnLayout { ColumnLayout {
Repeater { Repeater {
model: activeVehicle ? activeVehicle.batteries : 0 model: _activeVehicle ? _activeVehicle.batteries : 0
ColumnLayout { ColumnLayout {
spacing: 0 spacing: 0
......
...@@ -26,6 +26,8 @@ Item { ...@@ -26,6 +26,8 @@ Item {
property bool showIndicator: true property bool showIndicator: true
property var _activeVehicle: QGroundControl.multiVehicleManager.activeVehicle
Component { Component {
id: gpsInfo id: gpsInfo
...@@ -45,29 +47,29 @@ Item { ...@@ -45,29 +47,29 @@ Item {
QGCLabel { QGCLabel {
id: gpsLabel id: gpsLabel
text: (activeVehicle && activeVehicle.gps.count.value >= 0) ? qsTr("GPS Status") : qsTr("GPS Data Unavailable") text: (_activeVehicle && _activeVehicle.gps.count.value >= 0) ? qsTr("GPS Status") : qsTr("GPS Data Unavailable")
font.family: ScreenTools.demiboldFontFamily font.family: ScreenTools.demiboldFontFamily
anchors.horizontalCenter: parent.horizontalCenter anchors.horizontalCenter: parent.horizontalCenter
} }
GridLayout { GridLayout {
id: gpsGrid id: gpsGrid
visible: (activeVehicle && activeVehicle.gps.count.value >= 0) visible: (_activeVehicle && _activeVehicle.gps.count.value >= 0)
anchors.margins: ScreenTools.defaultFontPixelHeight anchors.margins: ScreenTools.defaultFontPixelHeight
columnSpacing: ScreenTools.defaultFontPixelWidth columnSpacing: ScreenTools.defaultFontPixelWidth
anchors.horizontalCenter: parent.horizontalCenter anchors.horizontalCenter: parent.horizontalCenter
columns: 2 columns: 2
QGCLabel { text: qsTr("GPS Count:") } QGCLabel { text: qsTr("GPS Count:") }
QGCLabel { text: activeVehicle ? activeVehicle.gps.count.valueString : qsTr("N/A", "No data to display") } QGCLabel { text: _activeVehicle ? _activeVehicle.gps.count.valueString : qsTr("N/A", "No data to display") }
QGCLabel { text: qsTr("GPS Lock:") } QGCLabel { text: qsTr("GPS Lock:") }
QGCLabel { text: activeVehicle ? activeVehicle.gps.lock.enumStringValue : qsTr("N/A", "No data to display") } QGCLabel { text: _activeVehicle ? _activeVehicle.gps.lock.enumStringValue : qsTr("N/A", "No data to display") }
QGCLabel { text: qsTr("HDOP:") } QGCLabel { text: qsTr("HDOP:") }
QGCLabel { text: activeVehicle ? activeVehicle.gps.hdop.valueString : qsTr("--.--", "No data to display") } QGCLabel { text: _activeVehicle ? _activeVehicle.gps.hdop.valueString : qsTr("--.--", "No data to display") }
QGCLabel { text: qsTr("VDOP:") } QGCLabel { text: qsTr("VDOP:") }
QGCLabel { text: activeVehicle ? activeVehicle.gps.vdop.valueString : qsTr("--.--", "No data to display") } QGCLabel { text: _activeVehicle ? _activeVehicle.gps.vdop.valueString : qsTr("--.--", "No data to display") }
QGCLabel { text: qsTr("Course Over Ground:") } QGCLabel { text: qsTr("Course Over Ground:") }
QGCLabel { text: activeVehicle ? activeVehicle.gps.courseOverGround.valueString : qsTr("--.--", "No data to display") } QGCLabel { text: _activeVehicle ? _activeVehicle.gps.courseOverGround.valueString : qsTr("--.--", "No data to display") }
} }
} }
} }
...@@ -81,7 +83,7 @@ Item { ...@@ -81,7 +83,7 @@ Item {
source: "/qmlimages/Gps.svg" source: "/qmlimages/Gps.svg"
fillMode: Image.PreserveAspectFit fillMode: Image.PreserveAspectFit
sourceSize.height: height sourceSize.height: height
opacity: (activeVehicle && activeVehicle.gps.count.value >= 0) ? 1 : 0.5 opacity: (_activeVehicle && _activeVehicle.gps.count.value >= 0) ? 1 : 0.5
color: qgcPal.buttonText color: qgcPal.buttonText
} }
...@@ -93,16 +95,16 @@ Item { ...@@ -93,16 +95,16 @@ Item {
QGCLabel { QGCLabel {
anchors.horizontalCenter: hdopValue.horizontalCenter anchors.horizontalCenter: hdopValue.horizontalCenter
visible: activeVehicle && !isNaN(activeVehicle.gps.hdop.value) visible: _activeVehicle && !isNaN(_activeVehicle.gps.hdop.value)
color: qgcPal.buttonText color: qgcPal.buttonText
text: activeVehicle ? activeVehicle.gps.count.valueString : "" text: _activeVehicle ? _activeVehicle.gps.count.valueString : ""
} }
QGCLabel { QGCLabel {
id: hdopValue id: hdopValue
visible: activeVehicle && !isNaN(activeVehicle.gps.hdop.value) visible: _activeVehicle && !isNaN(_activeVehicle.gps.hdop.value)
color: qgcPal.buttonText color: qgcPal.buttonText
text: activeVehicle ? activeVehicle.gps.hdop.value.toFixed(1) : "" text: _activeVehicle ? _activeVehicle.gps.hdop.value.toFixed(1) : ""
} }
} }
......
...@@ -22,7 +22,7 @@ Item { ...@@ -22,7 +22,7 @@ Item {
width: joystickRow.width * 1.1 width: joystickRow.width * 1.1
anchors.top: parent.top anchors.top: parent.top
anchors.bottom: parent.bottom anchors.bottom: parent.bottom
visible: activeVehicle ? activeVehicle.sub : false visible: globals.activeVehicle ? globals.activeVehicle.sub : false
Component { Component {
...@@ -63,8 +63,8 @@ Item { ...@@ -63,8 +63,8 @@ Item {
} }
QGCLabel { text: qsTr("Enabled:") } QGCLabel { text: qsTr("Enabled:") }
QGCLabel { QGCLabel {
text: activeVehicle && activeVehicle.joystickEnabled ? "Yes" : "No" text: globals.activeVehicle && globals.activeVehicle.joystickEnabled ? "Yes" : "No"
color: activeVehicle && activeVehicle.joystickEnabled ? qgcPal.buttonText : "red" color: globals.activeVehicle && globals.activeVehicle.joystickEnabled ? qgcPal.buttonText : "red"
} }
} }
} }
...@@ -84,7 +84,7 @@ Item { ...@@ -84,7 +84,7 @@ Item {
sourceSize.height: height sourceSize.height: height
source: "/qmlimages/Joystick.png" source: "/qmlimages/Joystick.png"
fillMode: Image.PreserveAspectFit fillMode: Image.PreserveAspectFit
color: activeVehicle && activeVehicle.joystickEnabled && joystickManager.activeJoystick ? qgcPal.buttonText : "red" color: globals.activeVehicle && globals.activeVehicle.joystickEnabled && joystickManager.activeJoystick ? qgcPal.buttonText : "red"
} }
} }
......
...@@ -27,9 +27,11 @@ Item { ...@@ -27,9 +27,11 @@ Item {
property bool showIndicator: false property bool showIndicator: false
property var _activeVehicle: QGroundControl.multiVehicleManager.activeVehicle
QGCLabel { QGCLabel {
id: priorityLinkSelector id: priorityLinkSelector
text: activeVehicle ? activeVehicle.priorityLinkName : qsTr("N/A", "No data to display") text: _activeVehicle ? _activeVehicle.priorityLinkName : qsTr("N/A", "No data to display")
font.pointSize: ScreenTools.mediumFontPointSize font.pointSize: ScreenTools.mediumFontPointSize
color: qgcPal.buttonText color: qgcPal.buttonText
anchors.verticalCenter: parent.verticalCenter anchors.verticalCenter: parent.verticalCenter
...@@ -39,12 +41,12 @@ Item { ...@@ -39,12 +41,12 @@ Item {
Component { Component {
id: linkSelectionMenuItemComponent id: linkSelectionMenuItemComponent
QGCMenuItem { QGCMenuItem {
onTriggered: activeVehicle.priorityLinkName = text onTriggered: _activeVehicle.priorityLinkName = text
} }
} }
property var linkSelectionMenuItems: [] property var linkSelectionMenuItems: []
function updatelinkSelectionMenu() { function updatelinkSelectionMenu() {
if (activeVehicle) { if (_activeVehicle) {
// Remove old menu items // Remove old menu items
var i var i
for (i = 0; i < linkSelectionMenuItems.length; i++) { for (i = 0; i < linkSelectionMenuItems.length; i++) {
...@@ -54,9 +56,9 @@ Item { ...@@ -54,9 +56,9 @@ Item {
// Add new items // Add new items
var has_hl = false; var has_hl = false;
var links = activeVehicle.links var links = _activeVehicle.links
for (i = 0; i < links.length; i++) { for (i = 0; i < links.length; i++) {
var menuItem = linkSelectionMenuItemComponent.createObject(null, { "text": links[i].getName(), "enabled": links[i].link_active(activeVehicle.id)}) var menuItem = linkSelectionMenuItemComponent.createObject(null, { "text": links[i].getName(), "enabled": links[i].link_active(_activeVehicle.id)})
linkSelectionMenuItems.push(menuItem) linkSelectionMenuItems.push(menuItem)
linkSelectionMenu.insertItem(i, menuItem) linkSelectionMenu.insertItem(i, menuItem)
...@@ -77,17 +79,17 @@ Item { ...@@ -77,17 +79,17 @@ Item {
} }
Connections { Connections {
target: activeVehicle target: _activeVehicle
onLinksChanged: priorityLinkSelector.updatelinkSelectionMenu() onLinksChanged: priorityLinkSelector.updatelinkSelectionMenu()
} }
Connections { Connections {
target: activeVehicle target: _activeVehicle
onLinksPropertiesChanged: priorityLinkSelector.updatelinkSelectionMenu() onLinksPropertiesChanged: priorityLinkSelector.updatelinkSelectionMenu()
} }
MouseArea { MouseArea {
visible: activeVehicle visible: _activeVehicle
anchors.fill: parent anchors.fill: parent
onClicked: linkSelectionMenu.popup() onClicked: linkSelectionMenu.popup()
} }
......
...@@ -126,22 +126,40 @@ Rectangle { ...@@ -126,22 +126,40 @@ Rectangle {
property string _userBrandImageOutdoor: QGroundControl.settingsManager.brandImageSettings.userBrandImageOutdoor.value property string _userBrandImageOutdoor: QGroundControl.settingsManager.brandImageSettings.userBrandImageOutdoor.value
property bool _userBrandingIndoor: _userBrandImageIndoor.length != 0 property bool _userBrandingIndoor: _userBrandImageIndoor.length != 0
property bool _userBrandingOutdoor: _userBrandImageOutdoor.length != 0 property bool _userBrandingOutdoor: _userBrandImageOutdoor.length != 0
property string _brandImageIndoor: _userBrandingIndoor ? property string _brandImageIndoor: brandImageIndoor()
_userBrandImageIndoor : (_userBrandingOutdoor ? property string _brandImageOutdoor: brandImageOutdoor()
_userBrandImageOutdoor : (_corePluginBranding ?
QGroundControl.corePlugin.brandImageIndoor : (activeVehicle ? function brandImageIndoor() {
activeVehicle.brandImageIndoor : "" if (_userBrandingIndoor) {
) return _userBrandImageIndoor
) } else {
) if (_userBrandingOutdoor) {
property string _brandImageOutdoor: _userBrandingOutdoor ? return _userBrandingOutdoor
_userBrandImageOutdoor : (_userBrandingIndoor ? } else {
_userBrandImageIndoor : (_corePluginBranding ? if (_corePluginBranding) {
QGroundControl.corePlugin.brandImageOutdoor : (activeVehicle ? return QGroundControl.corePlugin.brandImageIndoor
activeVehicle.brandImageOutdoor : "" } else {
) return _activeVehicle ? _activeVehicle.brandImageIndoor : ""
) }
) }
}
}
function brandImageOutdoor() {
if (_userBrandingOutdoor) {
return _userBrandingOutdoor
} else {
if (_userBrandingIndoor) {
return _userBrandingIndoor
} else {
if (_corePluginBranding) {
return QGroundControl.corePlugin.brandImageOutdoor
} else {
return _activeVehicle ? _activeVehicle.brandImageOutdoor : ""
}
}
}
}
} }
// Small parameter download progress bar // Small parameter download progress bar
......
...@@ -21,26 +21,28 @@ import QGroundControl.Palette 1.0 ...@@ -21,26 +21,28 @@ import QGroundControl.Palette 1.0
//------------------------------------------------------------------------- //-------------------------------------------------------------------------
//-- Message Indicator //-- Message Indicator
Item { Item {
id: _root
width: height width: height
anchors.top: parent.top anchors.top: parent.top
anchors.bottom: parent.bottom anchors.bottom: parent.bottom
property bool showIndicator: true property bool showIndicator: true
property bool _isMessageImportant: activeVehicle ? !activeVehicle.messageTypeNormal && !activeVehicle.messageTypeNone : false property var _activeVehicle: QGroundControl.multiVehicleManager.activeVehicle
property bool _isMessageImportant: _activeVehicle ? !_activeVehicle.messageTypeNormal && !_activeVehicle.messageTypeNone : false
function getMessageColor() { function getMessageColor() {
if (activeVehicle) { if (_activeVehicle) {
if (activeVehicle.messageTypeNone) if (_activeVehicle.messageTypeNone)
return qgcPal.colorGrey return qgcPal.colorGrey
if (activeVehicle.messageTypeNormal) if (_activeVehicle.messageTypeNormal)
return qgcPal.colorBlue; return qgcPal.colorBlue;
if (activeVehicle.messageTypeWarning) if (_activeVehicle.messageTypeWarning)
return qgcPal.colorOrange; return qgcPal.colorOrange;
if (activeVehicle.messageTypeError) if (_activeVehicle.messageTypeError)
return qgcPal.colorRed; return qgcPal.colorRed;
// Cannot be so make make it obnoxious to show error // Cannot be so make make it obnoxious to show error
console.log("Invalid vehicle message type") console.warn("MessageIndicator.qml:getMessageColor Invalid vehicle message type", _activeVehicle.messageTypeNone)
return "purple"; return "purple";
} }
//-- It can only get here when closing (vehicle gone while window active) //-- It can only get here when closing (vehicle gone while window active)
...@@ -54,7 +56,7 @@ Item { ...@@ -54,7 +56,7 @@ Item {
sourceSize.height: height sourceSize.height: height
fillMode: Image.PreserveAspectFit fillMode: Image.PreserveAspectFit
cache: false cache: false
visible: activeVehicle && activeVehicle.messageCount > 0 && _isMessageImportant visible: _activeVehicle && _activeVehicle.messageCount > 0 && _isMessageImportant
} }
QGCColoredImage { QGCColoredImage {
...@@ -68,6 +70,89 @@ Item { ...@@ -68,6 +70,89 @@ Item {
MouseArea { MouseArea {
anchors.fill: parent anchors.fill: parent
onClicked: mainWindow.showVehicleMessages() onClicked: mainWindow.showIndicatorPopup(_root, vehicleMessagesPopup)
}
Component {
id: vehicleMessagesPopup
Rectangle {
width: mainWindow.width * 0.666
height: mainWindow.height * 0.666
radius: ScreenTools.defaultFontPixelHeight / 2
color: qgcPal.window
border.color: qgcPal.text
function formatMessage(message) {
message = message.replace(new RegExp("<#E>", "g"), "color: " + qgcPal.warningText + "; font: " + (ScreenTools.defaultFontPointSize.toFixed(0) - 1) + "pt monospace;");
message = message.replace(new RegExp("<#I>", "g"), "color: " + qgcPal.warningText + "; font: " + (ScreenTools.defaultFontPointSize.toFixed(0) - 1) + "pt monospace;");
message = message.replace(new RegExp("<#N>", "g"), "color: " + qgcPal.text + "; font: " + (ScreenTools.defaultFontPointSize.toFixed(0) - 1) + "pt monospace;");
return message;
}
Component.onCompleted: {
messageText.text = formatMessage(_activeVehicle.formattedMessages)
//-- Hack to scroll to last message
for (var i = 0; i < _activeVehicle.messageCount; i++)
messageFlick.flick(0,-5000)
_activeVehicle.resetMessages()
}
Connections {
target: _activeVehicle
onNewFormattedMessage :{
messageText.append(formatMessage(formattedMessage))
//-- Hack to scroll down
messageFlick.flick(0,-500)
}
}
QGCLabel {
anchors.centerIn: parent
text: qsTr("No Messages")
visible: messageText.length === 0
}
//-- Clear Messages
QGCColoredImage {
anchors.bottom: parent.bottom
anchors.right: parent.right
anchors.margins: ScreenTools.defaultFontPixelHeight * 0.5
height: ScreenTools.isMobile ? ScreenTools.defaultFontPixelHeight * 1.5 : ScreenTools.defaultFontPixelHeight
width: height
sourceSize.height: height
source: "/res/TrashDelete.svg"
fillMode: Image.PreserveAspectFit
mipmap: true
smooth: true
color: qgcPal.text
visible: messageText.length !== 0
MouseArea {
anchors.fill: parent
onClicked: {
if (_activeVehicle) {
_activeVehicle.clearMessages()
mainWindow.hideIndicatorPopup()
}
}
}
}
QGCFlickable {
id: messageFlick
anchors.margins: ScreenTools.defaultFontPixelHeight
anchors.fill: parent
contentHeight: messageText.height
contentWidth: messageText.width
pixelAligned: true
TextEdit {
id: messageText
readOnly: true
textFormat: TextEdit.RichText
color: qgcPal.text
}
}
}
} }
} }
...@@ -27,7 +27,7 @@ Item { ...@@ -27,7 +27,7 @@ Item {
property bool showIndicator: _activeVehicle.supportsRadio property bool showIndicator: _activeVehicle.supportsRadio
property var _activeVehicle: QGroundControl.multiVehicleManager.activeVehicle property var _activeVehicle: QGroundControl.multiVehicleManager.activeVehicle
property bool _rcRSSIAvailable: activeVehicle ? activeVehicle.rcRSSI > 0 && activeVehicle.rcRSSI <= 100 : false property bool _rcRSSIAvailable: _activeVehicle ? _activeVehicle.rcRSSI > 0 && _activeVehicle.rcRSSI <= 100 : false
Component { Component {
id: rcRSSIInfo id: rcRSSIInfo
...@@ -48,7 +48,7 @@ Item { ...@@ -48,7 +48,7 @@ Item {
QGCLabel { QGCLabel {
id: rssiLabel id: rssiLabel
text: activeVehicle ? (activeVehicle.rcRSSI !== 255 ? qsTr("RC RSSI Status") : qsTr("RC RSSI Data Unavailable")) : qsTr("N/A", "No data available") text: _activeVehicle ? (_activeVehicle.rcRSSI !== 255 ? qsTr("RC RSSI Status") : qsTr("RC RSSI Data Unavailable")) : qsTr("N/A", "No data available")
font.family: ScreenTools.demiboldFontFamily font.family: ScreenTools.demiboldFontFamily
anchors.horizontalCenter: parent.horizontalCenter anchors.horizontalCenter: parent.horizontalCenter
} }
...@@ -62,7 +62,7 @@ Item { ...@@ -62,7 +62,7 @@ Item {
anchors.horizontalCenter: parent.horizontalCenter anchors.horizontalCenter: parent.horizontalCenter
QGCLabel { text: qsTr("RSSI:") } QGCLabel { text: qsTr("RSSI:") }
QGCLabel { text: activeVehicle ? (activeVehicle.rcRSSI + "%") : 0 } QGCLabel { text: _activeVehicle ? (_activeVehicle.rcRSSI + "%") : 0 }
} }
} }
} }
...@@ -88,7 +88,7 @@ Item { ...@@ -88,7 +88,7 @@ Item {
SignalStrength { SignalStrength {
anchors.verticalCenter: parent.verticalCenter anchors.verticalCenter: parent.verticalCenter
size: parent.height * 0.5 size: parent.height * 0.5
percent: _rcRSSIAvailable ? activeVehicle.rcRSSI : 0 percent: _rcRSSIAvailable ? _activeVehicle.rcRSSI : 0
} }
} }
......
...@@ -28,7 +28,9 @@ Item { ...@@ -28,7 +28,9 @@ Item {
anchors.top: parent.top anchors.top: parent.top
anchors.bottom: parent.bottom anchors.bottom: parent.bottom
property bool showIndicator: activeVehicle && activeVehicle.roiModeSupported property bool showIndicator: _activeVehicle && _activeVehicle.roiModeSupported
property var _activeVehicle: QGroundControl.multiVehicleManager.activeVehicle
Component { Component {
id: roiInfo id: roiInfo
...@@ -56,11 +58,11 @@ Item { ...@@ -56,11 +58,11 @@ Item {
QGCButton { QGCButton {
id: roiButton id: roiButton
visible: activeVehicle && activeVehicle.isROIEnabled visible: _activeVehicle && _activeVehicle.isROIEnabled
text: qsTr("Disable ROI") text: qsTr("Disable ROI")
onClicked: { onClicked: {
if(activeVehicle) if(_activeVehicle)
activeVehicle.stopGuidedModeROI() _activeVehicle.stopGuidedModeROI()
mainWindow.hideIndicatorPopup() mainWindow.hideIndicatorPopup()
} }
} }
...@@ -75,9 +77,9 @@ Item { ...@@ -75,9 +77,9 @@ Item {
anchors.bottom: parent.bottom anchors.bottom: parent.bottom
sourceSize.height: height sourceSize.height: height
source: "/qmlimages/roi.svg" source: "/qmlimages/roi.svg"
color: activeVehicle && activeVehicle.isROIEnabled ? qgcPal.colorGreen : qgcPal.text color: _activeVehicle && _activeVehicle.isROIEnabled ? qgcPal.colorGreen : qgcPal.text
fillMode: Image.PreserveAspectFit fillMode: Image.PreserveAspectFit
opacity: activeVehicle && activeVehicle.isROIEnabled ? 1 : 0.5 opacity: _activeVehicle && _activeVehicle.isROIEnabled ? 1 : 0.5
} }
MouseArea { MouseArea {
......
...@@ -56,19 +56,19 @@ Item { ...@@ -56,19 +56,19 @@ Item {
columns: 2 columns: 2
anchors.horizontalCenter: parent.horizontalCenter anchors.horizontalCenter: parent.horizontalCenter
QGCLabel { text: qsTr("Local RSSI:") } QGCLabel { text: qsTr("Local RSSI:") }
QGCLabel { text: activeVehicle.telemetryLRSSI + " dBm"} QGCLabel { text: _activeVehicle.telemetryLRSSI + " dBm"}
QGCLabel { text: qsTr("Remote RSSI:") } QGCLabel { text: qsTr("Remote RSSI:") }
QGCLabel { text: activeVehicle.telemetryRRSSI + " dBm"} QGCLabel { text: _activeVehicle.telemetryRRSSI + " dBm"}
QGCLabel { text: qsTr("RX Errors:") } QGCLabel { text: qsTr("RX Errors:") }
QGCLabel { text: activeVehicle.telemetryRXErrors } QGCLabel { text: _activeVehicle.telemetryRXErrors }
QGCLabel { text: qsTr("Errors Fixed:") } QGCLabel { text: qsTr("Errors Fixed:") }
QGCLabel { text: activeVehicle.telemetryFixed } QGCLabel { text: _activeVehicle.telemetryFixed }
QGCLabel { text: qsTr("TX Buffer:") } QGCLabel { text: qsTr("TX Buffer:") }
QGCLabel { text: activeVehicle.telemetryTXBuffer } QGCLabel { text: _activeVehicle.telemetryTXBuffer }
QGCLabel { text: qsTr("Local Noise:") } QGCLabel { text: qsTr("Local Noise:") }
QGCLabel { text: activeVehicle.telemetryLNoise } QGCLabel { text: _activeVehicle.telemetryLNoise }
QGCLabel { text: qsTr("Remote Noise:") } QGCLabel { text: qsTr("Remote Noise:") }
QGCLabel { text: activeVehicle.telemetryRNoise } QGCLabel { text: _activeVehicle.telemetryRNoise }
} }
} }
} }
......
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