GCC requires a declaration of a static inline function prior to its
definition when strict-prototypes warning is enabled.
Signed-off-by: Mark Charlebois <charlebm@gmail.com>
Removed unused code. Reset reschedule interval for sampling when the
sampling rate is changed.
The rate is always 1000Hz as it is set to the default value.
Signed-off-by: Mark Charlebois <charlebm@gmail.com>
QuRT needs to use the builtin version of isfinite so for the qurt
build PX4_ISFINITE(x) is defined as __builtin_isfinite(x).
Signed-off-by: Mark Charlebois <charlebm@gmail.com>
QuRT's pthread_cancel implementation is lacking, and causes px4_poll to
always wait for the maximumn timeout. A cleaner implementation is provided
that uses the HRT work queue for posix targets.
In the future the posix code should be rtefactiored so that qurt (and other)
implementations that are duplicated, use the posix implementation.
Signed-off-by: Mark Charlebois <charlebm@gmail.com>
Used a do_nothing() function for px4_omit() that will satisfy the
compiler so it will not report unused variables when a debug
message is compiled out.
Signed-off-by: Mark Charlebois <charlebm@gmail.com>
The gpssim code was named gps_sim vs being consistent with other
simulators (gpssim). It also used warnx and errx and had lots of
commeted out code.
Signed-off-by: Mark Charlebois <charlebm@gmail.com>
If __px4_log_level_current is unsigned then the runtime filter
comparison warns because an unsigned value can't be less than zero.
Changed typed to signed so compiler will not issue a warning.
Signed-off-by: Mark Charlebois <charlebm@gmail.com>
Added __attribute__ ((unused)) for variables used only for log
output and flagged as unused if the message log level is compiled out.
Signed-off-by: Mark Charlebois <charlebm@gmail.com>
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>