In QuRT, this is a long but the variable was being printed with "%d"
Need to cast variable as long and use "%ld"
Signed-off-by: Mark Charlebois <charlebm@gmail.com>
Using %llu or %lu will break one of the build targets. The "right way"
to print a uint64_t is via the PRIU64 macro defined in C99.
This wasn't defined for the NuttX compiler so it was added to px4_defines.h
for NuttX.
Signed-off-by: Mark Charlebois <charlebm@gmail.com>
The ROS build included some files that used isfinite vs PX4_ISFINITE.
The AppState class also needed to be supported for ROS.
Signed-off-by: Mark Charlebois <charlebm@gmail.com>
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>
The transfer function would previously return error if the receive
buffer length was 0. This appears to be a valid condition for
requesting a measurmement be taken but no data returned.
Signed-off-by: Mark Charlebois <charlebm@gmail.com>
Added -D__QDSP6_DINKUM_PTHREAD_TYPES__ to makefiles/toolchain_hexagon.mk
so the pthreads functions are properly defined.
Signed-off-by: Mark Charlebois <charlebm@gmail.com>
In the upstream tree ringbuffer.h includes the method implementations
in the header file which causes multiple definitions in the link for
other targets. Changed so ringbuffer.cpp is build separately for other
platforms and is included by ringbuffer.h on NuttX.
uORB changes do not link without uORBTest_UnitTest.cpp enabled for
the NuttX build.
px4_getopt was not exported and wasn't visible in NuttX build.
The makefiles were restored to be as close as possible to upstream
so the NuttX build builtin's work again. The code will have to be
refactored after the merge.
Signed-off-by: Mark Charlebois <charlebm@gmail.com>