Commit Graph

12347 Commits

Author SHA1 Message Date
Mark Charlebois 2002d4e774 POSIX: disable UART in mavlink
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>
2015-05-07 10:07:18 -07:00
Mark Charlebois 5e2af2b227 POSIX: fixed return values to be posix compliant
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>
2015-05-07 09:38:03 -07:00
Thomas Gubler cc62033190 improve mavlink set_attitude_target handling
port #1920 to mavlink_receiver
fixes #1921
2015-05-07 16:44:54 +02:00
Roman Bapst 1d544e028d mc_pos_control: always update previous velocity to avoid spikes due to differentiation 2015-05-07 15:04:59 +02:00
Lorenz Meier 5003875911 Merge pull request #2141 from PX4/quat_sp
copy quaternion setpoint into attitude setpoint topic
2015-05-07 14:29:26 +02:00
tumbili 5cf8efcc60 copy quaternion setpoint into attitude setpoint topic 2015-05-07 12:36:50 +02:00
Simon Wilks bf23ca70c5 Added log entries for the rc.interfaces file as well. 2015-05-07 10:18:03 +02:00
Simon Wilks 8144a84bc3 Make sure we have a boolog.txt entry for critical failures. 2015-05-07 10:18:03 +02:00
Simon Wilks ea8ba79481 Read the current flight termination circuit breaker value, not just updated values. 2015-05-07 08:27:41 +02:00
Andrew Tridgell db8dd000e3 l3gd20: follow same pattern as lsm303d for duplicate rejection 2015-05-07 15:16:34 +10:00
Andrew Tridgell a710159263 mpu6000: sample at 200usec faster rate to avoid aliasing
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
2015-05-07 15:16:32 +10:00
Andrew Tridgell 3ac95fb581 lsm303d: run sampling 200usec faster to avoid aliasing
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
2015-05-07 15:16:29 +10:00
Mark Charlebois 6db77dc8bb Experimental virtual file support
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>
2015-05-06 22:12:45 -07:00
Mark Charlebois 35e6822d95 Added missing px4_ prefixes
NuttX build required missing px4_ prefix for systemreset and task_spawn_cmd

Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-05-06 16:25:45 -07:00
Mark Charlebois a0d58552a0 blinkm: merged NuttX and POSIX impelmentations
Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-05-06 16:24:18 -07:00
Mark Charlebois 948b47bd33 Removed px4_killall
killall and px4_killall are not used in the codebase so it was removed.

Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-05-06 16:04:20 -07:00
Mark Charlebois 3a65187303 Fixed bad merge
Forgot to remove old file line when merging the changes from master.

Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-05-06 16:00:00 -07:00
Mark Charlebois db52227409 Merge remote-tracking branch 'upstream/master' into linux
Signed-off-by: Mark Charlebois <charlebm@gmail.com>

Conflicts:
	src/modules/commander/accelerometer_calibration.cpp
