Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Q
qgroundcontrol
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Valentin Platzgummer
qgroundcontrol
Commits
3ce01da8
Commit
3ce01da8
authored
9 years ago
by
Lorenz Meier
Browse files
Options
Downloads
Patches
Plain Diff
Airframes list: Fix format
parent
577e498b
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/AutoPilotPlugins/PX4/AirframeComponentAirframes.cc
+33
-89
33 additions, 89 deletions
src/AutoPilotPlugins/PX4/AirframeComponentAirframes.cc
src/AutoPilotPlugins/PX4/AirframeComponentAirframes.h
+9
-8
9 additions, 8 deletions
src/AutoPilotPlugins/PX4/AirframeComponentAirframes.h
with
42 additions
and
97 deletions
src/AutoPilotPlugins/PX4/AirframeComponentAirframes.cc
+
33
−
89
View file @
3ce01da8
...
...
@@ -26,99 +26,43 @@
#include
"AirframeComponentAirframes.h"
QMap
<
QString
,
AirframeComponentAirframes
::
AirframeType_t
>
AirframeComponentAirframes
::
rgAirframeTypes
;
QMap
<
QString
,
AirframeComponentAirframes
::
AirframeType_t
*
>
AirframeComponentAirframes
::
rgAirframeTypes
;
AirframeComponentAirframes
::
AirframeComponentAirframes
()
{
QMap
<
QString
,
AirframeComponentAirframes
::
AirframeType_t
*>&
AirframeComponentAirframes
::
get
()
{
// Set a single airframe to prevent the UI from going crazy
if
(
rgAirframeTypes
.
count
()
==
0
)
{
// Standard planes
AirframeType_t
standardPlane
=
{
"Standard Airplane"
,
"qrc:/qmlimages/AirframeStandardPlane.png"
,
};
AirframeInfo_t
easystar
=
{
"Multiplex Easystar 1/2"
,
2100
};
standardPlane
.
rgAirframeInfo
.
append
(
easystar
);
AirframeType_t
*
standardPlane
=
new
AirframeType_t
;
standardPlane
->
name
=
"Standard Airplane"
;
standardPlane
->
imageResource
=
"qrc:/qmlimages/AirframeStandardPlane.png"
;
AirframeInfo_t
*
easystar
=
new
AirframeInfo_t
;
easystar
->
name
=
"Multiplex Easystar 1/2"
;
easystar
->
autostartId
=
2100
;
standardPlane
->
rgAirframeInfo
.
append
(
easystar
);
rgAirframeTypes
.
insert
(
"StandardPlane"
,
standardPlane
);
qDebug
()
<<
"Adding plane config"
;
// Flying wings
}
//const AirframeComponentAirframes::AirframeInfo_t AirframeComponentAirframes::_rgAirframeInfoStandardPlane[] = {
// { "Multiplex Easystar 1/2", 2100 },
// { "Generic AERT", 2101 },
// { "3DR Skywalker", 2102 },
// { "Skyhunter (1800 mm)", 2103 },
// { "Generic AETR", 2104 },
// { NULL, 0 }
//};
//const AirframeComponentAirframes::AirframeInfo_t AirframeComponentAirframes::_rgAirframeInfoSimulation[] = {
// { "Plane (HilStar, X-Plane)", 1000 },
// { "Plane (Rascal, FlightGear)", 1004 },
// { "Quad X HIL", 1001 },
// { "Quad + HIL", 1003 },
// { NULL, 0 }
//};
//const AirframeComponentAirframes::AirframeInfo_t AirframeComponentAirframes::_rgAirframeInfoFlyingWing[] = {
// { "Z-84 Wing Wing (845 mm)", 3033 },
// { "TBS Caipirinha (850 mm)", 3100 },
// { "Bormatec Camflyer Q (800 mm)", 3030 },
// { "FX-61 Phantom FPV (1550 mm)", 3031 },
// { "FX-79 Buffalo (2000 mm)", 3034 },
// { "Skywalker X5 (1180 mm)", 3032 },
// { "Viper v2 (3000 mm)", 3035 },
// { NULL, 0 }
//};
//const AirframeComponentAirframes::AirframeInfo_t AirframeComponentAirframes::_rgAirframeInfoQuadRotorX[] = {
// { "DJI F330 8\" Quad", 4010 },
// { "DJI F450 10\" Quad", 4011 },
// { "X frame Quad UAVCAN", 4012 },
// { "AR.Drone Frame Quad", 4008 },
// { NULL, 0 }
//};
//const AirframeComponentAirframes::AirframeInfo_t AirframeComponentAirframes::_rgAirframeInfoQuadRotorPlus[] = {
// { "Generic 10\" Quad +", 5001 },
// { NULL, 0 }
//};
//const AirframeComponentAirframes::AirframeInfo_t AirframeComponentAirframes::_rgAirframeInfoHexaRotorX[] = {
// { "Standard 10\" Hexa X", 6001 },
// { "Coaxial 10\" Hexa X", 11001 },
// { NULL, 0 }
//};
//const AirframeComponentAirframes::AirframeInfo_t AirframeComponentAirframes::_rgAirframeInfoHexaRotorPlus[] = {
// { "Standard 10\" Hexa", 7001 },
// { NULL, 0 }
//};
//const AirframeComponentAirframes::AirframeInfo_t AirframeComponentAirframes::_rgAirframeInfoOctoRotorX[] = {
// { "Standard 10\" Octo", 8001 },
// { "Coaxial 10\" Octo", 12001 },
// { NULL, 0 }
//};
//const AirframeComponentAirframes::AirframeInfo_t AirframeComponentAirframes::_rgAirframeInfoOctoRotorPlus[] = {
// { "Standard 10\" Octo", 9001 },
// { NULL, 0 }
//};
//const AirframeComponentAirframes::AirframeInfo_t AirframeComponentAirframes::_rgAirframeInfoQuadRotorH[] = {
// { "3DR Iris", 10016 },
// { "TBS Discovery", 10015 },
// { "SteadiDrone QU4D", 10017 },
// { NULL, 0 }
//};
//const AirframeComponentAirframes::AirframeType_t AirframeComponentAirframes::rgAirframeTypes[] = {
// { "Standard Airplane", "qrc:/qmlimages/AirframeStandardPlane.png", AirframeComponentAirframes::_rgAirframeInfoStandardPlane },
// { "Flying Wing", "qrc:/qmlimages/AirframeFlyingWing.png", AirframeComponentAirframes::_rgAirframeInfoFlyingWing },
// { "QuadRotor X", "qrc:/qmlimages/AirframeQuadRotorX.png", AirframeComponentAirframes::_rgAirframeInfoQuadRotorX },
// { "QuadRotor +", "qrc:/qmlimages/AirframeQuadRotorPlus.png", AirframeComponentAirframes::_rgAirframeInfoQuadRotorPlus },
// { "HexaRotor X", "qrc:/qmlimages/AirframeHexaRotorX.png", AirframeComponentAirframes::_rgAirframeInfoHexaRotorX },
// { "HexaRotor +", "qrc:/qmlimages/AirframeHexaRotorPlus.png", AirframeComponentAirframes::_rgAirframeInfoHexaRotorPlus },
// { "OctoRotor X", "qrc:/qmlimages/AirframeOctoRotorX.png", AirframeComponentAirframes::_rgAirframeInfoOctoRotorX },
// { "OctoRotor +", "qrc:/qmlimages/AirframeOctoRotorPlus.png", AirframeComponentAirframes::_rgAirframeInfoOctoRotorPlus },
// { "QuadRotor H", "qrc:/qmlimages/AirframeQuadRotorH.png", AirframeComponentAirframes::_rgAirframeInfoQuadRotorH },
// { "Simulation", "qrc:/qmlimages/AirframeSimulation.png", AirframeComponentAirframes::_rgAirframeInfoSimulation },
// { NULL, NULL, NULL }
//};
return
rgAirframeTypes
;
}
void
AirframeComponentAirframes
::
clear
()
{
// Run through all and delete them
for
(
unsigned
tindex
=
0
;
tindex
<
AirframeComponentAirframes
::
get
().
count
();
tindex
++
)
{
const
AirframeComponentAirframes
::
AirframeType_t
*
pType
=
AirframeComponentAirframes
::
get
().
values
().
at
(
tindex
);
for
(
unsigned
index
=
0
;
index
<
pType
->
rgAirframeInfo
.
count
();
index
++
)
{
const
AirframeComponentAirframes
::
AirframeInfo_t
*
pInfo
=
pType
->
rgAirframeInfo
.
at
(
index
);
delete
pInfo
;
}
delete
pType
;
}
rgAirframeTypes
.
clear
();
}
This diff is collapsed.
Click to expand it.
src/AutoPilotPlugins/PX4/AirframeComponentAirframes.h
+
9
−
8
View file @
3ce01da8
...
...
@@ -39,21 +39,22 @@
class
AirframeComponentAirframes
{
public:
AirframeComponentAirframes
();
typedef
struct
{
const
char
*
name
;
QString
name
;
int
autostartId
;
}
AirframeInfo_t
;
typedef
struct
{
const
char
*
name
;
const
char
*
imageResource
;
QList
<
AirframeInfo_t
>
rgAirframeInfo
;
QString
name
;
QString
imageResource
;
QList
<
AirframeInfo_t
*
>
rgAirframeInfo
;
}
AirframeType_t
;
public
:
static
QMap
<
QString
,
AirframeType_t
>
rgAirframeTypes
;
static
QMap
<
QString
,
AirframeComponentAirframes
::
AirframeType_t
*>&
get
();
static
void
clear
();
protected
:
static
QMap
<
QString
,
AirframeType_t
*>
rgAirframeTypes
;
private
:
};
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
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!
Save comment
Cancel
Please
register
or
sign in
to comment