12517 Commits

Author SHA1 Message Date
Mark Whitehorn
9603794b9d set verbose flag for Dcm.renormalize test 2016-11-05 11:05:25 +01:00
Mark Whitehorn
03beeb2e55 update matrix submodule 2016-11-05 11:05:25 +01:00
Mark Whitehorn
fc73ab5e40 add unit test for Dcm.renormalize() 2016-11-05 11:05:25 +01:00
Daniel Agar
a8369c6ac8 FW use loiter to achieve waypoint altitude
- fixes #5061
2016-11-05 10:30:36 +01:00
Sander Smeets
39cc75b4a0 Rebase of vtol_land_weathervane patch 2016-11-04 20:29:45 +01:00
Beat Küng
4bcf2cdb52 uavcan: fix initialization of std::array
in C++11, double braces are needed for std::array aggregate initialization,
or assignment with =.
see: http://en.cppreference.com/w/cpp/container/array
2016-11-04 16:41:13 +01:00
Carlo Wood
09d36a63ef Revert to using __builtin_isfinite for QuRT.
See discussion in https://github.com/PX4/Firmware/issues/5756
2016-11-04 16:40:45 +01:00
Beat Küng
ab4d7dfc59 mavlink: stop ulog streaming when mavlink thread exits
'mavlink stop-all' during a log streaming session previously led to a
resource leak, and log streaming could only be re-started by rebooting the
system.
2016-11-04 11:08:06 +01:00
Mark Whitehorn
25be7aa7cf incorporate Bill Premerlani's fast rotation handling from MatrixPilot 2016-11-03 23:03:03 +01:00
Lorenz Meier
76082da674 Add IST8310 driver 2016-11-03 15:38:28 +01:00
Lucas De Marchi
c5100b6273 tap_esc: fix output order for quadrotor 2016-11-03 15:38:09 +01:00
mantelt
8b237d7cf3 navio_sysfs_pwm_out: Adressing comments of @bkueng
(https://github.com/PX4/Firmware/pull/5704#pullrequestreview-6977559)
2016-11-03 12:37:41 +01:00
mantelt
10491884ca navio_sysfs_pwm_out: command line argument for mixerfile 2016-11-03 09:38:38 +01:00
mantelt
32403ddb90 navio_sysfs_pwm_out: removing default mixer 2016-11-03 08:59:58 +01:00
mantelt
4b8fc2365e navio_sysfs_pwm_out: Use mixer file
use all actuator groups for mixing.
2016-11-02 17:45:30 +01:00
mantelt
4c0c526898 Loading mixer from (hardcoded) file
use actuator_controls_3 for the time being
2016-11-02 17:45:30 +01:00
Daniel Agar
cdd317ba38 commander arm check throttle include rattitude 2016-11-01 22:51:51 +01:00
CarlOlsson
93fb02bfa3 fw_att_ctrl: Code cleanup
Signed-off-by: CarlOlsson <carlolsson.co@gmail.com>
2016-10-31 15:17:14 +01:00
Beat Küng
00cd2902c7 fix logger: avoid leaking file descriptor in get_log_time()
orb_subscribe can succeed, but if there is no publisher, orb_copy will fail.
We still need to unsubscribe in that case.
2016-10-31 12:41:04 +01:00
Daniel Agar
2908f1c16d commander allow disarm command with throttle 2016-10-31 09:15:06 +01:00
Daniel Agar
27a50275b6 commander NAV_RETURN_TO_LAUNCH change mode to RTL 2016-10-30 21:41:43 +01:00
Carlo Wood
0bff3593d3 Do not use std::cout for qurt's sake.
Using cout drags in std::localeconv which isn't defined
on QURT. While this file is also used for POSIX, it doesn't
seem to harm much to use printf there as well.
2016-10-29 10:57:34 +02:00
Carlo Wood
52b8e75aea Export symbols init_app_map and list_builtins
See discussion at https://github.com/PX4/Firmware/issues/5756
2016-10-29 10:57:34 +02:00
Henry Zhang
278124bfb8 MindPX: Code clean up. 2016-10-29 10:56:32 +02:00
Henry Zhang
b280e28623 MindPX: Remove hardcode for sensors rotation. 2016-10-29 10:56:32 +02:00
Henry Zhang
f17dc2f2a6 MindPX: Code style and clean up. 2016-10-29 10:56:32 +02:00
Henry Zhang
d6ed416d29 MindPX: Update spi bus and sensors io config. 2016-10-29 10:56:32 +02:00
Henry Zhang
cabcc39816 MindPX: Expand to maximum 8 PWM outputs. 2016-10-29 10:56:32 +02:00
Henry Zhang
53b4996379 MindPX: Use TIM14 CH1 for tone alarm output. 2016-10-29 10:56:32 +02:00
Henry Zhang
b76c8cd80c MindPX: Use i2c rgbled. 2016-10-29 10:56:32 +02:00
Henry Zhang
016aa47dfc MindPX: Enable FrkSky telemetry on usart8/ttys6. 2016-10-29 10:56:32 +02:00
Henry Zhang
2b23835d56 MindPX: Support RSSI. 2016-10-29 10:56:32 +02:00
Henry Zhang
d8ac044414 MindPX: Support serial RC input. 2016-10-29 10:56:32 +02:00
Julian Oes
62603bee45 simulation: SITL outputs from 0..1
Instead of sending actuator controls from -1..1 for SITL, we should send
0..1 like we already do for HIL. This will enable negative thrust in the
future, e.g. for pusher props that spin backwards, or for vehicles with
variable pitch propellers.
2016-10-28 23:56:46 +02:00
Carlo Wood
90f3e3b5d3 Do not include headers inside __BEGIN_DECLS ... __END_DECLS blocks.
We don't have C++ unsafe headers (anymore).

I added a test to fix_headers.sh that checks if certain "unsafe"
headers are ONLY included inside a __BEGIN_DECLS ... __END_DECLS
(because after all, they are unsafe), as well as checking that
no other header files are included inside such a block. The rationale
of the latter is that if a file is a C header and it declares
function prototypes (otherwise it doesn't matter) and is sometimes
included outside a __BEGIN_DECLS ... __END_DECLS block (from a C++
source file) then it has to be C++ safe and doesn't ever to be
included from inside such a block; while if a file is a C++ header
then obviously it should never be included from such a block.

fix_headers.sh subsequently found several safe headers to be
included from inside such a block, and those that were (apparently
in the past) unsafe were included only sometimes inside such a
block and often outside it. I had a look at those files and saw
that at least an attempt has been made to make them C++ safe,
but especially because they already are included OFTEN outside
a __BEGIN_DECLS ... __END_DECLS (from C++ source files) the
best decision seems to treat them as safe.

This is not risky: .c files that define such functions still
generate C-linkage for their functions. If a C++ unsafe C header
is included outside a __BEGIN_DECLS ... __END_DECLS block then
the only possible result would be an undefined reference to
a function with C++-linkage that will not exist. Aka, when
something links after this commit, then the commit was correct.
I did build all targets and they all linked.
2016-10-28 11:57:08 +02:00
Carlo Wood
baf89f4398 Clean up of px4_defines.h (remove math.h)
This patch reorders px4_defines.h to make it more readable (I think)
but more importantly, cleans up the #include <math.h>/<cmath>
and [std::]isfinite stuff.

My main goal was to completely get rid of including math.h/cmath,
because that doesn't really belong in a header that is supposed to
define macro's and is included in almost every source file (if not
all).

I'm not sure what it did before ;) (pun intended), but now it does
the following:

PX4_ISFINITE is only used in C++ code (that was already the case,
but hereby is official; for C code just use 'isfinite()') and is
defined to be std::isfinite, except on __PX4_QURT because that uses
the HEXAGON toolset which (erroneously) defines isfinite as macro.

I would have liked to remove PX4_ISFINITE completely from the code
and just use std::isfinite whereever that is needed, but that would
have required changing the libecl submodule, and at the moment I'm
getting tired of changing submodules... so maybe something for the
future.

Also, all includes of <math.h> or <cmath> have been removed except
for __PX4_NUTTX. Like the HEXAGON toolset NuttX currently defines
isfinite as macro for C++. So, we could have solved this in the
same was as __P4_QURT; but since we can fix NuttX ourselves I chose
to add a kludge to px4_defines.h instead that fixes this problem,
until the time that NuttX can be fixed (again postponing changing
a submodule). The kludge still demands including <cmath>, thus.

After removal of the math header file, it needed to be included
in source files that actually need it, of course.

Finally, I had a look at the math macro's (like M_PI, M_PI_F,
M_DEG_TO_RAD etc). These are sometimes (erroneously) defined in
certain math.h header files (like both, hexagon and nuttx).
This is incorrect: neither the C nor the C++ standard defines
math constants (neither as macro nor otherwise). The "problem"
here was that px4_defines.h defined some of the M_*_F float
constants in terms of the M_* double constant, which are
sometimes not defined either thus. So, I cleaned this up by
defining the M_*_F math constants as float literals in px4_defines.h,
except when they are defined in math.h for that platform.
This means that math.h has to be always included when using those
constants, but well; not much difference there as those files
usually also need/use the macro NAN (which *is* a standard macro
defined by math.h).

Finally finally, DEFAULT_PARAM_FILE was removed as it isn't
used anymore.

All in all I think the resulting px4_defines.h is nice, giving me
much less the feeling of a nearly unmaintainable and over time
slowly growing collection of kludges and hacks.
2016-10-28 08:41:30 +02:00
Erik Jähne
ae2aeab5e4 HIL_STATE: publish control_state_msg when receive mavlink_hil_state_quaternion message 2016-10-28 08:38:18 +02:00
Carlo Wood
5b52cd0fe6 Compile fixes for old/unused targets.
These are some changes that I needed to compile
most of the unsupported targets.

After this all (make list_config_targets) compile
for me except: posix_eagle_muorb, posix_sdflight_default
and qurt_eagle_legacy_driver_default.
2016-10-26 14:00:52 +02:00
Andreas Antener
1999ed2601 Testing: use return value to check if controllib tests failed 2016-10-26 08:41:21 +02:00
Beat Küng
a2c493efc7 fix vmount: initialize manual control for mavlink inputs 2016-10-26 08:40:23 +02:00
David Sidrane
7ae749090b Update NuttX submodule to use backport of ctype.h & cctype
This is the equivalent to Greg's upstream solution for ctype.h &
 cctype with the necessary shadow waning fix.
 It also deletes the Hack in pa4_defines.h