2015-05-06 15:51:39 -07:00
Mark Charlebois 04b564920f POSIX: Make binutils BDF linker the default
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>
2015-05-06 15:44:37 -07:00
Mark Charlebois 0c1c58c418 Fixed overzealous px4_ prefixing
Some files had px4_px4_ prefixed functions.

Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-05-06 15:32:04 -07:00
Mark Charlebois c5237f7f6f Removed extra abstracton layer in systemlib
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>
2015-05-06 14:43:11 -07:00
Mark Charlebois 3654aec3a5 POSIX: ported px4_daemon_app
Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-05-06 14:34:23 -07:00
Mark Charlebois eed2479dfc Added px4_ prefix to task_spawn_cmd
Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-05-06 14:20:08 -07:00
Roman Bapst 525e605b92 vtol: publish actuator controls in manual mode 2015-05-06 22:53:56 +02:00
Mark Charlebois 7ebee7ca6f uORB: Unit test fix
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>
2015-05-06 13:19:52 -07:00
Mark Charlebois 872e1ebda0 GCC fixes for warnings
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>
2015-05-06 11:45:23 -07:00
Lorenz Meier 0d1d92484b MAVLink app: Parameter docs and new test parameter 2015-05-06 19:39:17 +02:00
Lorenz Meier 150c5d2d8c Commander: parameter style change 2015-05-06 19:38:53 +02:00
Mark Charlebois 5299f76706 POSIX: initialize before running script
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>
2015-05-06 09:51:31 -07:00
Lorenz Meier 79807b4ace Merge pull request #2136 from UAVenture/filter_choice2
Attitude filter for multirotors: Let users choose between filters, default to old one
2015-05-06 11:58:33 +02:00
Andreas Antener 95803a774a update param docs, change default back to old ekf for inav based estimation 2015-05-06 11:37:02 +02:00
Lorenz Meier 9892f12d2e Attitude filter for multirotors: Let users choose between filters 2015-05-06 09:16:34 +02:00
Mark Charlebois e28049a387 POSIX: changed SIGCONT to SIGALRM
QuRT doesn't seemto support SIGCONT

Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-05-05 16:43:54 -07:00
Mark Charlebois 6d2efd0e8f uORB: Unit test called close vs px4_close
The unit test should have called px4_close(), not close().

Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-05-05 13:07:54 -07:00
Mark Charlebois b7918ee45a Nuttx: remove -Wframe-larger-than=1024
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>
2015-05-05 12:16:23 -07:00
Mark Charlebois 0cea93a55c POSIX and QuRT: fixed calls needing px4_ prefix
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>
2015-05-05 12:13:39 -07:00
Mark Charlebois f2af8b08ed uORB: fix segfault in unit test
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>
2015-05-05 12:09:19 -07:00
Lorenz Meier 6c859245e2 Merge pull request #2013 from PX4/attitude_estimator_q
attitude_estimator_q added
2015-05-05 20:29:51 +02:00
Lorenz Meier 8f606cd491 Merge pull request #2131 from PX4/sensor_cal_fix
fix accel calibration
2015-05-05 20:17:41 +02:00
Mark Charlebois e33a164ddb uORB: Major refactoring
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>
2015-05-05 10:52:15 -07:00
Roman Bapst 0217e2ed56 fix accel calibration: rotate sensor values into board frame 2015-05-05 18:41:50 +02:00
Lorenz Meier f7b66d9853 Merge pull request #2130 from UAVenture/revert_mixer_update
Revert "Merge pull request #1819 from PX4/chan16" because of #2113
2015-05-05 15:09:50 +02:00
Andreas Antener cd4154d805 Revert "Merge pull request #1819 from PX4/chan16" because of #2113
This reverts commit f8c8876642, reversing
changes made to de3888bed7.
2015-05-05 14:41:53 +02:00
Mark Charlebois e24405d374 POSIX: fixed hrt call and workqueue implementation
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>
2015-05-05 00:27:14 -07:00
Mark Charlebois 12a25e4b63 Merge remote-tracking branch 'upstream/master' into linux
Signed-off-by: Mark Charlebois <charlebm@gmail.com>

Conflicts:
	makefiles/firmware.mk
	src/modules/commander/module.mk
	src/modules/mavlink/mavlink_ftp.h
	src/modules/mavlink/mavlink_tests/module.mk
2015-05-04 16:36:59 -07:00
Mark Charlebois ed621a6a8d POSIX: Enabled hrt queued work to be run
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>
2015-05-04 16:09:00 -07:00
Mark Charlebois 7ac9fc38e4 Commented out 1st definition of MAVLINK_SRC
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>
2015-05-04 15:48:06 -07:00
Mark Charlebois cfd96a8ab4 POSIX: Added missing include path and -Wno-packed flag
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>
2015-05-04 15:33:08 -07:00
mcharleb 21a5dfc828 Merge pull request #5 from tumbili/JMAVsim_interface
JMAVSim interface
2015-05-04 14:15:29 -07:00
tumbili 4b34d0c297 improved topic listener 2015-05-04 23:10:23 +02:00