Unverified Commit 6ae0542c authored by Don Gagne's avatar Don Gagne Committed by GitHub

Merge pull request #5885 from bluerobotics/pr-arming-volt-param

Add ARMING_VOLT_MIN parameter to Power setup page
parents 935b0b2e 803f518f
......@@ -29,6 +29,7 @@ SetupPage {
Column {
spacing: _margins
property Fact armVoltMin: controller.getParameterFact(-1, "r.ARMING_VOLT_MIN")
property Fact battAmpPerVolt: controller.getParameterFact(-1, "BATT_AMP_PERVOLT")
property Fact battCapacity: controller.getParameterFact(-1, "BATT_CAPACITY")
property Fact battCurrPin: controller.getParameterFact(-1, "BATT_CURR_PIN")
......@@ -239,6 +240,18 @@ SetupPage {
QGCLabel {
Layout.row: 2
Layout.column: 0
text: qsTr("Minimum arming voltage:")
}
FactTextField {
id: armVoltField
width: _fieldWidth
fact: armVoltMin
}
QGCLabel {
Layout.row: 3
Layout.column: 0
text: qsTr("Power sensor:")
}
......@@ -260,7 +273,7 @@ SetupPage {
}
QGCLabel {
Layout.row: 3
Layout.row: 4
Layout.column: 0
text: qsTr("Current pin:")
visible: _showAdvanced
......@@ -274,7 +287,7 @@ SetupPage {
}
QGCLabel {
Layout.row: 4
Layout.row: 5
Layout.column: 0
text: qsTr("Voltage pin:")
visible: _showAdvanced
......@@ -288,7 +301,7 @@ SetupPage {
}
QGCLabel {
Layout.row: 5
Layout.row: 6
Layout.column: 0
text: qsTr("Voltage multiplier:")
visible: _showAdvanced
......
......@@ -145,6 +145,9 @@ ArduCopterFirmwarePlugin::ArduCopterFirmwarePlugin(void)
remapV3_5["SERVO13_REVERSED"] = QStringLiteral("RC13_REVERSED");
remapV3_5["SERVO14_REVERSED"] = QStringLiteral("RC14_REVERSED");
remapV3_5["ARMING_VOLT_MIN"] = QStringLiteral("ARMING_MIN_VOLT");
remapV3_5["ARMING_VOLT2_MIN"] = QStringLiteral("ARMING_MIN_VOLT2");
_remapParamNameIntialized = true;
}
}
......
......@@ -110,6 +110,9 @@ ArduPlaneFirmwarePlugin::ArduPlaneFirmwarePlugin(void)
remapV3_8["SERVO13_REVERSED"] = QStringLiteral("RC13_REVERSED");
remapV3_8["SERVO14_REVERSED"] = QStringLiteral("RC14_REVERSED");
remapV3_8["ARMING_VOLT_MIN"] = QStringLiteral("ARMING_MIN_VOLT");
remapV3_8["ARMING_VOLT2_MIN"] = QStringLiteral("ARMING_MIN_VOLT2");
_remapParamNameIntialized = true;
}
}
......
......@@ -89,6 +89,9 @@ ArduRoverFirmwarePlugin::ArduRoverFirmwarePlugin(void)
remapV3_2["SERVO13_REVERSED"] = QStringLiteral("RC13_REVERSED");
remapV3_2["SERVO14_REVERSED"] = QStringLiteral("RC14_REVERSED");
remapV3_2["ARMING_VOLT_MIN"] = QStringLiteral("ARMING_MIN_VOLT");
remapV3_2["ARMING_VOLT2_MIN"] = QStringLiteral("ARMING_MIN_VOLT2");
_remapParamNameIntialized = true;
}
}
......
......@@ -110,6 +110,11 @@ ArduSubFirmwarePlugin::ArduSubFirmwarePlugin(void):
remapV3_5["FENCE_ALT_MIN"] = QStringLiteral("FENCE_DEPTH_MAX");
FirmwarePlugin::remapParamNameMap_t& remapV3_6 = _remapParamName[3][6];
remapV3_6["ARMING_VOLT_MIN"] = QStringLiteral("ARMING_MIN_VOLT");
remapV3_6["ARMING_VOLT2_MIN"] = QStringLiteral("ARMING_MIN_VOLT2");
_remapParamNameIntialized = true;
}
......@@ -150,8 +155,8 @@ QList<MAV_CMD> ArduSubFirmwarePlugin::supportedMissionCommands(void)
int ArduSubFirmwarePlugin::remapParamNameHigestMinorVersionNumber(int majorVersionNumber) const
{
// Remapping supports up to 3.5
return majorVersionNumber == 3 ? 5 : Vehicle::versionNotSetValue;
// Remapping supports up to 3.6
return majorVersionNumber == 3 ? 6 : Vehicle::versionNotSetValue;
}
int ArduSubFirmwarePlugin::manualControlReservedButtonCount(void)
......
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