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
1ae8483e
Commit
1ae8483e
authored
9 years ago
by
Thomas Gubler
Committed by
Lorenz Meier
9 years ago
Browse files
Options
Downloads
Patches
Plain Diff
fix 'unterminated function-like macro invocation', fixes #2913
parent
e2b801a3
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/platforms/px4_log.h
+26
-26
26 additions, 26 deletions
src/platforms/px4_log.h
with
26 additions
and
26 deletions
src/platforms/px4_log.h
+
26
−
26
View file @
1ae8483e
...
...
@@ -63,7 +63,7 @@ static inline void do_nothing(int level, ...)
#define PX4_ERR(...) ROS_WARN(__VA_ARGS__)
#define PX4_WARN(...) ROS_WARN(__VA_ARGS__)
#define PX4_INFO(...) ROS_WARN(__VA_ARGS__)
#define PX4_DEBUG(...)
#define PX4_DEBUG(...)
#elif defined(__PX4_QURT)
#include
"qurt_log.h"
...
...
@@ -137,13 +137,13 @@ __END_DECLS
*
* To write to a specific stream for each message type, open the streams and
* set __px4__log_startline to something like:
* if (level <= __px4_log_level_current) printf(_px4_fd[level],
* if (level <= __px4_log_level_current) printf(_px4_fd[level],
*
* Additional behavior can be added using "{\" for __px4__log_startline and
* "}" for __px4__log_endline and any other required setup or teardown steps
****************************************************************************/
#define __px4__log_
star
tcond(cond
)
if (cond) printf(
#define __px4__log_
star
tline(level
)
if (level <= __px4_log_level_current) printf(
#define __px4__log_
prin
tcond(cond
, ...)
if (cond) printf(
__VA_ARGS__)
#define __px4__log_
prin
tline(level
, ...)
if (level <= __px4_log_level_current) printf(
__VA_ARGS__)
#define __px4__log_timestamp_fmt "%-10" PRIu64 " "
#define __px4__log_timestamp_arg ,hrt_absolute_time()
...
...
@@ -172,12 +172,12 @@ __END_DECLS
* if the first arg/condition is true.
****************************************************************************/
#define __px4_log_named_cond(name, cond, FMT, ...) \
__px4__log_
star
tcond(cond
)
\
__px4__log_
prin
tcond(cond
,
\
"%s " \
FMT\
__px4__log_end_fmt \
,name, ##__VA_ARGS__\
__px4__log_endline
)
/****************************************************************************
* __px4_log:
...
...
@@ -187,12 +187,12 @@ __END_DECLS
* printf("%-5s val is %d\n", __px4_log_level_str[3], val);
****************************************************************************/
#define __px4_log(level, FMT, ...) \
__px4__log_
star
tline(level
)
\
__px4__log_
prin
tline(level
,
\
__px4__log_level_fmt \
FMT\
__px4__log_end_fmt \
__px4__log_level_arg(level), ##__VA_ARGS__\
__px4__log_endline
)
/****************************************************************************
* __px4_log_timestamp:
...
...
@@ -203,7 +203,7 @@ __END_DECLS
* hrt_absolute_time(), val);
****************************************************************************/
#define __px4_log_timestamp(level, FMT, ...) \
__px4__log_
star
tline(level
)
\
__px4__log_
prin
tline(level
,
\
__px4__log_level_fmt\
__px4__log_timestamp_fmt\
FMT\
...
...
@@ -211,7 +211,7 @@ __END_DECLS
__px4__log_level_arg(level)\
__px4__log_timestamp_arg\
, ##__VA_ARGS__\
__px4__log_endline
)
/****************************************************************************
* __px4_log_timestamp_thread:
...
...
@@ -222,7 +222,7 @@ __END_DECLS
* hrt_absolute_time(), pthread_self(), val);
****************************************************************************/
#define __px4_log_timestamp_thread(level, FMT, ...) \
__px4__log_
star
tline(level
)
\
__px4__log_
prin
tline(level
,
\
__px4__log_level_fmt\
__px4__log_timestamp_fmt\
__px4__log_thread_fmt\
...
...
@@ -232,18 +232,18 @@ __END_DECLS
__px4__log_timestamp_arg\
__px4__log_thread_arg\
, ##__VA_ARGS__\
__px4__log_endline
)
/****************************************************************************
* __px4_log_file_and_line:
* Convert a message in the form:
* PX4_WARN("val is %d", val);
* to
* printf("%-5s val is %d (file %s line %u)\n",
* printf("%-5s val is %d (file %s line %u)\n",
* __px4_log_level_str[3], val, __FILE__, __LINE__);
****************************************************************************/
#define __px4_log_file_and_line(level, FMT, ...) \
__px4__log_
star
tline(level
)
\
__px4__log_
prin
tline(level
,
\
__px4__log_level_fmt\
__px4__log_timestamp_fmt\
FMT\
...
...
@@ -253,19 +253,19 @@ __END_DECLS
__px4__log_timestamp_arg\
, ##__VA_ARGS__\
__px4__log_file_and_line_arg\
__px4__log_endline
)
/****************************************************************************
* __px4_log_timestamp_file_and_line:
* Convert a message in the form:
* PX4_WARN("val is %d", val);
* to
* printf("%-5s %-10lu val is %d (file %s line %u)\n",
* printf("%-5s %-10lu val is %d (file %s line %u)\n",
* __px4_log_level_str[3], hrt_absolute_time(),
* val, __FILE__, __LINE__);
****************************************************************************/
#define __px4_log_timestamp_file_and_line(level, FMT, ...) \
__px4__log_
star
tline(level
)
\
__px4__log_
prin
tline(level
,
\
__px4__log_level_fmt\
__px4__log_timestamp_fmt\
FMT\
...
...
@@ -275,19 +275,19 @@ __END_DECLS
__px4__log_timestamp_arg\
, ##__VA_ARGS__\
__px4__log_file_and_line_arg\
__px4__log_endline
)
/****************************************************************************
* __px4_log_thread_file_and_line:
* Convert a message in the form:
* PX4_WARN("val is %d", val);
* to
* printf("%-5s %#X val is %d (file %s line %u)\n",
* __px4_log_level_str[3], pthread_self(),
* printf("%-5s %#X val is %d (file %s line %u)\n",
* __px4_log_level_str[3], pthread_self(),
* val, __FILE__, __LINE__);
****************************************************************************/
#define __px4_log_thread_file_and_line(level, FMT, ...) \
__px4__log_
star
tline(level
)
\
__px4__log_
prin
tline(level
,
\
__px4__log_level_fmt\
__px4__log_thread_fmt\
FMT\
...
...
@@ -297,19 +297,19 @@ __END_DECLS
__px4__log_thread_arg\
, ##__VA_ARGS__\
__px4__log_file_and_line_arg\
__px4__log_endline
)
/****************************************************************************
* __px4_log_timestamp_thread_file_and_line:
* Convert a message in the form:
* PX4_WARN("val is %d", val);
* to
* printf("%-5s %-10lu %#X val is %d (file %s line %u)\n",
* __px4_log_level_str[3], hrt_absolute_time(),
* printf("%-5s %-10lu %#X val is %d (file %s line %u)\n",
* __px4_log_level_str[3], hrt_absolute_time(),
* pthread_self(), val, __FILE__, __LINE__);
****************************************************************************/
#define __px4_log_timestamp_thread_file_and_line(level, FMT, ...) \
__px4__log_
star
tline(level
)
\
__px4__log_
prin
tline(level
,
\
__px4__log_level_fmt\
__px4__log_timestamp_fmt\
__px4__log_thread_fmt\
...
...
@@ -321,7 +321,7 @@ __END_DECLS
__px4__log_thread_arg\
, ##__VA_ARGS__\
__px4__log_file_and_line_arg\
__px4__log_endline
)
/****************************************************************************
...
...
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