Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
F
Firmware
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Alberto Ruiz Garcia
Firmware
Commits
f3533d31
Commit
f3533d31
authored
6 years ago
by
Daniel Agar
Committed by
Beat Küng
6 years ago
Browse files
Options
Downloads
Patches
Plain Diff
mavlink update to latest and enable address-of-packed-member warning
parent
f8ae8ba5
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
cmake/px4_add_common_flags.cmake
+0
-5
0 additions, 5 deletions
cmake/px4_add_common_flags.cmake
mavlink/include/mavlink/v2.0
+1
-1
1 addition, 1 deletion
mavlink/include/mavlink/v2.0
src/modules/mavlink/mavlink_parameters.cpp
+7
-3
7 additions, 3 deletions
src/modules/mavlink/mavlink_parameters.cpp
with
8 additions
and
9 deletions
cmake/px4_add_common_flags.cmake
+
0
−
5
View file @
f3533d31
...
...
@@ -99,7 +99,6 @@ function(px4_add_common_flags)
add_compile_options
(
-Qunused-arguments
-Wno-address-of-packed-member
# TODO: fix and enable (mavlink, etc)
-Wno-unknown-warning-option
-Wno-unused-const-variable
-Wno-varargs
...
...
@@ -113,10 +112,6 @@ function(px4_add_common_flags)
add_compile_options
(
-fdiagnostics-color=always
)
endif
()
if
(
CMAKE_CXX_COMPILER_VERSION VERSION_GREATER 9
)
add_compile_options
(
-Wno-address-of-packed-member
)
# TODO: fix and enable (mavlink, etc)
endif
()
add_compile_options
(
-fno-builtin-printf
-fno-strength-reduce
...
...
This diff is collapsed.
Click to expand it.
v2.0
@
b32bd3f0
Compare
2a47f11e
...
b32bd3f0
Subproject commit
2a47f11e73eef6d817af7934692b1223d7fb434f
Subproject commit
b32bd3f004b971c03711617c79e5dc67e720e864
This diff is collapsed.
Click to expand it.
src/modules/mavlink/mavlink_parameters.cpp
+
7
−
3
View file @
f3533d31
...
...
@@ -450,8 +450,7 @@ MavlinkParametersManager::send_uavcan()
msg
.
param_value
=
value
.
real_value
;
}
else
{
int32_t
val
;
val
=
(
int32_t
)
value
.
int_value
;
int32_t
val
=
(
int32_t
)
value
.
int_value
;
memcpy
(
&
msg
.
param_value
,
&
val
,
sizeof
(
int32_t
));
msg
.
param_type
=
MAVLINK_TYPE_INT32_T
;
}
...
...
@@ -545,14 +544,19 @@ MavlinkParametersManager::send_param(param_t param, int component_id)
* get param value, since MAVLink encodes float and int params in the same
* space during transmission, copy param onto float val_buf
*/
if
(
param_get
(
param
,
&
msg
.
param_value
)
!=
OK
)
{
float
param_value
{};
if
(
param_get
(
param
,
&
param_value
)
!=
OK
)
{
return
2
;
}
msg
.
param_value
=
param_value
;
msg
.
param_count
=
param_count_used
();
msg
.
param_index
=
param_get_used_index
(
param
);
#if defined(__GNUC__) && __GNUC__ >= 8
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wstringop-truncation"
#endif
/*
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment