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>
The commented out lock and unlock were determined to be needed and added back.
The unit test for VDev was updated. It showed the race between the poll and a
write that only does a poll_notify().
Signed-off-by: Mark Charlebois <charlebm@gmail.com>
Clang build fails due to -Werr and warning on use of
if (!condition != other_condition && some_condition)
Clang wants to be clear that the initial '!' wasn't
intended for the whole expression.
Signed-off-by: Mark Charlebois <charlebm@gmail.com>
MuORB was missing the orb_exists() function added to uORB.cpp
gyro_calibration.cpp still had some merge conflicts that had not been resolved.
Signed-off-by: Mark Charlebois <charlebm@gmail.com>
Fixed print format for __LINE__ to %d
Fixed if/else that breaks with the debug macro expansion. The if/else
needs to use braces to allow macro expansion.
Signed-off-by: Mark Charlebois <charlebm@gmail.com>
sim.cpp was causing the posix shell to have continuous debug output.
Used debug macros to suppress output
Signed-off-by: Mark Charlebois <charlebm@gmail.com>
Created px4_debug,h to define:
PX4_DBG
PX4_INFO
PX4_WARN
PX4_ERR
These enable OS specific mappings to be made, filtering, etc.
Signed-off-by: Mark Charlebois <charlebm@gmail.com>