9 Commits

Author SHA1 Message Date
Lorenz Meier
fe216b5c5f Device: Fixed code style 2015-10-19 13:15:22 +02:00
Lorenz Meier
76508ab5b5 Device:: Move to POSIX semaphore abstraction 2015-09-20 00:27:41 +02:00
Lorenz Meier
27055184de Linux device build fix 2015-09-16 17:37:05 +02:00
Lorenz Meier
686caf4ca4 Fix semaphore handling for device on Mac OS 2015-09-16 17:10:24 +02:00
Mark Charlebois
a589d15c52 Refactored debug() and log() in CDev
These functions used vprintf which is not available on all platforms.
They also do not enable line and file debug output.

Changed to macros that preserve the output format.  Uses new macro that
can be used to implement per object, runtime selectable logging

Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-08-11 12:07:06 -07:00
Mark Charlebois
1a8703ec1c Improved logging with both compile and runtime level filtering
The device level debug will have to be removed and the debugging
can be based on this new logging structure which can tell where
an error (or debug output) occured whch the current implmentation
cannot.

The one limitation is the new macros cannot take a char* for the
format parameter. It must be an actual string literal because it
is concatenated with other strings.

Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-06-17 13:28:27 -07:00
Mark Charlebois
6cb26de74c Multi-uORB support changes - part 1
This adds support for a dynamic build for QuRT and initial
Multi-uORB changes to enable communication between the DSP and
the application processor.

This part of the changes do not affect the POSIX build. This is
enablement for the QuRT build using Multi-uORB. The second part
of the changes will be added in a new module under src/modules.

Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-06-08 22:21:59 -07:00
Mark Charlebois
ffdc9d629c POSIX: Improved logging
The warnx and warn calls map to PX4_WARN.
Calls to errx or err genrtate a compile error.

The px4_log.h file implements a new log format:

For DEBUG and INFO:
<level> <msg>

For ERROR and WARN:
<level> <msg> (file filepath line linenum)

The verbosity can be changed by setting the macro to use
either linux_log or linux_log_verbose in px4_log.h

Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-05-19 09:19:24 -07:00
Mark Charlebois
d913ec8dc9 Changed device::px4_device_handle_t to device::file_t
This change allowed the _posix.cpp file changes to be merged
back into the original files.

Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-04-24 17:49:35 -07:00