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
2f2406a5
Commit
2f2406a5
authored
Apr 07, 2013
by
Lorenz Meier
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Expanded fields changed flags
parent
d18ea79a
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
2 deletions
+7
-2
QGCXPlaneLink.cc
src/comm/QGCXPlaneLink.cc
+7
-2
No files found.
src/comm/QGCXPlaneLink.cc
View file @
2f2406a5
...
...
@@ -476,12 +476,14 @@ void QGCXPlaneLink::readBytes()
xacc
=
p
.
f
[
5
]
*
9.81
f
;
xacc
=
p
.
f
[
6
]
*
9.81
f
;
zacc
=
-
p
.
f
[
4
]
*
9.81
f
;
fields_changed
|=
(
1
<<
0
)
|
(
1
<<
1
)
|
(
1
<<
2
);
}
else
if
(
p
.
index
==
6
&&
xPlaneVersion
==
10
)
{
// inHg to kPa
abs_pressure
=
p
.
f
[
0
]
*
3.3863886666718317
f
;
temperature
=
p
.
f
[
1
];
fields_changed
|=
(
1
<<
9
)
|
(
1
<<
12
);
}
// Forward controls from X-Plane to MAV, not very useful
// better: Connect Joystick to QGroundControl
...
...
@@ -500,7 +502,7 @@ void QGCXPlaneLink::readBytes()
rollspeed
=
p
.
f
[
2
];
pitchspeed
=
p
.
f
[
1
];
yawspeed
=
p
.
f
[
0
];
fields_changed
|=
(
1
<<
0
)
|
(
1
<<
1
)
|
(
1
<<
2
);
fields_changed
|=
(
1
<<
3
)
|
(
1
<<
4
)
|
(
1
<<
5
);
}
else
if
((
xPlaneVersion
==
10
&&
p
.
index
==
17
)
||
(
xPlaneVersion
==
9
&&
p
.
index
==
18
))
{
...
...
@@ -528,6 +530,7 @@ void QGCXPlaneLink::readBytes()
xmag
=
cos
(
yawmag
)
*
0.4
f
-
sin
(
yawmag
)
*
0.0
f
+
0.0
f
;
ymag
=
sin
(
yawmag
)
*
0.4
f
-
sin
(
yawmag
)
*
0.0
f
+
0.0
f
;
zmag
=
0.0
f
+
0.0
f
+
1.0
f
*
0.4
f
;
fields_changed
|=
(
1
<<
6
)
|
(
1
<<
7
)
|
(
1
<<
8
);
emitUpdate
=
true
;
}
...
...
@@ -536,7 +539,7 @@ void QGCXPlaneLink::readBytes()
rollspeed
=
p
.
f
[
2
];
pitchspeed
=
p
.
f
[
1
];
yawspeed
=
p
.
f
[
0
];
fields_changed
|=
(
1
<<
0
)
|
(
1
<<
1
)
|
(
1
<<
2
);
fields_changed
|=
(
1
<<
3
)
|
(
1
<<
4
)
|
(
1
<<
5
);
}
// else if (p.index == 19)
...
...
@@ -614,6 +617,8 @@ void QGCXPlaneLink::readBytes()
{
diff_pressure
=
0.0
f
;
pressure_alt
=
alt
;
// set pressure alt to changed
fields_changed
|=
(
1
<<
11
);
emit
sensorHilRawImuChanged
(
QGC
::
groundTimeUsecs
(),
xacc
,
yacc
,
zacc
,
rollspeed
,
pitchspeed
,
yawspeed
,
xmag
,
ymag
,
zmag
,
abs_pressure
,
diff_pressure
,
pressure_alt
,
temperature
,
fields_changed
);
...
...
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