Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Valentin Platzgummer
qgroundcontrol
Commits
1d8d52c1
Unverified
Commit
1d8d52c1
authored
Mar 29, 2019
by
Don Gagne
Committed by
GitHub
Mar 29, 2019
Browse files
Merge pull request #7330 from DonLakeFlyer/master
ArduCopter 3.7 CH#_OPT -> RC#_OPTION name change
parents
0f73e53f
62dbd2f5
Changes
8
Expand all
Hide whitespace changes
Inline
Side-by-side
ChangeLog.md
View file @
1d8d52c1
...
...
@@ -6,6 +6,7 @@ Note: This file only contains high level features or important fixes.
### 3.6.0 - Daily Build
*
ArduCopter: Handle 3.7 parameter name change from CH#_OPT to RC#_OPTION.
*
Improved support for flashing/connecting to ChibiOS bootloaders boards.
*
Making the camera API available to all firmwares, not just PX4.
*
ArduPilot: Support configurable mavlink stream rates. Available from Settings/Mavlink page.
...
...
src/AutoPilotPlugins/APM/APMTuningComponent.cc
View file @
1d8d52c1
...
...
@@ -60,10 +60,7 @@ QUrl APMTuningComponent::setupSource(void) const
case
MAV_TYPE_HEXAROTOR
:
case
MAV_TYPE_OCTOROTOR
:
case
MAV_TYPE_TRICOPTER
:
// Older firmwares do not have CH9_OPT, we don't support Tuning on older firmwares
if
(
_vehicle
->
parameterManager
()
->
parameterExists
(
-
1
,
QStringLiteral
(
"CH9_OPT"
)))
{
qmlFile
=
QStringLiteral
(
"qrc:/qml/APMTuningComponentCopter.qml"
);
}
qmlFile
=
QStringLiteral
(
"qrc:/qml/APMTuningComponentCopter.qml"
);
break
;
case
MAV_TYPE_SUBMARINE
:
qmlFile
=
QStringLiteral
(
"qrc:/qml/APMTuningComponentSub.qml"
);
...
...
src/AutoPilotPlugins/APM/APMTuningComponentCopter.qml
View file @
1d8d52c1
...
...
@@ -43,12 +43,12 @@ SetupPage {
property
Fact
_rateClimbP
:
controller
.
getParameterFact
(
-
1
,
"
r.PSC_ACCZ_P
"
)
property
Fact
_rateClimbI
:
controller
.
getParameterFact
(
-
1
,
"
r.PSC_ACCZ_I
"
)
property
Fact
_ch7Opt
:
controller
.
getParameterFact
(
-
1
,
"
C
H
7_OPT
"
)
property
Fact
_ch8Opt
:
controller
.
getParameterFact
(
-
1
,
"
C
H
8_OPT
"
)
property
Fact
_ch9Opt
:
controller
.
getParameterFact
(
-
1
,
"
C
H
9_OPT
"
)
property
Fact
_ch10Opt
:
controller
.
getParameterFact
(
-
1
,
"
C
H
10_OPT
"
)
property
Fact
_ch11Opt
:
controller
.
getParameterFact
(
-
1
,
"
C
H
11_OPT
"
)
property
Fact
_ch12Opt
:
controller
.
getParameterFact
(
-
1
,
"
C
H
12_OPT
"
)
property
Fact
_ch7Opt
:
controller
.
getParameterFact
(
-
1
,
"
r.R
C7_OPT
ION
"
)
property
Fact
_ch8Opt
:
controller
.
getParameterFact
(
-
1
,
"
r.R
C8_OPT
ION
"
)
property
Fact
_ch9Opt
:
controller
.
getParameterFact
(
-
1
,
"
r.R
C9_OPT
ION
"
)
property
Fact
_ch10Opt
:
controller
.
getParameterFact
(
-
1
,
"
r.R
C10_OPT
ION
"
)
property
Fact
_ch11Opt
:
controller
.
getParameterFact
(
-
1
,
"
r.R
C11_OPT
ION
"
)
property
Fact
_ch12Opt
:
controller
.
getParameterFact
(
-
1
,
"
r.R
C12_OPT
ION
"
)
readonly
property
int
_firstOptionChannel
:
7
readonly
property
int
_lastOptionChannel
:
12
...
...
@@ -84,12 +84,12 @@ SetupPage {
calcAutoTuneChannel
()
}
/// The AutoTune switch is stored in one of the C
H
#_OPT parameters. We need to loop through those
/// The AutoTune switch is stored in one of the
R
C#_OPT
ION
parameters. We need to loop through those
/// to find them and setup the ui accordindly.
function
calcAutoTuneChannel
()
{
_autoTuneSwitchChannelIndex
=
0
for
(
var
channel
=
_firstOptionChannel
;
channel
<=
_lastOptionChannel
;
channel
++
)
{
var
optionFact
=
controller
.
getParameterFact
(
-
1
,
"
C
H
"
+
channel
+
"
_OPT
"
)
var
optionFact
=
controller
.
getParameterFact
(
-
1
,
"
r.R
C
"
+
channel
+
"
_OPT
ION
"
)
if
(
optionFact
.
value
==
_autoTuneOption
)
{
_autoTuneSwitchChannelIndex
=
channel
-
_firstOptionChannel
+
1
break
...
...
@@ -101,7 +101,7 @@ SetupPage {
function
setChannelAutoTuneOption
(
channel
)
{
// First clear any previous settings for AutTune
for
(
var
optionChannel
=
_firstOptionChannel
;
optionChannel
<=
_lastOptionChannel
;
optionChannel
++
)
{
var
optionFact
=
controller
.
getParameterFact
(
-
1
,
"
C
H
"
+
optionChannel
+
"
_OPT
"
)
var
optionFact
=
controller
.
getParameterFact
(
-
1
,
"
r.R
C
"
+
optionChannel
+
"
_OPT
ION
"
)
if
(
optionFact
.
value
==
_autoTuneOption
)
{
optionFact
.
value
=
0
}
...
...
@@ -109,7 +109,7 @@ SetupPage {
// Now set the function into the new channel
if
(
channel
!=
0
)
{
var
optionFact
=
controller
.
getParameterFact
(
-
1
,
"
C
H
"
+
channel
+
"
_OPT
"
)
var
optionFact
=
controller
.
getParameterFact
(
-
1
,
"
r.R
C
"
+
channel
+
"
_OPT
ION
"
)
optionFact
.
value
=
_autoTuneOption
}
}
...
...
@@ -368,7 +368,7 @@ SetupPage {
QGCLabel
{
anchors.baseline
:
optCombo
.
baseline
text
:
qsTr
(
"
Channel Option
6
(Tuning):
"
)
text
:
qsTr
(
"
RC
Channel
6
Option (Tuning):
"
)
//color: controller.channelOptionEnabled[modelData] ? "yellow" : qgcPal.text
}
...
...
src/FirmwarePlugin/APM/APMFirmwarePlugin.cc
View file @
1d8d52c1
...
...
@@ -807,6 +807,9 @@ QString APMFirmwarePlugin::internalParameterMetaDataFile(Vehicle* vehicle)
case
MAV_TYPE_TRICOPTER
:
case
MAV_TYPE_COAXIAL
:
case
MAV_TYPE_HELICOPTER
:
if
(
vehicle
->
versionCompare
(
3
,
7
,
0
)
>=
0
)
{
// 3.7.0 and higher
return
QStringLiteral
(
":/FirmwarePlugin/APM/APMParameterFactMetaData.Copter.3.7.xml"
);
}
if
(
vehicle
->
versionCompare
(
3
,
6
,
0
)
>=
0
)
{
// 3.6.0 and higher
return
QStringLiteral
(
":/FirmwarePlugin/APM/APMParameterFactMetaData.Copter.3.6.xml"
);
}
...
...
src/FirmwarePlugin/APM/APMParameterFactMetaData.Copter.3.7.xml
0 → 100644
View file @
1d8d52c1
This diff is collapsed.
Click to expand it.
src/FirmwarePlugin/APM/APMResources.qrc
View file @
1d8d52c1
...
...
@@ -49,6 +49,7 @@
<file alias="APMParameterFactMetaData.Copter.3.4.xml">APMParameterFactMetaData.Copter.3.4.xml</file>
<file alias="APMParameterFactMetaData.Copter.3.5.xml">APMParameterFactMetaData.Copter.3.5.xml</file>
<file alias="APMParameterFactMetaData.Copter.3.6.xml">APMParameterFactMetaData.Copter.3.6.xml</file>
<file alias="APMParameterFactMetaData.Copter.3.7.xml">APMParameterFactMetaData.Copter.3.7.xml</file>
<file alias="APMParameterFactMetaData.Rover.3.0.xml">APMParameterFactMetaData.Rover.3.0.xml</file>
<file alias="APMParameterFactMetaData.Rover.3.2.xml">APMParameterFactMetaData.Rover.3.2.xml</file>
<file alias="APMParameterFactMetaData.Rover.3.4.xml">APMParameterFactMetaData.Rover.3.4.xml</file>
...
...
src/FirmwarePlugin/APM/ArduCopterFirmwarePlugin.cc
View file @
1d8d52c1
...
...
@@ -162,6 +162,12 @@ ArduCopterFirmwarePlugin::ArduCopterFirmwarePlugin(void)
remapV3_7
[
"BATT_ARM_VOLT"
]
=
QStringLiteral
(
"ARMING_VOLT_MIN"
);
remapV3_7
[
"BATT2_ARM_VOLT"
]
=
QStringLiteral
(
"ARMING_VOLT2_MIN"
);
remapV3_7
[
"RC7_OPTION"
]
=
QStringLiteral
(
"CH7_OPT"
);
remapV3_7
[
"RC8_OPTION"
]
=
QStringLiteral
(
"CH8_OPT"
);
remapV3_7
[
"RC9_OPTION"
]
=
QStringLiteral
(
"CH9_OPT"
);
remapV3_7
[
"RC10_OPTION"
]
=
QStringLiteral
(
"CH10_OPT"
);
remapV3_7
[
"RC11_OPTION"
]
=
QStringLiteral
(
"CH11_OPT"
);
remapV3_7
[
"RC12_OPTION"
]
=
QStringLiteral
(
"CH12_OPT"
);
_remapParamNameIntialized
=
true
;
}
...
...
src/FirmwarePlugin/APM/BuildParamMetaData.sh
0 → 100644
View file @
1d8d52c1
cd
~/repos/ardupilot
rm
apm.pdef.xml
./Tools/autotest/param_metadata/param_parse.py
--vehicle
ArduCopter
cp
apm.pdef.xml ~/repos/qgroundcontrol/src/FirmwarePlugin/APM/APMParameterFactMetaData.Copter.3.7.xml
rm
apm.pdef.xml
cd
~/repos/qgroundcontrol/src/FirmwarePlugin/APM
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment