19938 Commits

Author SHA1 Message Date
David Sidrane
c4d91ef644 Removed CONFIG_STM32_I2CTIMEOTICKS defined in the PX4 I2C driver
CONFIG_STM32_I2CTIMEOTICKS is hard defined on PX4 master
 and defconfig defined on upstream Nuttx (nuttx_v3) it will be fixed
 there.
2016-11-05 11:06:43 +01:00
David Sidrane
fd797ae3b4 Using build system warnings.
Aligned Make.Defs to use the build system's defined warnigns.
2016-11-05 11:06:43 +01:00
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
Beat Küng
587c5161a3 mavlink_{shell,ulog_streaming}.py: show full error output when pymavlink import fails 2016-11-04 11:08:06 +01:00
Beat Küng
fa461d018d mavlink_{shell,ulog_streaming}.py: send heartbeat
This is helpful, so that a connected partner can switch from broadcasting
to a 'connected' state.
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
6cbd398974 RPi/Navio: add rpi baseline config for fw 2016-11-02 17:45:31 +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
Henry Zhang
5076ba0049 MindPX: Disable second CAN bus. 2016-10-29 10:56:32 +02:00
Henry Zhang
99ad8f464e MindPX: Update modules config. 2016-10-29 10:56:32 +02:00
Henry Zhang
93343487e7 MindPX: Harmonize with FMUv4. 2016-10-29 10:56:32 +02:00
Julian Oes
c9f0d1e645 rcS: move check for PWM input up
pwm_input was not working correctly (only after a pwm_input reset) on
Pixracer because fmu was started on all PWM output channels.

This moves the check if PWM input is needed up before the fmu start.
2016-10-29 10:52:44 +02:00
Lorenz Meier
b9cf679118 Update sitl_gazebo 2016-10-29 00:01:39 +02:00
Lorenz Meier
b3e948d28c Update simulators 2016-10-29 00:00:33 +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
Julian Oes
0a043365ec rename gazebo_tailsitter to tailsitter
This is currently broken anyway but the new name makes more sense.
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
Carlo Wood
e29b9b5d39 Remove fake config targets.
The "targets" posix_rpi_common, qurt_sdflight_default and
posix_sdflight_default are not real targets; they are
just files in cmake/configs that are included by other
targets.
2016-10-28 08:40:23 +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