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 { ...@@ -105,27 +105,62 @@ SetupPage {
height: velColumn.height + _margins*2 height: velColumn.height + _margins*2
color: palette.windowShade color: palette.windowShade
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 { Column {
id: velColumn
anchors.margins: _margins anchors.margins: _margins
anchors.left: parent.left anchors.left: parent.left
anchors.right: parent.right anchors.right: parent.right
anchors.top: parent.top anchors.top: parent.top
spacing: _margins*1.5 spacing: _margins*1.5
FactTextFieldSlider { fact: controller.getParameterFact(-1, "POS_XY_P") } FactTextFieldSlider { fact: controller.getParameterFact(-1, "r.PSC_POSXY_P") }
FactTextFieldSlider { fact: controller.getParameterFact(-1, "POS_Z_P") } FactTextFieldSlider { fact: controller.getParameterFact(-1, "r.PSC_POSZ_P") }
FactTextFieldSlider { fact: controller.getParameterFact(-1, "VEL_XY_P") } FactTextFieldSlider { fact: controller.getParameterFact(-1, "r.PSC_VELXY_P") }
FactTextFieldSlider { fact: controller.getParameterFact(-1, "VEL_XY_I") } FactTextFieldSlider { fact: controller.getParameterFact(-1, "r.PSC_VELXY_I") }
FactTextFieldSlider { fact: controller.getParameterFact(-1, "VEL_XY_IMAX") } FactTextFieldSlider { fact: controller.getParameterFact(-1, "r.PSC_VELXY_IMAX") }
FactTextFieldSlider { fact: controller.getParameterFact(-1, "VEL_Z_P") } FactTextFieldSlider { fact: controller.getParameterFact(-1, "r.PSC_VELZ_P") }
FactTextFieldSlider { fact: controller.getParameterFact(-1, "ACCEL_Z_D") } FactTextFieldSlider { fact: controller.getParameterFact(-1, "r.PSC_ACCZ_D") }
FactTextFieldSlider { fact: controller.getParameterFact(-1, "ACCEL_Z_FILT") } FactTextFieldSlider { fact: controller.getParameterFact(-1, "r.PSC_ACCZ_FLTD") }
FactTextFieldSlider { fact: controller.getParameterFact(-1, "ACCEL_Z_I") } FactTextFieldSlider { fact: controller.getParameterFact(-1, "r.PSC_ACCZ_FLTE") }
FactTextFieldSlider { fact: controller.getParameterFact(-1, "ACCEL_Z_IMAX") } FactTextFieldSlider { fact: controller.getParameterFact(-1, "r.PSC_ACCZ_FLTT") }
FactTextFieldSlider { fact: controller.getParameterFact(-1, "ACCEL_Z_P") } 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 } // Column - VEL parameters
}
Loader {
id: velColumn
anchors.left: parent.left
anchors.right: parent.right
anchors.top: parent.top
sourceComponent: activeVehicle.versionCompare(3, 6, 0) <= 0 ? velColumnUpTo36 :velColumnUpTo36
}
} // Rectangle - VEL parameters } // Rectangle - VEL parameters
Rectangle { Rectangle {
...@@ -136,14 +171,17 @@ SetupPage { ...@@ -136,14 +171,17 @@ SetupPage {
height: wpnavColumn.height + _margins*2 height: wpnavColumn.height + _margins*2
color: palette.windowShade color: palette.windowShade
// WPNAV parameters up to 3.5
Component {
id: wpnavColumn35
Column { Column {
id: wpnavColumn
anchors.margins: _margins anchors.margins: _margins
anchors.left: parent.left anchors.left: parent.left
anchors.right: parent.right anchors.right: parent.right
anchors.top: parent.top anchors.top: parent.top
spacing: _margins*1.5 spacing: _margins*1.5
FactTextFieldSlider { fact: controller.getParameterFact(-1, "WPNAV_ACCEL") } FactTextFieldSlider { fact: controller.getParameterFact(-1, "WPNAV_ACCEL") }
FactTextFieldSlider { fact: controller.getParameterFact(-1, "WPNAV_ACCEL_Z") } FactTextFieldSlider { fact: controller.getParameterFact(-1, "WPNAV_ACCEL_Z") }
FactTextFieldSlider { fact: controller.getParameterFact(-1, "WPNAV_LOIT_JERK") } FactTextFieldSlider { fact: controller.getParameterFact(-1, "WPNAV_LOIT_JERK") }
...@@ -154,8 +192,42 @@ SetupPage { ...@@ -154,8 +192,42 @@ SetupPage {
FactTextFieldSlider { fact: controller.getParameterFact(-1, "WPNAV_SPEED") } FactTextFieldSlider { fact: controller.getParameterFact(-1, "WPNAV_SPEED") }
FactTextFieldSlider { fact: controller.getParameterFact(-1, "WPNAV_SPEED_DN") } FactTextFieldSlider { fact: controller.getParameterFact(-1, "WPNAV_SPEED_DN") }
FactTextFieldSlider { fact: controller.getParameterFact(-1, "WPNAV_SPEED_UP") } 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") }
}
}
} // Column - WPNAV parameters Loader {
id: wpnavColumn
anchors.left: parent.left
anchors.right: parent.right
anchors.top: parent.top
sourceComponent: activeVehicle.versionCompare(3, 6, 0) < 0 ? wpnavColumn35 : wpnavColumn36
}
} // Rectangle - WPNAV parameters } // Rectangle - WPNAV parameters
} // Column } // Column
} // Component } // Component
......
...@@ -876,8 +876,11 @@ QString APMFirmwarePlugin::internalParameterMetaDataFile(Vehicle* vehicle) ...@@ -876,8 +876,11 @@ QString APMFirmwarePlugin::internalParameterMetaDataFile(Vehicle* vehicle)
return QStringLiteral(":/FirmwarePlugin/APM/APMParameterFactMetaData.Rover.3.4.xml"); return QStringLiteral(":/FirmwarePlugin/APM/APMParameterFactMetaData.Rover.3.4.xml");
case MAV_TYPE_SUBMARINE: case MAV_TYPE_SUBMARINE:
if (vehicle->versionCompare(3, 6, 0) >= 0) { // 3.5.x if (vehicle->versionCompare(4, 0, 0) >= 0) { // 4.0.x
return QStringLiteral(":/FirmwarePlugin/APM/APMParameterFactMetaData.Sub.3.6dev.xml"); 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 if (vehicle->versionCompare(3, 5, 0) >= 0) { // 3.5.x
return QStringLiteral(":/FirmwarePlugin/APM/APMParameterFactMetaData.Sub.3.5.xml"); 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 @@ ...@@ -56,7 +56,8 @@
<file alias="APMParameterFactMetaData.Rover.4.0.xml">APMParameterFactMetaData.Rover.4.0.xml</file> <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.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.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="Copter.OfflineEditing.params">Copter3.6.OfflineEditing.params</file>
<file alias="Plane.OfflineEditing.params">Plane3.9.OfflineEditing.params</file> <file alias="Plane.OfflineEditing.params">Plane3.9.OfflineEditing.params</file>
<file alias="Rover.OfflineEditing.params">Rover3.5.OfflineEditing.params</file> <file alias="Rover.OfflineEditing.params">Rover3.5.OfflineEditing.params</file>
......
...@@ -118,6 +118,17 @@ ArduSubFirmwarePlugin::ArduSubFirmwarePlugin(void): ...@@ -118,6 +118,17 @@ ArduSubFirmwarePlugin::ArduSubFirmwarePlugin(void):
remapV3_6["BATT_LOW_MAH"] = QStringLiteral("FS_BATT_MAH"); remapV3_6["BATT_LOW_MAH"] = QStringLiteral("FS_BATT_MAH");
remapV3_6["BATT_LOW_VOLT"] = QStringLiteral("FS_BATT_VOLTAGE"); remapV3_6["BATT_LOW_VOLT"] = QStringLiteral("FS_BATT_VOLTAGE");
remapV3_6["BATT_FS_LOW_ACT"] = QStringLiteral("FS_BATT_ENABLE"); 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; _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