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
31a1a070
Commit
31a1a070
authored
Sep 29, 2012
by
Lorenz Meier
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed HIL startup crash, fixed yaw offset
parent
f9a43531
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
11 additions
and
6 deletions
+11
-6
QGCXPlaneLink.cc
src/comm/QGCXPlaneLink.cc
+5
-5
UAS.cc
src/uas/UAS.cc
+5
-1
UAS.h
src/uas/UAS.h
+1
-0
No files found.
src/comm/QGCXPlaneLink.cc
View file @
31a1a070
...
...
@@ -317,7 +317,7 @@ void QGCXPlaneLink::readBytes()
//qDebug() << "HDNG" << "pitch" << p.f[0] << "roll" << p.f[1] << "hding true" << p.f[2] << "hding mag" << p.f[3];
pitch
=
p
.
f
[
0
]
/
180.0
f
*
M_PI
;
roll
=
p
.
f
[
1
]
/
180.0
f
*
M_PI
;
yaw
=
(
p
.
f
[
2
]
-
180.0
f
)
/
180.0
f
*
M_PI
;
yaw
=
p
.
f
[
2
]
/
180.0
f
*
M_PI
;
}
// else if (p.index == 19)
...
...
@@ -552,6 +552,10 @@ void QGCXPlaneLink::setRandomAttitude()
**/
bool
QGCXPlaneLink
::
connectSimulation
()
{
qDebug
()
<<
"STARTING X-PLANE LINK, CONNECTING TO"
<<
remoteHost
<<
":"
<<
remotePort
;
start
(
LowPriority
);
if
(
!
mav
)
return
false
;
if
(
connectState
)
return
false
;
...
...
@@ -772,10 +776,6 @@ bool QGCXPlaneLink::connectSimulation()
// qDebug() << "STARTING SIM";
// qDebug() << "STARTING: " << processFgfs << processCall;
qDebug
()
<<
"STARTING X-PLANE LINK, CONNECTING TO"
<<
remoteHost
<<
":"
<<
remotePort
;
start
(
LowPriority
);
return
connectState
;
}
...
...
src/uas/UAS.cc
View file @
31a1a070
...
...
@@ -106,7 +106,8 @@ UAS::UAS(MAVLinkProtocol* protocol, int id) : UASInterface(),
connectionLost
(
false
),
lastVoltageWarning
(
0
),
lastNonNullTime
(
0
),
onboardTimeOffsetInvalidCount
(
0
)
onboardTimeOffsetInvalidCount
(
0
),
hilEnabled
(
false
)
{
for
(
unsigned
int
i
=
0
;
i
<
255
;
++
i
)
...
...
@@ -2605,6 +2606,8 @@ void UAS::sendHilState(uint64_t time_us, float roll, float pitch, float yaw, flo
**/
void
UAS
::
startHil
()
{
if
(
hilEnabled
)
return
;
hilEnabled
=
true
;
// Connect HIL simulation link
simulation
->
connectSimulation
();
mavlink_message_t
msg
;
...
...
@@ -2621,6 +2624,7 @@ void UAS::stopHil()
mavlink_message_t
msg
;
mavlink_msg_set_mode_pack
(
mavlink
->
getSystemId
(),
mavlink
->
getComponentId
(),
&
msg
,
this
->
getUASID
(),
mode
&
!
MAV_MODE_FLAG_HIL_ENABLED
,
navMode
);
sendMessage
(
msg
);
hilEnabled
=
false
;
}
void
UAS
::
shutdown
()
...
...
src/uas/UAS.h
View file @
31a1a070
...
...
@@ -680,6 +680,7 @@ protected:
quint64
lastVoltageWarning
;
///< Time at which the last voltage warning occured
quint64
lastNonNullTime
;
///< The last timestamp from the MAV that was not null
unsigned
int
onboardTimeOffsetInvalidCount
;
///< Count when the offboard time offset estimation seemed wrong
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)
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