The latency_test used to pass an object pointer as argv which
won't work in the posix port because it expects argv to be a
null terminated array of character pointers (which it makes a
copy of).
The test was refactored to use a singleton pattern and avoid
having to pass the object pointer to the thread.
Signed-off-by: Mark Charlebois <charlebm@gmail.com>
GCC was more picky about prototypes for inlines being required.
The generate_listener.py script used incorrect printf formats and
was casting %f params to float, but printf casts all %f params to
double per the spec.
Signed-off-by: Mark Charlebois <charlebm@gmail.com>
The initialization functions were called after the script
commands were run causing a deadlock waiting for an
uninitialized semaphore.
Signed-off-by: Mark Charlebois <charlebm@gmail.com>
The build fails when modules override this flag with a larger value,
and this lower value is still checked. The new flag seems to be in
addition to the old flag, not a replacement.
Signed-off-by: Mark Charlebois <charlebm@gmail.com>
There were some missed calls to open and ioctl that need to be
px4_open and px4_ioctl.
QuRT also does not provide usleep() so px4_time.h has to be included
in files calling usleep.
Signed-off-by: Mark Charlebois <charlebm@gmail.com>
The unit test was not passing a null pointer terminated argv.
The posix port depends on argv being null terminated to
determine how may args were passed since PX4 API doesn't
pass argc when spawning a new task.
Signed-off-by: Mark Charlebois <charlebm@gmail.com>
uORB was refactored in order to support the MuORB changes required
for QURT. Those changes wil be added in a subsequent commit.
The files are split out by posix and nuttx so the changes are visible.
When this has been tested, the files can be re-merged and re-tested.
Signed-off-by: Mark Charlebois <charlebm@gmail.com>
The HRT call processing normally happens via HW timer interrupt
handler. Since the POSIX port has no ISR handling, the HP work
queue is used.
Instead of irq_save() and irq_restore() calls to disable/enable
interrupts, a mutex is used to protect each queue.
Signed-off-by: Mark Charlebois <charlebm@gmail.com>
In STM32, the ISR handler calls hrt_call_invoke(). There is no
interrupt timer inthe POSIX port so a work item is put on the
high priority work queue to expire at the next event (in ticks)
or at the next max delay interval.
Counter wrapping is likely still not handled properly in this code.
Signed-off-by: Mark Charlebois <charlebm@gmail.com>
The variable MAVLINK_SRC was defined and then redefined.
Commented out the first definition and moved beside that overriding
definition for visibility.
Signed-off-by: Mark Charlebois <charlebm@gmail.com>
The changes to the simulator added an include of
mavlink/include/v1.0/... to simulator.h which was not in the included paths.
The included header file also causes clang to issue a -Wpacked warning that
had to be silenced.
Signed-off-by: Mark Charlebois <charlebm@gmail.com>
The debug message made it difficult to use the shell for the
posix build. Commented out the debug line.
Signed-off-by: Mark Charlebois <charlebm@gmail.com>
Sensor combined topic notification wasnot working because
the calls to hrt_called() and hrt_call_after() in
ORBDevNode::appears_updated() are not working correctly.
This commit ifdefs out those calls, and the poling seems
to work correctly. This is a workaround until the issue is
resolved.
Signed-off-by: Mark Charlebois <charlebm@gmail.com>
Simulator can work as before with -s flag or with Roman's additions to
publish the sensors combined topic using -p flag.
Signed-off-by: Mark Charlebois <charlebm@gmail.com>