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
7b1df3b8
Commit
7b1df3b8
authored
Nov 11, 2012
by
Lorenz Meier
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixes to X Plane HIL
parent
716915e3
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
33 additions
and
32 deletions
+33
-32
qgroundcontrol.pro
qgroundcontrol.pro
+0
-1
QGCHilLink.cc
src/comm/QGCHilLink.cc
+0
-6
QGCXPlaneLink.cc
src/comm/QGCXPlaneLink.cc
+33
-25
No files found.
qgroundcontrol.pro
View file @
7b1df3b8
...
...
@@ -523,7 +523,6 @@ SOURCES += src/main.cc \
src
/
ui
/
mission
/
QGCMissionDoStartSearch
.
cc
\
src
/
ui
/
mission
/
QGCMissionDoFinishSearch
.
cc
\
src
/
ui
/
QGCVehicleConfig
.
cc
\
src
/
comm
/
QGCHilLink
.
cc
\
src
/
ui
/
QGCHilConfiguration
.
cc
\
src
/
ui
/
QGCHilFlightGearConfiguration
.
cc
\
src
/
ui
/
QGCHilXPlaneConfiguration
.
cc
...
...
src/comm/QGCHilLink.cc
deleted
100644 → 0
View file @
716915e3
#include "QGCHilLink.h"
//QGCHilLink::QGCHilLink(QObject *parent) :
// QThread(parent)
//{
//}
src/comm/QGCXPlaneLink.cc
View file @
7b1df3b8
...
...
@@ -223,10 +223,12 @@ void QGCXPlaneLink::setRemoteHost(const QString& newHost)
void
QGCXPlaneLink
::
updateActuators
(
uint64_t
time
,
float
act1
,
float
act2
,
float
act3
,
float
act4
,
float
act5
,
float
act6
,
float
act7
,
float
act8
)
{
// XXX Control this via the onboard system type exclusively
if
(
mav
->
getSystemType
()
==
MAV_TYPE_QUADROTOR
)
// Only update this for multirotors
if
(
airframeID
==
AIRFRAME_QUAD_X_MK_10INCH_I2C
||
airframeID
==
AIRFRAME_QUAD_X_ARDRONE
||
airframeID
==
AIRFRAME_QUAD_DJI_F450_PWM
)
//
if (airframeID == AIRFRAME_QUAD_X_MK_10INCH_I2C ||
//
airframeID == AIRFRAME_QUAD_X_ARDRONE ||
//
airframeID == AIRFRAME_QUAD_DJI_F450_PWM)
{
Q_UNUSED
(
time
);
...
...
@@ -252,27 +254,34 @@ void QGCXPlaneLink::updateActuators(uint64_t time, float act1, float act2, float
p
.
index
=
25
;
memset
(
p
.
f
,
0
,
sizeof
(
p
.
f
));
if
(
airframeID
==
AIRFRAME_QUAD_X_MK_10INCH_I2C
)
{
p
.
f
[
0
]
=
act1
/
255.0
f
;
p
.
f
[
1
]
=
act2
/
255.0
f
;
p
.
f
[
2
]
=
act3
/
255.0
f
;
p
.
f
[
3
]
=
act4
/
255.0
f
;
}
else
if
(
airframeID
==
AIRFRAME_QUAD_X_ARDRONE
)
{
p
.
f
[
0
]
=
act1
/
500.0
f
;
p
.
f
[
1
]
=
act2
/
500.0
f
;
p
.
f
[
2
]
=
act3
/
500.0
f
;
p
.
f
[
3
]
=
act4
/
500.0
f
;
}
else
{
p
.
f
[
0
]
=
(
act1
-
1000.0
f
)
/
1000.0
f
;
p
.
f
[
1
]
=
(
act2
-
1000.0
f
)
/
1000.0
f
;
p
.
f
[
2
]
=
(
act3
-
1000.0
f
)
/
1000.0
f
;
p
.
f
[
3
]
=
(
act4
-
1000.0
f
)
/
1000.0
f
;
}
p
.
f
[
0
]
=
act1
;
p
.
f
[
1
]
=
act2
;
p
.
f
[
2
]
=
act3
;
p
.
f
[
3
]
=
act4
;
// XXX the system corrects for the scale onboard, do not scale again
// if (airframeID == AIRFRAME_QUAD_X_MK_10INCH_I2C)
// {
// p.f[0] = act1 / 255.0f;
// p.f[1] = act2 / 255.0f;
// p.f[2] = act3 / 255.0f;
// p.f[3] = act4 / 255.0f;
// }
// else if (airframeID == AIRFRAME_QUAD_X_ARDRONE)
// {
// p.f[0] = act1 / 500.0f;
// p.f[1] = act2 / 500.0f;
// p.f[2] = act3 / 500.0f;
// p.f[3] = act4 / 500.0f;
// }
// else
// {
// p.f[0] = (act1 - 1000.0f) / 1000.0f;
// p.f[1] = (act2 - 1000.0f) / 1000.0f;
// p.f[2] = (act3 - 1000.0f) / 1000.0f;
// p.f[3] = (act4 - 1000.0f) / 1000.0f;
// }
// Throttle
writeBytes
((
const
char
*
)
&
p
,
sizeof
(
p
));
}
...
...
@@ -282,7 +291,6 @@ void QGCXPlaneLink::updateControls(uint64_t time, float rollAilerons, float pitc
{
// Do not update this control type for
// all multirotors
if
(
airframeID
==
AIRFRAME_QUAD_X_MK_10INCH_I2C
||
airframeID
==
AIRFRAME_QUAD_X_ARDRONE
||
airframeID
==
AIRFRAME_QUAD_DJI_F450_PWM
)
...
...
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