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
1bebc97d
Commit
1bebc97d
authored
Mar 17, 2014
by
Lorenz Meier
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
HIL cleanup, ensure correct init in X-Plane
parent
7c0ad714
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
14 additions
and
3 deletions
+14
-3
QGCFlightGearLink.cc
src/comm/QGCFlightGearLink.cc
+1
-1
QGCHilLink.h
src/comm/QGCHilLink.h
+0
-2
QGCXPlaneLink.cc
src/comm/QGCXPlaneLink.cc
+11
-0
QGCXPlaneLink.h
src/comm/QGCXPlaneLink.h
+2
-0
No files found.
src/comm/QGCFlightGearLink.cc
View file @
1bebc97d
...
...
@@ -47,7 +47,7 @@ QGCFlightGearLink::QGCFlightGearLink(UASInterface* mav, QString startupArguments
flightGearVersion
(
0
),
startupArguments
(
startupArguments
),
_sensorHilEnabled
(
true
),
barometerOffsetkPa
(
0.0
)
barometerOffsetkPa
(
0.0
f
)
{
this
->
host
=
host
;
this
->
port
=
port
+
mav
->
getUASID
();
...
...
src/comm/QGCHilLink.h
View file @
1bebc97d
...
...
@@ -72,8 +72,6 @@ public slots:
protected:
virtual
void
setName
(
QString
name
)
=
0
;
static
const
unsigned
int
barometerOffsetkPa
=
2
;
signals:
/**
* @brief This signal is emitted instantly when the link is connected
...
...
src/comm/QGCXPlaneLink.cc
View file @
1bebc97d
...
...
@@ -48,10 +48,12 @@ QGCXPlaneLink::QGCXPlaneLink(UASInterface* mav, QString remoteHost, QHostAddress
socket
(
NULL
),
process
(
NULL
),
terraSync
(
NULL
),
barometerOffsetkPa
(
15.0
f
),
airframeID
(
QGCXPlaneLink
::
AIRFRAME_UNKNOWN
),
xPlaneConnected
(
false
),
xPlaneVersion
(
0
),
simUpdateLast
(
QGC
::
groundTimeMilliseconds
()),
simUpdateFirst
(
0
),
simUpdateLastText
(
QGC
::
groundTimeMilliseconds
()),
simUpdateHz
(
0
),
_sensorHilEnabled
(
true
)
...
...
@@ -452,6 +454,10 @@ void QGCXPlaneLink::readBytes()
{
xPlaneConnected
=
true
;
if
(
oldConnectionState
!=
xPlaneConnected
)
{
simUpdateFirst
=
QGC
::
groundTimeMilliseconds
();
}
for
(
unsigned
i
=
0
;
i
<
nsegs
;
i
++
)
{
// Get index
...
...
@@ -642,6 +648,11 @@ void QGCXPlaneLink::readBytes()
qDebug
()
<<
"UNKNOWN PACKET:"
<<
data
;
}
// Wait for 0.5s before actually using the data, so that all fields are filled
if
(
QGC
::
groundTimeMilliseconds
()
-
simUpdateFirst
<
500
)
{
return
;
}
// Send updated state
if
(
emitUpdate
&&
(
QGC
::
groundTimeMilliseconds
()
-
simUpdateLast
)
>
3
)
{
...
...
src/comm/QGCXPlaneLink.h
View file @
1bebc97d
...
...
@@ -197,6 +197,7 @@ protected:
float
true_airspeed
;
float
groundspeed
;
float
xmag
,
ymag
,
zmag
,
abs_pressure
,
diff_pressure
,
pressure_alt
,
temperature
;
float
barometerOffsetkPa
;
float
man_roll
,
man_pitch
,
man_yaw
;
QString
airframeName
;
...
...
@@ -204,6 +205,7 @@ protected:
bool
xPlaneConnected
;
unsigned
int
xPlaneVersion
;
quint64
simUpdateLast
;
quint64
simUpdateFirst
;
quint64
simUpdateLastText
;
float
simUpdateHz
;
bool
_sensorHilEnabled
;
...
...
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