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
4818b4e4
Commit
4818b4e4
authored
Feb 21, 2014
by
Don Gagne
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #537 from DonLakeFlyer/Issue535
Issue 535 fix
parents
52328108
4790d513
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
55 additions
and
13 deletions
+55
-13
qgroundcontrol.pro
qgroundcontrol.pro
+27
-8
MAVLinkSimulationMAV.cc
src/comm/MAVLinkSimulationMAV.cc
+28
-5
No files found.
qgroundcontrol.pro
View file @
4818b4e4
...
...
@@ -129,28 +129,47 @@ WindowsBuild {
}
#
#
We
treat
all
warnings
as
errors
which
must
be
fixed
before
p
roceeding
.
If
you
run
into
a
problem
you
can't fix
# you can
always use local pragmas to work around the warning. This should be used sparingly and only in cases where
# the problem absolultey can't
be
fixed
.
#
We
treat
all
warnings
as
errors
which
must
be
fixed
before
p
ull
requests
are
approved
.
If
you
run
into
a
problem
#
you
can
't fix you can always use local pragmas to work around the warning. This should be used sparingly and only
#
in cases where
the problem absolultey can't
be
fixed
.
#
#
If
you
run
into
problems
in
code
which
is
not
yours
,
please
lend
a
hand
and
fix
the
issues
.
If
you
don't have time
# for that post an Issue with your OS and compiler information as well as the pertinent output from the build log. If it's
#
a
problem
that
will
take
longer
to
fix
,
we
will
temporarily
turn
off
warnings
as
errors
for
that
specific
config
until
#
the
Issue
is
taken
care
of
.
Once
that
is
completed
we
will
turn
warnings
as
errors
back
in
for
the
config
.
You
can
use
#
CONFIG
+=
WarningsAsErrorsOff
in
your
private
builds
for
a
quick
local
override
.
#
#
Please
report
any
problems
you
run
into
with
warnings
as
errors
so
we
can
gather
information
on
its
effectiveness
as
well
#
as
its
annoyance
level
.
#
#
Note
:
-
Werror
is
currently
not
turned
on
for
Linux
due
to
unfixed
problems
with
release
builds
.
See
Issue
535
.
This
will
#
be
removed
once
the
Issue
is
taken
care
of
.
LinuxBuild
{
CONFIG
+=
WarningsAsErrorsOff
}
MacBuild
|
LinuxBuild
{
QMAKE_CXXFLAGS_WARN_ON
+=
-
Wall
}
#
Note
:
-
Werror
is
currently
not
turned
on
for
Linux
due
to
unfixed
problems
with
release
builds
MacBuild
{
QMAKE_CXXFLAGS_WARN_ON
+=
-
Werror
MacBuild
|
LinuxBuild
{
!
WarningsAsErrorsOff
{
QMAKE_CXXFLAGS_WARN_ON
+=
-
Werror
}
}
WindowsBuild
{
QMAKE_CXXFLAGS_WARN_ON
+=
/
W3
\
/
WX
\
/
wd4996
\
#
silence
warnings
about
deprecated
strcpy
and
whatnot
/
wd4290
#
ignore
exception
specifications
}
WindowsBuild
:
!
WarningsAsErrorsOff
{
QMAKE_CXXFLAGS_WARN_ON
+=
/
WX
}
#
#
Build
flavor
specific
settings
#
...
...
src/comm/MAVLinkSimulationMAV.cc
View file @
4818b4e4
...
...
@@ -86,6 +86,7 @@ void MAVLinkSimulationMAV::mainloop()
servos
.
servo6_raw
=
1500
;
servos
.
servo7_raw
=
1500
;
servos
.
servo8_raw
=
2000
;
servos
.
port
=
1
;
// set a fake port number
mavlink_msg_servo_output_raw_encode
(
systemid
,
MAV_COMP_ID_IMU
,
&
msg
,
&
servos
);
link
->
sendMAVLinkMessage
(
&
msg
);
...
...
@@ -164,15 +165,30 @@ void MAVLinkSimulationMAV::mainloop()
mavlink_msg_attitude_encode
(
systemid
,
MAV_COMP_ID_IMU
,
&
msg
,
&
attitude
);
link
->
sendMAVLinkMessage
(
&
msg
);
// SYSTEM STATUS
mavlink_sys_status_t
status
;
// Since the simulation outputs global position, attitude and raw pressure we specify that the
// sensors that would be collecting this information are present, enabled and healthy.
status
.
onboard_control_sensors_present
=
MAV_SYS_STATUS_SENSOR_3D_GYRO
|
MAV_SYS_STATUS_SENSOR_3D_ACCEL
|
MAV_SYS_STATUS_SENSOR_3D_MAG
|
MAV_SYS_STATUS_SENSOR_ABSOLUTE_PRESSURE
|
MAV_SYS_STATUS_SENSOR_GPS
;
status
.
onboard_control_sensors_enabled
=
status
.
onboard_control_sensors_present
;
status
.
onboard_control_sensors_health
=
status
.
onboard_control_sensors_present
;
status
.
load
=
300
;
// status.mode = sys_mode;
// status.nav_mode = nav_mode;
status
.
errors_comm
=
0
;
status
.
voltage_battery
=
10500
;
// status.status = sys_state;
status
.
current_battery
=
-
1
;
// -1: autopilot does not measure the current
status
.
drop_rate_comm
=
0
;
status
.
errors_comm
=
0
;
status
.
errors_count1
=
0
;
status
.
errors_count2
=
0
;
status
.
errors_count3
=
0
;
status
.
errors_count4
=
0
;
status
.
battery_remaining
=
90
;
mavlink_msg_sys_status_encode
(
systemid
,
MAV_COMP_ID_IMU
,
&
msg
,
&
status
);
link
->
sendMAVLinkMessage
(
&
msg
);
...
...
@@ -225,6 +241,13 @@ void MAVLinkSimulationMAV::mainloop()
hil
.
pitch_elevator
=
0.05
f
;
hil
.
yaw_rudder
=
0.05
f
;
hil
.
throttle
=
0.6
f
;
hil
.
aux1
=
0.0
f
;
hil
.
aux2
=
0.0
f
;
hil
.
aux3
=
0.0
f
;
hil
.
aux4
=
0.0
f
;
hil
.
mode
=
MAV_MODE_FLAG_HIL_ENABLED
;
hil
.
nav_mode
=
0
;
// not currently used by any HIL consumers
// Encode the data (adding header and checksums, etc.)
mavlink_msg_hil_controls_encode
(
systemid
,
MAV_COMP_ID_IMU
,
&
ret
,
&
hil
);
// And send it
...
...
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