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
2d5018d6
Commit
2d5018d6
authored
May 31, 2016
by
Lorenz Meier
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update XPlane link
parent
67bb4089
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
19 deletions
+15
-19
QGCXPlaneLink.cc
src/comm/QGCXPlaneLink.cc
+15
-19
No files found.
src/comm/QGCXPlaneLink.cc
View file @
2d5018d6
...
...
@@ -2,7 +2,7 @@
QGroundControl Open Source Ground Control Station
(c) 2009 - 201
1
QGROUNDCONTROL PROJECT <http://www.qgroundcontrol.org>
(c) 2009 - 201
6
QGROUNDCONTROL PROJECT <http://www.qgroundcontrol.org>
This file is part of the QGROUNDCONTROL project
...
...
@@ -24,7 +24,7 @@ This file is part of the QGROUNDCONTROL project
/**
* @file QGCXPlaneLink.cc
* Implementation of X-Plane interface
* @author Lorenz Meier <
mavteam@student.ethz.ch
>
* @author Lorenz Meier <
lm@qgroundcontrol.org
>
*
*/
...
...
@@ -371,7 +371,9 @@ void QGCXPlaneLink::updateControls(quint64 time, float rollAilerons, float pitch
bool
isFixedWing
=
true
;
if
(
_vehicle
->
vehicleType
()
==
MAV_TYPE_QUADROTOR
)
if
(
_vehicle
->
vehicleType
()
==
MAV_TYPE_QUADROTOR
||
mav
->
getSystemType
()
==
MAV_TYPE_HEXAROTOR
||
mav
->
getSystemType
()
==
MAV_TYPE_OCTOROTOR
)
{
qDebug
()
<<
"MAV_TYPE_QUADROTOR"
;
...
...
@@ -381,7 +383,9 @@ void QGCXPlaneLink::updateControls(quint64 time, float rollAilerons, float pitch
p
.
f
[
2
]
=
throttle
;
p
.
f
[
3
]
=
pitchElevator
;
isFixedWing
=
false
;
// Direct throttle control
p
.
index
=
25
;
writeBytesSafe
((
const
char
*
)
&
p
,
sizeof
(
p
));
}
else
{
...
...
@@ -389,34 +393,26 @@ void QGCXPlaneLink::updateControls(quint64 time, float rollAilerons, float pitch
p
.
f
[
0
]
=
-
pitchElevator
;
p
.
f
[
1
]
=
rollAilerons
;
p
.
f
[
2
]
=
yawRudder
;
}
if
(
isFixedWing
)
{
// Ail / Elevon / Rudder
p
.
index
=
12
;
// XPlane, wing sweep
// Send to group 12
p
.
index
=
12
;
writeBytesSafe
((
const
char
*
)
&
p
,
sizeof
(
p
));
p
.
index
=
8
;
// XPlane, joystick? why?
// Send to group 8, which equals manual controls
p
.
index
=
8
;
writeBytesSafe
((
const
char
*
)
&
p
,
sizeof
(
p
));
p
.
index
=
25
;
// Thrust
// Send throttle to all four motors
p
.
index
=
25
;
memset
(
p
.
f
,
0
,
sizeof
(
p
.
f
));
p
.
f
[
0
]
=
throttle
;
p
.
f
[
1
]
=
throttle
;
p
.
f
[
2
]
=
throttle
;
p
.
f
[
3
]
=
throttle
;
// Throttle
writeBytesSafe
((
const
char
*
)
&
p
,
sizeof
(
p
));
}
else
{
qDebug
()
<<
"Transmitting p.index = 25"
;
p
.
index
=
25
;
// XPlane, throttle command.
writeBytesSafe
((
const
char
*
)
&
p
,
sizeof
(
p
));
}
}
Eigen
::
Matrix3f
euler_to_wRo
(
double
yaw
,
double
pitch
,
double
roll
)
{
...
...
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