Unverified Commit b8578109 authored by Don Gagne's avatar Don Gagne Committed by GitHub

Merge pull request #8196 from Williangalvani/updateArdusub2

Update Ardusub Metadata and Tuning page for Sub 4.0
parents 6e68375f 14ec0d07
......@@ -105,27 +105,62 @@ SetupPage {
height: velColumn.height + _margins*2
color: palette.windowShade
Column {
Component {
id: velColumnUpTo36
Column {
anchors.margins: _margins
anchors.left: parent.left
anchors.right: parent.right
anchors.top: parent.top
spacing: _margins*1.5
FactTextFieldSlider { fact: controller.getParameterFact(-1, "r.PSC_POSXY_P") }
FactTextFieldSlider { fact: controller.getParameterFact(-1, "r.PSC_POSZ_P") }
FactTextFieldSlider { fact: controller.getParameterFact(-1, "r.PSC_VELXY_P") }
FactTextFieldSlider { fact: controller.getParameterFact(-1, "r.PSC_VELXY_I") }
FactTextFieldSlider { fact: controller.getParameterFact(-1, "r.PSC_VELXY_IMAX") }
FactTextFieldSlider { fact: controller.getParameterFact(-1, "r.PSC_VELZ_P") }
FactTextFieldSlider { fact: controller.getParameterFact(-1, "r.PSC_ACCZ_D") }
FactTextFieldSlider { fact: controller.getParameterFact(-1, "r.PSC_ACCZ_FILT") }
FactTextFieldSlider { fact: controller.getParameterFact(-1, "r.PSC_ACCZ_I") }
FactTextFieldSlider { fact: controller.getParameterFact(-1, "r.PSC_ACCZ_IMAX") }
FactTextFieldSlider { fact: controller.getParameterFact(-1, "r.PSC_ACCZ_P") }
} // Column - VEL parameters
}
Component {
id: velColumn40
Column {
anchors.margins: _margins
anchors.left: parent.left
anchors.right: parent.right
anchors.top: parent.top
spacing: _margins*1.5
FactTextFieldSlider { fact: controller.getParameterFact(-1, "r.PSC_POSXY_P") }
FactTextFieldSlider { fact: controller.getParameterFact(-1, "r.PSC_POSZ_P") }
FactTextFieldSlider { fact: controller.getParameterFact(-1, "r.PSC_VELXY_P") }
FactTextFieldSlider { fact: controller.getParameterFact(-1, "r.PSC_VELXY_I") }
FactTextFieldSlider { fact: controller.getParameterFact(-1, "r.PSC_VELXY_IMAX") }
FactTextFieldSlider { fact: controller.getParameterFact(-1, "r.PSC_VELZ_P") }
FactTextFieldSlider { fact: controller.getParameterFact(-1, "r.PSC_ACCZ_D") }
FactTextFieldSlider { fact: controller.getParameterFact(-1, "r.PSC_ACCZ_FLTD") }
FactTextFieldSlider { fact: controller.getParameterFact(-1, "r.PSC_ACCZ_FLTE") }
FactTextFieldSlider { fact: controller.getParameterFact(-1, "r.PSC_ACCZ_FLTT") }
FactTextFieldSlider { fact: controller.getParameterFact(-1, "r.PSC_ACCZ_I") }
FactTextFieldSlider { fact: controller.getParameterFact(-1, "r.PSC_ACCZ_IMAX") }
FactTextFieldSlider { fact: controller.getParameterFact(-1, "r.PSC_ACCZ_P") }
} // Column - VEL parameters
}
Loader {
id: velColumn
anchors.margins: _margins
anchors.left: parent.left
anchors.right: parent.right
anchors.top: parent.top
spacing: _margins*1.5
FactTextFieldSlider { fact: controller.getParameterFact(-1, "POS_XY_P") }
FactTextFieldSlider { fact: controller.getParameterFact(-1, "POS_Z_P") }
FactTextFieldSlider { fact: controller.getParameterFact(-1, "VEL_XY_P") }
FactTextFieldSlider { fact: controller.getParameterFact(-1, "VEL_XY_I") }
FactTextFieldSlider { fact: controller.getParameterFact(-1, "VEL_XY_IMAX") }
FactTextFieldSlider { fact: controller.getParameterFact(-1, "VEL_Z_P") }
FactTextFieldSlider { fact: controller.getParameterFact(-1, "ACCEL_Z_D") }
FactTextFieldSlider { fact: controller.getParameterFact(-1, "ACCEL_Z_FILT") }
FactTextFieldSlider { fact: controller.getParameterFact(-1, "ACCEL_Z_I") }
FactTextFieldSlider { fact: controller.getParameterFact(-1, "ACCEL_Z_IMAX") }
FactTextFieldSlider { fact: controller.getParameterFact(-1, "ACCEL_Z_P") }
} // Column - VEL parameters
sourceComponent: activeVehicle.versionCompare(3, 6, 0) <= 0 ? velColumnUpTo36 :velColumnUpTo36
}
} // Rectangle - VEL parameters
Rectangle {
......@@ -136,26 +171,63 @@ SetupPage {
height: wpnavColumn.height + _margins*2
color: palette.windowShade
Column {
// WPNAV parameters up to 3.5
Component {
id: wpnavColumn35
Column {
anchors.margins: _margins
anchors.left: parent.left
anchors.right: parent.right
anchors.top: parent.top
spacing: _margins*1.5
FactTextFieldSlider { fact: controller.getParameterFact(-1, "WPNAV_ACCEL") }
FactTextFieldSlider { fact: controller.getParameterFact(-1, "WPNAV_ACCEL_Z") }
FactTextFieldSlider { fact: controller.getParameterFact(-1, "WPNAV_LOIT_JERK") }
FactTextFieldSlider { fact: controller.getParameterFact(-1, "WPNAV_LOIT_MAXA") }
FactTextFieldSlider { fact: controller.getParameterFact(-1, "WPNAV_LOIT_MINA") }
FactTextFieldSlider { fact: controller.getParameterFact(-1, "WPNAV_LOIT_SPEED") }
FactTextFieldSlider { fact: controller.getParameterFact(-1, "WPNAV_RADIUS") }
FactTextFieldSlider { fact: controller.getParameterFact(-1, "WPNAV_SPEED") }
FactTextFieldSlider { fact: controller.getParameterFact(-1, "WPNAV_SPEED_DN") }
FactTextFieldSlider { fact: controller.getParameterFact(-1, "WPNAV_SPEED_UP") }
}
}
// WPNAV parameters for 3.6 and upwards
Component {
id: wpnavColumn36
Column {
anchors.margins: _margins
anchors.left: parent.left
anchors.right: parent.right
anchors.top: parent.top
spacing: _margins*1.5
FactTextFieldSlider { fact: controller.getParameterFact(-1, "WPNAV_ACCEL") }
FactTextFieldSlider { fact: controller.getParameterFact(-1, "WPNAV_ACCEL_Z") }
FactTextFieldSlider { fact: controller.getParameterFact(-1, "WPNAV_RADIUS") }
FactTextFieldSlider { fact: controller.getParameterFact(-1, "WPNAV_SPEED") }
FactTextFieldSlider { fact: controller.getParameterFact(-1, "WPNAV_SPEED_DN") }
FactTextFieldSlider { fact: controller.getParameterFact(-1, "WPNAV_SPEED_UP") }
FactTextFieldSlider { fact: controller.getParameterFact(-1, "LOIT_SPEED") }
FactTextFieldSlider { fact: controller.getParameterFact(-1, "LOIT_ACC_MAX") }
FactTextFieldSlider { fact: controller.getParameterFact(-1, "LOIT_ANG_MAX") }
FactTextFieldSlider { fact: controller.getParameterFact(-1, "LOIT_BRK_ACCEL") }
FactTextFieldSlider { fact: controller.getParameterFact(-1, "LOIT_BRK_DELAY") }
FactTextFieldSlider { fact: controller.getParameterFact(-1, "LOIT_BRK_JERK") }
}
}
Loader {
id: wpnavColumn
anchors.margins: _margins
anchors.left: parent.left
anchors.right: parent.right
anchors.top: parent.top
spacing: _margins*1.5
FactTextFieldSlider { fact: controller.getParameterFact(-1, "WPNAV_ACCEL") }
FactTextFieldSlider { fact: controller.getParameterFact(-1, "WPNAV_ACCEL_Z") }
FactTextFieldSlider { fact: controller.getParameterFact(-1, "WPNAV_LOIT_JERK") }
FactTextFieldSlider { fact: controller.getParameterFact(-1, "WPNAV_LOIT_MAXA") }
FactTextFieldSlider { fact: controller.getParameterFact(-1, "WPNAV_LOIT_MINA") }
FactTextFieldSlider { fact: controller.getParameterFact(-1, "WPNAV_LOIT_SPEED") }
FactTextFieldSlider { fact: controller.getParameterFact(-1, "WPNAV_RADIUS") }
FactTextFieldSlider { fact: controller.getParameterFact(-1, "WPNAV_SPEED") }
FactTextFieldSlider { fact: controller.getParameterFact(-1, "WPNAV_SPEED_DN") }
FactTextFieldSlider { fact: controller.getParameterFact(-1, "WPNAV_SPEED_UP") }
} // Column - WPNAV parameters
sourceComponent: activeVehicle.versionCompare(3, 6, 0) < 0 ? wpnavColumn35 : wpnavColumn36
}
} // Rectangle - WPNAV parameters
} // Column
} // Component
......
......@@ -876,8 +876,11 @@ QString APMFirmwarePlugin::internalParameterMetaDataFile(Vehicle* vehicle)
return QStringLiteral(":/FirmwarePlugin/APM/APMParameterFactMetaData.Rover.3.4.xml");
case MAV_TYPE_SUBMARINE:
if (vehicle->versionCompare(3, 6, 0) >= 0) { // 3.5.x
return QStringLiteral(":/FirmwarePlugin/APM/APMParameterFactMetaData.Sub.3.6dev.xml");
if (vehicle->versionCompare(4, 0, 0) >= 0) { // 4.0.x
return QStringLiteral(":/FirmwarePlugin/APM/APMParameterFactMetaData.Sub.4.0.xml");
}
if (vehicle->versionCompare(3, 6, 0) >= 0) { // 3.6.x
return QStringLiteral(":/FirmwarePlugin/APM/APMParameterFactMetaData.Sub.3.6.xml");
}
if (vehicle->versionCompare(3, 5, 0) >= 0) { // 3.5.x
return QStringLiteral(":/FirmwarePlugin/APM/APMParameterFactMetaData.Sub.3.5.xml");
......
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -56,7 +56,8 @@
<file alias="APMParameterFactMetaData.Rover.4.0.xml">APMParameterFactMetaData.Rover.4.0.xml</file>
<file alias="APMParameterFactMetaData.Sub.3.4.xml">APMParameterFactMetaData.Sub.3.4.xml</file>
<file alias="APMParameterFactMetaData.Sub.3.5.xml">APMParameterFactMetaData.Sub.3.5.xml</file>
<file alias="APMParameterFactMetaData.Sub.3.6dev.xml">APMParameterFactMetaData.Sub.3.6dev.xml</file>
<file alias="APMParameterFactMetaData.Sub.3.6.xml">APMParameterFactMetaData.Sub.3.6.xml</file>
<file alias="APMParameterFactMetaData.Sub.4.0.xml">APMParameterFactMetaData.Sub.4.0.xml</file>
<file alias="Copter.OfflineEditing.params">Copter3.6.OfflineEditing.params</file>
<file alias="Plane.OfflineEditing.params">Plane3.9.OfflineEditing.params</file>
<file alias="Rover.OfflineEditing.params">Rover3.5.OfflineEditing.params</file>
......
......@@ -118,6 +118,17 @@ ArduSubFirmwarePlugin::ArduSubFirmwarePlugin(void):
remapV3_6["BATT_LOW_MAH"] = QStringLiteral("FS_BATT_MAH");
remapV3_6["BATT_LOW_VOLT"] = QStringLiteral("FS_BATT_VOLTAGE");
remapV3_6["BATT_FS_LOW_ACT"] = QStringLiteral("FS_BATT_ENABLE");
remapV3_6["PSC_POSXY_P"] = QStringLiteral("POS_XY_P");
remapV3_6["PSC_POSZ_P"] = QStringLiteral("POS_Z_P");
remapV3_6["PSC_VELXY_P"] = QStringLiteral("VEL_XY_P");
remapV3_6["PSC_VELXY_I"] = QStringLiteral("VEL_XY_I");
remapV3_6["PSC_VELXY_IMAX"] = QStringLiteral("VEL_XY_IMAX");
remapV3_6["PSC_VELZ_P"] = QStringLiteral("VEL_Z_P");
remapV3_6["PSC_ACCZ_I"] = QStringLiteral("ACCEL_Z_I");
remapV3_6["PSC_ACCZ_D"] = QStringLiteral("ACCEL_Z_D");
remapV3_6["PSC_ACCZ_P"] = QStringLiteral("ACCEL_Z_P");
remapV3_6["PSC_ACCZ_IMAX"] = QStringLiteral("ACCEL_Z_IMAX");
remapV3_6["PSC_ACCZ_FILT"] = QStringLiteral("ACCEL_Z_FILT");
_remapParamNameIntialized = true;
}
......
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