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
4335dbad
Commit
4335dbad
authored
Aug 18, 2016
by
Don Gagne
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add vehicle type routines
parent
f62ceec0
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
65 additions
and
0 deletions
+65
-0
QGCMAVLink.cc
src/comm/QGCMAVLink.cc
+56
-0
QGCMAVLink.h
src/comm/QGCMAVLink.h
+9
-0
No files found.
src/comm/QGCMAVLink.cc
0 → 100644
View file @
4335dbad
/****************************************************************************
*
* (c) 2009-2016 QGROUNDCONTROL PROJECT <http://www.qgroundcontrol.org>
*
* QGroundControl is licensed according to the terms in the file
* COPYING.md in the root of the source code directory.
*
****************************************************************************/
#include "QGCMAVLink.h"
bool
QGCMAVLink
::
isFixedWing
(
MAV_TYPE
mavType
)
{
return
mavType
==
MAV_TYPE_FIXED_WING
;
}
bool
QGCMAVLink
::
isRover
(
MAV_TYPE
mavType
)
{
return
mavType
==
MAV_TYPE_GROUND_ROVER
;
}
bool
QGCMAVLink
::
isSub
(
MAV_TYPE
mavType
)
{
return
mavType
==
MAV_TYPE_SUBMARINE
;
}
bool
QGCMAVLink
::
isMultiRotor
(
MAV_TYPE
mavType
)
{
switch
(
mavType
)
{
case
MAV_TYPE_QUADROTOR
:
case
MAV_TYPE_COAXIAL
:
case
MAV_TYPE_HELICOPTER
:
case
MAV_TYPE_HEXAROTOR
:
case
MAV_TYPE_OCTOROTOR
:
case
MAV_TYPE_TRICOPTER
:
return
true
;
default:
return
false
;
}
}
bool
QGCMAVLink
::
isVTOL
(
MAV_TYPE
mavType
)
{
switch
(
mavType
)
{
case
MAV_TYPE_VTOL_DUOROTOR
:
case
MAV_TYPE_VTOL_QUADROTOR
:
case
MAV_TYPE_VTOL_TILTROTOR
:
case
MAV_TYPE_VTOL_RESERVED2
:
case
MAV_TYPE_VTOL_RESERVED3
:
case
MAV_TYPE_VTOL_RESERVED4
:
case
MAV_TYPE_VTOL_RESERVED5
:
return
true
;
default:
return
false
;
}
}
src/comm/QGCMAVLink.h
View file @
4335dbad
...
...
@@ -19,5 +19,14 @@
#include <mavlink.h>
class
QGCMAVLink
{
public:
static
bool
isFixedWing
(
MAV_TYPE
mavType
);
static
bool
isRover
(
MAV_TYPE
mavType
);
static
bool
isSub
(
MAV_TYPE
mavType
);
static
bool
isMultiRotor
(
MAV_TYPE
mavType
);
static
bool
isVTOL
(
MAV_TYPE
mavType
);
};
#endif // QGCMAVLINK_H
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