2016-10-25 08:39:09 +02:00
Mark Whitehorn
4cc97aa705 fix another bug in fmu mode 2016-10-24 18:22:18 +02:00
Beat Küng
cbbee30e48 log_writer_file: add include px4_posix.h (needed for stack size macro)
Failed with GCC 6.0.1, don't know why it worked before...
2016-10-24 10:22:48 +02:00
Beat Küng
c8a79d2443 mc_pos_control_main: remove <functional> include
Avoid including <functional> which can cause problems on NuttX
2016-10-24 10:22:48 +02:00
Beat Küng
3029555016 uORBUtils: remove #include <string>
Avoid including <string> which can cause problems on NuttX
2016-10-24 10:22:48 +02:00
Beat Küng
d0dace7c23 uavcan: use math::min instead of std::min
Avoid including <memory> which can cause problems on NuttX
2016-10-24 10:22:48 +02:00
Lorenz Meier
f466913a32 Update MAVLink headers and adapter header to current master 2016-10-23 22:14:19 +02:00
Lorenz Meier
f9abe39c3a DSM parser: Keep local copy of channel data 2016-10-23 19:58:52 +02:00
Lorenz Meier
3bed398a1e FMU: scan longer 2016-10-23 19:58:52 +02:00
Lorenz Meier
05bc9acfb7 navigator: Wrap get time inside into function call and set time inside to zero
This ensures that the dual-use of the pitch_min / time_inside field is handled
properly between takeoff and non-takeoff items. Flight tested in SITL.
2016-10-23 16:26:03 +02:00