The SIGCONT signal was being ignored by the HRT queue thread so the
usleep was not waking up early to process new work.
Signed-off-by: Mark Charlebois <charlebm@gmail.com>
Last fix for vdev_posix.cpp introduced a sleep from within
a HRT work item callback which blocks the HRT queue.
The code in uORBDevices_posix.cpp that handles message
throttling was commented out for posix. The code was re-enabled
and now seems to work.
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>
uORBManager_posix.cpp did a stat to see if a file exists but the
file is actually a virtual file. Using stat was incorrect because
it required a stat buffer that was never used. The POSIX access
function is a better choice so I created a px4_access version to
handle virtual files.
Signed-off-by: Mark Charlebois <charlebm@gmail.com>
There was a conversion error in the timeout (in ms)
passed in and the ts.tv_nsec field of the struct timeval.
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>
px4_read, px4_write, and px4_opctl were not returning the correct
value on error. They were returning -errno vs -1.
Signed-off-by: Mark Charlebois <charlebm@gmail.com>
QuRT does not have a filesystem, so creating a virtual filesystem
that could be implemented as an in-memory file or a remote file
over fastRPC.
Signed-off-by: Mark Charlebois <charlebm@gmail.com>
list_devices will list virtual devices starting with "/dev/".
list_topics will list topics ("/obj/")
Signed-off-by: Mark Charlebois <charlebm@gmail.com>
The commander module now compiles for Linux.
state_machine_helper_linux.cpp iterates over the virtual devices vs
all devices under /dev as per NuttX when disabling publishing.
Signed-off-by: Mark Charlebois <charlebm@gmail.com>
The list_tasks and list_devices commands will show
lists of running px4 threads and created virtual device nodes.
The list_builtins command was removes and the list of commands
will be shown if return is pressed.
Signed-off-by: Mark Charlebois <charlebm@gmail.com>
To avoid confusion when a real device and a virtual device is
being used, changed CDev to VDev for Linux.
Signed-off-by: Mark Charlebois <charlebm@gmail.com>
Added PX4_ISFINITE(x) to px4_defines.h to handle the differences on
NuttX and Linux.
This change also picked up some file renaming for virtual character devices
Signed-off-by: Mark Charlebois <charlebm@gmail.com>