Most of the current POSIX builds will not use the UART and it
is just a unnecessary dependency to satisfy when running in a
test environment.
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>
this runs the mpu6000 200usec faster than requested then detects and
disccards duplicates by comparing accel values. This avoids a nasty
aliasing issue due to clock drift between the stm32 and mpu6000
this runs the sampling of the accelerometer 200usec faster than
requested and then throw away duplicates using the accelerometer
status register data ready bit. This avoids aliasing due to drift in
the stm32 clock compared to the lsm303d clock
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>
ld.gold does not support the -Ur flags and it seems some people have
ld as a link to ld.gold.
Made LD = ld.bfd to avoid confusion.
Signed-off-by: Mark Charlebois <charlebm@gmail.com>
The calls to task_spawn_cmd, kill_all, and systemreset were wrappers
around the px4_{task_spawn_cmd|kill_all|systemreset} implementations.
Removed the wrappers and changed all calls to the px4_ equivalents.
NuttX specific code was moved into px4_tasks.h
Signed-off-by: Mark Charlebois <charlebm@gmail.com>
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>