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
fb859599
Commit
fb859599
authored
Apr 26, 2013
by
Lorenz Meier
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed state HIL, fixed sensor HIL XPlane x direction velocity vector
parent
ec4cfb8e
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
8 additions
and
4 deletions
+8
-4
QGCXPlaneLink.cc
src/comm/QGCXPlaneLink.cc
+2
-2
UAS.cc
src/uas/UAS.cc
+5
-2
UAS.h
src/uas/UAS.h
+1
-0
No files found.
src/comm/QGCXPlaneLink.cc
View file @
fb859599
...
...
@@ -567,8 +567,8 @@ void QGCXPlaneLink::readBytes()
}
else
if
(
p
.
index
==
21
&&
xPlaneVersion
==
10
)
{
v
x
=
p
.
f
[
3
];
v
y
=
-
p
.
f
[
5
];
v
y
=
p
.
f
[
3
];
v
x
=
-
p
.
f
[
5
];
vz
=
p
.
f
[
4
];
}
else
if
(
p
.
index
==
12
)
...
...
src/uas/UAS.cc
View file @
fb859599
...
...
@@ -112,7 +112,9 @@ UAS::UAS(MAVLinkProtocol* protocol, int id) : UASInterface(),
lastNonNullTime
(
0
),
onboardTimeOffsetInvalidCount
(
0
),
hilEnabled
(
false
),
lastSendTimeGPS
(
0
)
sensorHil
(
false
),
lastSendTimeGPS
(
0
),
lastSendTimeSensors
(
0
)
{
for
(
unsigned
int
i
=
0
;
i
<
255
;
++
i
)
...
...
@@ -2733,7 +2735,7 @@ void UAS::sendHilState(uint64_t time_us, float roll, float pitch, float yaw, flo
{
if
(
this
->
mode
&
MAV_MODE_FLAG_HIL_ENABLED
)
{
if
(
sensorHil
)
{
if
(
QGC
::
groundTimeMilliseconds
()
-
lastSendTimeSensors
<
100
)
{
// Emit attitude for cross-check
emit
attitudeChanged
(
this
,
201
,
roll
,
pitch
,
yaw
,
getUnixTime
());
emit
valueChanged
(
uasId
,
"roll sim"
,
"rad"
,
roll
,
getUnixTime
());
...
...
@@ -2777,6 +2779,7 @@ void UAS::sendHilSensors(quint64 time_us, float xacc, float yacc, float zacc, fl
fields_changed
);
sendMessage
(
msg
);
sensorHil
=
true
;
lastSendTimeSensors
=
QGC
::
groundTimeMilliseconds
();
}
else
{
...
...
src/uas/UAS.h
View file @
fb859599
...
...
@@ -716,6 +716,7 @@ protected:
bool
hilEnabled
;
///< Set to true if HIL mode is enabled from GCS (UAS might be in HIL even if this flag is not set, this defines the GCS HIL setting)
bool
sensorHil
;
///< True if sensor HIL is enabled
quint64
lastSendTimeGPS
;
///< Last HIL GPS message sent
quint64
lastSendTimeSensors
;
protected
slots
:
/** @brief Write settings to disk */
...
...
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