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
8a049a99
Commit
8a049a99
authored
Feb 08, 2016
by
Don Gagne
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add fixedWing and multiRotor properties
parent
f4622c87
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
27 additions
and
2 deletions
+27
-2
Vehicle.cc
src/Vehicle/Vehicle.cc
+20
-0
Vehicle.h
src/Vehicle/Vehicle.h
+7
-2
No files found.
src/Vehicle/Vehicle.cc
View file @
8a049a99
...
...
@@ -1334,3 +1334,23 @@ void Vehicle::_say(const QString& text, int severity)
if
(
!
qgcApp
()
->
runningUnitTests
())
qgcApp
()
->
toolbox
()
->
audioOutput
()
->
say
(
text
.
toLower
(),
severity
);
}
bool
Vehicle
::
fixedWing
(
void
)
const
{
return
vehicleType
()
==
MAV_TYPE_FIXED_WING
;
}
bool
Vehicle
::
multiRotor
(
void
)
const
{
switch
(
vehicleType
())
{
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
;
}
}
src/Vehicle/Vehicle.h
View file @
8a049a99
...
...
@@ -122,6 +122,8 @@ public:
Q_PROPERTY
(
uint
messagesReceived
READ
messagesReceived
NOTIFY
messagesReceivedChanged
)
Q_PROPERTY
(
uint
messagesSent
READ
messagesSent
NOTIFY
messagesSentChanged
)
Q_PROPERTY
(
uint
messagesLost
READ
messagesLost
NOTIFY
messagesLostChanged
)
Q_PROPERTY
(
bool
fixedWing
READ
fixedWing
CONSTANT
)
Q_PROPERTY
(
bool
multiRotor
READ
multiRotor
CONSTANT
)
/// Resets link status counters
Q_INVOKABLE
void
resetCounters
();
...
...
@@ -170,8 +172,8 @@ public:
// Property accesors
int
id
(
void
)
{
return
_id
;
}
MAV_AUTOPILOT
firmwareType
(
void
)
{
return
_firmwareType
;
}
MAV_TYPE
vehicleType
(
void
)
{
return
_vehicleType
;
}
MAV_AUTOPILOT
firmwareType
(
void
)
const
{
return
_firmwareType
;
}
MAV_TYPE
vehicleType
(
void
)
const
{
return
_vehicleType
;
}
/// Returns the highest quality link available to the Vehicle
LinkInterface
*
priorityLink
(
void
);
...
...
@@ -214,6 +216,9 @@ public:
bool
hilMode
(
void
);
void
setHilMode
(
bool
hilMode
);
bool
fixedWing
(
void
)
const
;
bool
multiRotor
(
void
)
const
;
QmlObjectListModel
*
trajectoryPoints
(
void
)
{
return
&
_mapTrajectoryList
;
}
int
flowImageIndex
()
{
return
_flowImageIndex
;
}
...
...
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