Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Q
qgroundcontrol
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Valentin Platzgummer
qgroundcontrol
Commits
c44f6cb3
Commit
c44f6cb3
authored
Dec 20, 2015
by
Don Gagne
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Show APM Airframe config at appropriate times
Also added missing FRAME types
parent
58b9c3f6
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
27 additions
and
35 deletions
+27
-35
qgcresources.qrc
qgcresources.qrc
+2
-20
APMAirframeComponent.cc
src/AutoPilotPlugins/APM/APMAirframeComponent.cc
+13
-7
APMAirframeComponent.h
src/AutoPilotPlugins/APM/APMAirframeComponent.h
+1
-1
APMAirframeComponentAirframes.cc
src/AutoPilotPlugins/APM/APMAirframeComponentAirframes.cc
+1
-1
APMAirframeFactMetaData.xml
src/AutoPilotPlugins/APM/APMAirframeFactMetaData.xml
+9
-5
APMAirframeLoader.cc
src/AutoPilotPlugins/APM/APMAirframeLoader.cc
+1
-1
No files found.
qgcresources.qrc
View file @
c44f6cb3
...
...
@@ -36,10 +36,9 @@
<file alias="VehicleSummaryIcon.png">src/VehicleSetup/VehicleSummaryIcon.png</file>
<file alias="VehicleTailDown.png">src/AutoPilotPlugins/PX4/Images/VehicleTailDown.png</file>
<file alias="VehicleUpsideDown.png">src/AutoPilotPlugins/PX4/Images/VehicleUpsideDown.png</file>
<file alias="attitudeDial.svg">src/FlightMap/Images/attitudeDial.svg</file>
<file alias="attitudeInstrument.svg">src/FlightMap/Images/attitudeInstrument.svg</file>
<file alias="attitudePointer.svg">src/
/
FlightMap/Images/attitudePointer.svg</file>
<file alias="attitudePointer.svg">src/FlightMap/Images/attitudePointer.svg</file>
<file alias="buttonHome.svg">src/FlightMap/Images/buttonHome.svg</file>
<file alias="buttonMore.svg">src/FlightMap/Images/buttonMore.svg</file>
<file alias="compassInstrumentAirplane.svg">src/FlightMap/Images/compassInstrumentAirplane.svg</file>
...
...
@@ -54,8 +53,6 @@
<file alias="airplaneOpaque.svg">src/FlightMap/Images/airplaneOpaque.svg</file>
<file alias="ZoomPlus.svg">src/FlightMap/Images/ZoomPlus.svg</file>
<file alias="ZoomMinus.svg">src/FlightMap/Images/ZoomMinus.svg</file>
<!-- Map Buttons -->
<file alias="ArrowHead.svg">src/FlightMap/Images/ArrowHead.svg</file>
<file alias="Help.svg">src/FlightMap/Images/Help.svg</file>
<file alias="HelpBlack.svg">src/FlightMap/Images/HelpBlack.svg</file>
...
...
@@ -72,8 +69,6 @@
<file alias="MapTypeBlack.svg">src/FlightMap/Images/MapTypeBlack.svg</file>
<file alias="TrashDelete.svg">src/FlightMap/Images/TrashDelete.svg</file>
<file alias="TrashDeleteBlack.svg">src/FlightMap/Images/TrashDeleteBlack.svg</file>
<!-- Toolbar -->
<file alias="Armed.svg">src/ui/toolbar/Images/Armed.svg</file>
<file alias="Battery.svg">src/ui/toolbar/Images/Battery.svg</file>
<file alias="Connect.svg">src/ui/toolbar/Images/Connect.svg</file>
...
...
@@ -95,11 +90,8 @@
<file alias="Signal100.svg">src/ui/toolbar/Images/Signal100.svg</file>
<file alias="TelemRSSI.svg">src/ui/toolbar/Images/TelemRSSI.svg</file>
<file alias="Yield.svg">src/ui/toolbar/Images/Yield.svg</file>
<file alias="CogWheel.svg">src/MissionManager/CogWheel.svg</file>
</qresource>
<qresource prefix="/res">
<file alias="AntennaRC">resources/Antenna_RC.svg</file>
<file alias="AntennaT">resources/Antenna_T.svg</file>
...
...
@@ -117,13 +109,11 @@
<file alias="XDelete.svg">resources/XDelete.svg</file>
<file alias="XDeleteBlack.svg">resources/XDeleteBlack.svg</file>
</qresource>
<qresource prefix="/res/firmware">
<file alias="px4.png">resources/firmware/px4.png</file>
<file alias="apm.png">resources/firmware/apm.png</file>
<file alias="3drradio.png">resources/firmware/3drradio.png</file>
</qresource>
<qresource prefix="/res/mavs">
<file alias="Helicopter">resources/mavs/helicopter.svg</file>
<file alias="Unknown">resources/mavs/unknown.svg</file>
...
...
@@ -145,7 +135,6 @@
<file alias="SurfaceBoat">resources/mavs/surface-boat.svg</file>
<file alias="TriCopter">resources/mavs/tricopter.svg</file>
</qresource>
<qresource prefix="/res/calibration">
<file alias="accel_back.png">resources/calibration/accel_back.png</file>
<file alias="accel_front.png">resources/calibration/accel_front.png</file>
...
...
@@ -154,7 +143,6 @@
<file alias="accel_up.png">resources/calibration/accel_up.png</file>
<file alias="accel_left.png">resources/calibration/accel_left.png</file>
</qresource>
<qresource prefix="/qml/calibration/mode1">
<file alias="radioCenter.png">resources/calibration/mode1/radioCenter.png</file>
<file alias="radioHome.png">resources/calibration/mode1/radioHome.png</file>
...
...
@@ -168,7 +156,6 @@
<file alias="radioThrottleDown.png">resources/calibration/mode1/radioThrottleDown.png</file>
<file alias="radioSwitchMinMax.png">resources/calibration/mode1/radioSwitchMinMax.png</file>
</qresource>
<qresource prefix="/qml/calibration/mode2">
<file alias="radioCenter.png">resources/calibration/mode2/radioCenter.png</file>
<file alias="radioHome.png">resources/calibration/mode2/radioHome.png</file>
...
...
@@ -182,7 +169,6 @@
<file alias="radioThrottleDown.png">resources/calibration/mode2/radioThrottleDown.png</file>
<file alias="radioSwitchMinMax.png">resources/calibration/mode2/radioSwitchMinMax.png</file>
</qresource>
<qresource prefix="/qml/calibration/joystick">
<file alias="joystickCenter.png">resources/calibration/joystick/joystickCenter.png</file>
<file alias="joystickRollLeft.png">resources/calibration/joystick/joystickRollLeft.png</file>
...
...
@@ -194,24 +180,20 @@
<file alias="joystickThrottleUp.png">resources/calibration/joystick/joystickThrottleUp.png</file>
<file alias="joystickThrottleDown.png">resources/calibration/joystick/joystickThrottleDown.png</file>
</qresource>
<qresource prefix="/res/styles">
<file alias="style-dark.css">resources/styles/style-dark.css</file>
<file alias="style-light.css">resources/styles/style-light.css</file>
</qresource>
<qresource prefix="/res/audio">
<file alias="Alert">resources/audio/alert.wav</file>
</qresource>
<qresource prefix="/AutoPilotPlugins/PX4">
<file alias="AirframeFactMetaData.xml">src/AutoPilotPlugins/PX4/AirframeFactMetaData.xml</file>
<file alias="ParameterFactMetaData.xml">src/AutoPilotPlugins/PX4/ParameterFactMetaData.xml</file>
</qresource>
<qresource prefix="/AutoPilotPlugins/APM">
<file alias="A
irframeFactMetaData.xml">src/AutoPilotPlugins/APM/
AirframeFactMetaData.xml</file>
<file alias="A
PMAirframeFactMetaData.xml">src/AutoPilotPlugins/APM/APM
AirframeFactMetaData.xml</file>
</qresource>
<qresource prefix="/FirmwarePlugin/APM">
<file alias="apm.pdef.xml">src/FirmwarePlugin/APM/apm.pdef.xml</file>
</qresource>
...
...
src/AutoPilotPlugins/APM/APMAirframeComponent.cc
View file @
c44f6cb3
...
...
@@ -29,10 +29,16 @@
APMAirframeComponent
::
APMAirframeComponent
(
Vehicle
*
vehicle
,
AutoPilotPlugin
*
autopilot
,
QObject
*
parent
)
:
APMComponent
(
vehicle
,
autopilot
,
parent
)
,
_
copterFirmware
(
false
)
,
_
requiresFrameSetup
(
false
)
,
_name
(
"Airframe"
)
{
_copterFirmware
=
qobject_cast
<
ArduCopterFirmwarePlugin
*>
(
_vehicle
->
firmwarePlugin
())
!=
NULL
;
if
(
qobject_cast
<
ArduCopterFirmwarePlugin
*>
(
_vehicle
->
firmwarePlugin
())
!=
NULL
)
{
_requiresFrameSetup
=
true
;
MAV_TYPE
vehicleType
=
vehicle
->
vehicleType
();
if
(
vehicleType
==
MAV_TYPE_TRICOPTER
||
vehicleType
==
MAV_TYPE_HELICOPTER
)
{
_requiresFrameSetup
=
false
;
}
}
}
QString
APMAirframeComponent
::
name
(
void
)
const
...
...
@@ -53,12 +59,12 @@ QString APMAirframeComponent::iconResource(void) const
bool
APMAirframeComponent
::
requiresSetup
(
void
)
const
{
return
_
copterFirmware
;
return
_
requiresFrameSetup
;
}
bool
APMAirframeComponent
::
setupComplete
(
void
)
const
{
if
(
_
copterFirmware
)
{
if
(
_
requiresFrameSetup
)
{
return
_autopilot
->
getParameterFact
(
FactSystem
::
defaultComponentId
,
"FRAME"
)
->
rawValue
().
toInt
()
>=
0
;
}
else
{
return
true
;
...
...
@@ -69,7 +75,7 @@ QStringList APMAirframeComponent::setupCompleteChangedTriggerList(void) const
{
QStringList
list
;
if
(
_
copterFirmware
)
{
if
(
_
requiresFrameSetup
)
{
list
<<
"FRAME"
;
}
...
...
@@ -78,7 +84,7 @@ QStringList APMAirframeComponent::setupCompleteChangedTriggerList(void) const
QUrl
APMAirframeComponent
::
setupSource
(
void
)
const
{
if
(
_
copterFirmware
)
{
if
(
_
requiresFrameSetup
)
{
return
QUrl
::
fromUserInput
(
"qrc:/qml/APMAirframeComponent.qml"
);
}
else
{
return
QUrl
();
...
...
@@ -87,7 +93,7 @@ QUrl APMAirframeComponent::setupSource(void) const
QUrl
APMAirframeComponent
::
summaryQmlSource
(
void
)
const
{
if
(
_
copterFirmware
)
{
if
(
_
requiresFrameSetup
)
{
return
QUrl
::
fromUserInput
(
"qrc:/qml/APMAirframeComponentSummary.qml"
);
}
else
{
return
QUrl
();
...
...
src/AutoPilotPlugins/APM/APMAirframeComponent.h
View file @
c44f6cb3
...
...
@@ -47,7 +47,7 @@ public:
virtual
QString
prerequisiteSetup
(
void
)
const
;
private:
bool
_
copterFirmware
;
bool
_
requiresFrameSetup
;
///< true: FRAME parameter must be set
const
QString
_name
;
};
...
...
src/AutoPilotPlugins/APM/APMAirframeComponentAirframes.cc
View file @
c44f6cb3
...
...
@@ -40,7 +40,7 @@ void APMAirframeComponentAirframes::insert(const QString& group, int groupId, co
g
=
new
AirframeType_t
;
g
->
name
=
group
;
g
->
type
=
groupId
;
g
->
imageResource
=
QString
(
"qrc:/qmlimages/"
)
+
(
!
image
.
isEmpty
()
?
image
:
QString
(
"AirframeStandardPlane.png"
))
;
g
->
imageResource
=
image
.
isEmpty
()
?
""
:
QString
(
"qrc:/qmlimages/"
)
+
image
;
rgAirframeTypes
.
insert
(
group
,
g
);
}
else
{
g
=
rgAirframeTypes
.
value
(
group
);
...
...
src/AutoPilotPlugins/APM/AirframeFactMetaData.xml
→
src/AutoPilotPlugins/APM/A
PMA
irframeFactMetaData.xml
View file @
c44f6cb3
<?xml version='1.0' encoding='UTF-8'?>
<airframes>
<version>
1
</version>
<airframe_group
image=
"AirframeQuadRotorPlus.png"
name=
"Plus
Styl
e"
id=
"0"
>
<airframe_group
image=
"AirframeQuadRotorPlus.png"
name=
"Plus
Fram
e"
id=
"0"
>
<airframe
name=
"3DR Aero M"
file=
"3DR_AERO_M.param"
/>
<airframe
name=
"3DR Aero RTF"
file=
"3DR_Aero_RTF.param"
/>
<airframe
name=
"3DR Rover"
file=
"3DR_Rover.param"
/>
...
...
@@ -9,22 +9,26 @@
<airframe
name=
"Parrot Bebop"
file=
"Parrot_Bebop.param"
/>
<airframe
name=
"Storm32"
file=
"SToRM32-MAVLink.param"
/>
</airframe_group>
<airframe_group
image=
"AirframeQuadRotorX.png"
name=
"X
Styl
e"
id=
"1"
>
<airframe_group
image=
"AirframeQuadRotorX.png"
name=
"X
Frame, Y6A Fram
e"
id=
"1"
>
<airframe
name=
"3DR X8-M RTF"
file=
"3DR_X8-M_RTF.param"
/>
<airframe
name=
"3DR Y6A"
file=
"3DR_Y6A_RTF.param"
/>
<airframe
name=
"3DR X8+ RTF"
file=
"3DR_X8+_RTF.param"
/>
<airframe
name=
"3DR QUAD X4 RTF"
file=
"3DR_QUAD_X4_RTF.param"
/>
<airframe
name=
"3DR X8"
file=
"3DR_X8_RTF.param"
/>
</airframe_group>
<airframe_group
image=
"Airframe
Simulation.png"
name=
"V Style
"
id=
"2"
>
<airframe_group
image=
"Airframe
QuadRotorH.png"
name=
"V Frame (3DR Iris)
"
id=
"2"
>
<airframe
name=
"Iris with GoPro"
file=
"Iris with Front Mount Go Pro.param"
/>
<airframe
name=
"Iris with Tarot"
file=
"Iris with Tarot Gimbal.param"
/>
<airframe
name=
"3DR Iris+"
file=
"3DR_Iris+.param"
/>
<airframe
name=
"Iris"
file=
"Iris.param"
/>
</airframe_group>
<airframe_group
image=
"AirframeQuadRotorH.png"
name=
"
H Style"
id=
"3
"
>
<airframe_group
image=
"AirframeQuadRotorH.png"
name=
"
V Tail Frame"
id=
"4
"
>
</airframe_group>
<airframe_group
image=
"AirframeHexaRotorX.png"
name=
"Y6B"
id=
"10"
>
<airframe_group
image=
"AirframeQuadRotorH.png"
name=
"A Tail Frame"
id=
"5"
>
</airframe_group>
<airframe_group
name=
"H Frame"
id=
"3"
>
</airframe_group>
<airframe_group
name=
"Y6B Frame (3DR TriCopter)"
id=
"10"
>
<airframe
name=
"3DR Y6B"
file=
"3DR_Y6B_RTF.param"
/>
</airframe_group>
<airframes>
src/AutoPilotPlugins/APM/APMAirframeLoader.cc
View file @
c44f6cb3
...
...
@@ -57,7 +57,7 @@ void APMAirframeLoader::loadAirframeFactMetaData(void)
Q_ASSERT
(
APMAirframeComponentAirframes
::
get
().
count
()
==
0
);
QString
airframeFilename
=
":/AutoPilotPlugins/APM/AirframeFactMetaData.xml"
;
QString
airframeFilename
=
":/AutoPilotPlugins/APM/A
PMA
irframeFactMetaData.xml"
;
qCDebug
(
APMAirframeLoaderLog
)
<<
"Loading meta data file:"
<<
airframeFilename
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a 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