7970 Commits

Author SHA1 Message Date
sander
4b414d96eb Init _mission_throttle 2016-07-28 16:44:27 +02:00
sander
0ce08ed9f8 Code style 2016-07-28 16:44:27 +02:00
sander
ce3749d04f Make tecs init airspeed mode dependent 2016-07-28 16:44:26 +02:00
sander
0cf77a30b1 Init tecs with transition airspeed for vtols without airspeed sensor 2016-07-28 16:44:26 +02:00
Sander Smeets
c4eb65862f Reduce esc calibration pwm timeout (#5011) 2016-07-27 01:52:20 -07:00
Daniel Agar
a9cb2d2fbe navigator mission don't report loiter if landed 2016-07-27 10:39:07 +02:00
Julian Oes
c4cb916afa Fix sdlog2/logger path/file name overflows. (#5138)
* logger: prevent logpath buffer overflows

The handling of the log path had the potential to cause buffer
overflows, especially on POSIX platforms where the paths are often much
longer than just 64 chars.

* sdlog2: prevent logpath buffer overflows

When the log folder path was created, this was done with the unsafe
sprintf function instead of snprintf. This caused buffer overflows in
SITL but the overflow was usually not detected until recent testing of
some work in progress.
2016-07-27 00:55:29 -07:00
Gus Grubba
c3b58822a8 Fixes to log download (#5133)
* Fixes to log download

* Fixing indentation
2016-07-25 08:15:23 -04:00
Andreas Antener
50175ca7ea manual condition includes threshold values 2016-07-25 08:56:19 +02:00
Roman
aea7bd5b47 fw_attitude_control: calculate attitude setpoint for STAB mode
- attitude setpoint generation for stabilized mode was shifted back
to the fw attitude controller. since the fw position controller is polling
on global position attitude setpoints were not generated when global
position was not published.

Signed-off-by: Roman <bapstroman@gmail.com>
2016-07-25 08:56:19 +02:00
Andreas Antener
f069880504 VTOL: don't wait on TECS in FW state if TECS is not running 2016-07-25 08:56:19 +02:00
Andreas Antener
254358ef86 fixed implicit conversion 2016-07-25 08:56:19 +02:00
Andreas Antener
89a2f5057f fixed code style 2016-07-25 08:56:19 +02:00
Andreas Antener
6ff65cd8b2 reset attitude setpoint where necessary 2016-07-25 08:56:19 +02:00
Andreas Antener
0a997577f5 allow manual yaw in all manual modes and also use it as threshold to snap into heading lock 2016-07-25 08:56:19 +02:00
Andreas Antener
9f7f6e4d3d removed roll lock for altitude hold 2016-07-25 08:56:19 +02:00
Roman
6226a0c77d fw_pos_control_l1: fixed code style
Signed-off-by: Roman <bapstroman@gmail.com>
2016-07-25 08:56:19 +02:00
Roman
ec334f7c9b fw_pos_control_l1: limit max roll and pitch setpoints for manual modes
Signed-off-by: Roman <bapstroman@gmail.com>
2016-07-25 08:56:18 +02:00
tumbili
8c8120e2fc fw position controller: logic cleanup
cleaned up logic when not to use pitch setpoint from TECS

Signed-off-by: tumbili <roman@px4.io>
2016-07-25 08:56:18 +02:00
tumbili
fd51bf44d5 fw position / fw attitude control: move attitude setpoint generation to
position controller

- attitude setpoints for all modes are now computed in the fw position
controller

Signed-off-by: tumbili <roman@px4.io>
2016-07-25 08:56:18 +02:00
Roman
e3f3233ee4 fw position controller: fixup attitude setpoint generation
- generate complete attitude setpoint for position and altitude
control mode
- fix generation of roll setpoint for position control which lead to
wing rock
- add roll and pitch setpoint offsets so that they are logged as well

Signed-off-by: Roman <bapstr@ethz.ch>
2016-07-25 08:56:18 +02:00
James Goppert
05315abc89 Optical flow simulator and install cleanup. (#5132)
sitl CI is having some issue cloning, but I have verified it locally for various configs
2016-07-24 13:07:14 -04:00
James Goppert
a4ef364f80 Added innovation logging to LPE. (#5124) 2016-07-22 19:19:30 -04:00
Michael Schaeuble
d94bdb0829 Add missing defines for Bebop sensor drivers 2016-07-22 09:21:55 +02:00
Beat Küng
8ab841e046 sensors: poll on best-voted gyro (#5106)
This is a follow-up to 399d4ef833cd72ac0
2016-07-21 14:52:32 -07:00
Beat Küng
0f6a6f7150 mavlink_messages.cpp: only warn once, when MAVLink log opening fails
This happens for example if no SD card is present.
2016-07-20 13:07:32 +02:00
Beat Küng
9a8c092116 mavlink_messages.cpp: fix coding style: prepend _ to class members 2016-07-20 13:07:32 +02:00
Beat Küng
7b52eced66 commander: write timestamp of commander_state topic on init and state change 2016-07-19 09:21:35 +02:00
Beat Küng
5b85fdb636 fix sdlog2 replay: changed format string from 9c73eae941c (#5090) 2016-07-18 15:25:49 +02:00
James Goppert
9fcf121380 LPE: Don't use home as local origin (#5067) 2016-07-17 10:16:17 -04:00
Julian Oes
fa614a3cc1 RPi: just use RPI instead of RPI2.
The reason for this change is that RPi2 and RPi3 are compatible, and
hopefully all differences coming up can be resolved without ifdefs but
at runtime.
2016-07-16 15:51:00 +01:00
Beat Küng
a1b710025b Improve new logger update rate (#5073)
* logger: disable some default topics, which are most likely not used

This is also to safe CPU and lower the amount of file descriptors used.

* logger: use the hrt timer for more accurate scheduling

Under NuttX with the default rate of 285Hz, the actual measured rate was
only 200Hz while on Linux it was ~280Hz. The reason is that NuttX only
uses a usleep() granularity of 1ms, so that the typical sleep time is
longer than what we set.

Now the logger waits on a semaphore, which gets activated periodically
with a hrt timer. With this the measured rate is exactly the expected one,
285Hz.
2016-07-15 16:55:32 -07:00
Beat Küng
ee58f0d11d encoders.msg: remove this topic, it's never published (#5074) 2016-07-15 14:59:52 -07:00
lovettchris
b48c081e5c Reset _transfer_in_progress if mavlink transfer times out. (#5077) 2016-07-15 14:59:30 -07:00
Julian Oes
87e964ec10 commander: POSCTL with localpos for MC
Fixedwings need a global position estimate for POSCTL.
2016-07-15 14:43:36 +01:00
Julian Oes
f430c39f5b commander: allow POSCTL with local position
We want to allow flying POSCTL with optical flow only without GPS.
2016-07-15 14:43:36 +01:00
Beat Küng
4a199c1360 gyro calibration: avoid double initialization of gyro_scale data
They're initialized in do_gyro_calibration already
2016-07-14 14:17:38 +02:00
Julian Oes
f1b8bed5df gyro_calibration: set scale to 1 instead of 0 2016-07-14 13:13:56 +02:00
David Sidrane
8a2df2a458 Avoid unnecessary Write Cycle 2016-07-13 20:42:05 +02:00
David Sidrane
5e8d6375c9 Back Port nuttx_v3 FLASH based parameter hooks 2016-07-13 20:42:05 +02:00
Julian Oes
3ed8b735c2 mavlink: only warn once if broadcast fails
This fixes the issue where the console was spammed if a broadcast failed
after a connection had previously been established.
2016-07-13 19:40:59 +02:00
Beat Küng
399d4ef833 sensors: only poll on first gyro for now
This fixes a bug with following setup:
- two (or N > 1) connected gyros
- ekf2 enabled
In this case, sensors would publish with the combined rate of the gyros,
but with N following messages having the same gyro data & timestamp.
Apparently ekf2 cannot handle this, the other estimators can.

We may want to rethink what the proper solution is here.
2016-07-13 14:35:03 +02:00
Julian Oes
eda2915f0b mavlink: whitespace fix 2016-07-13 10:10:45 +02:00
Julian Oes
d9343fa925 mavlink: use new copy_if_updated interface 2016-07-13 10:10:45 +02:00
Julian Oes
8345a0368b mavlink: add function to copy only if updated
The MavlinkOrbSubscription only had an interface to either always copy
or copy based on a timestamp. This commit adds a copy interface if the
topic has been updated.
2016-07-13 10:10:45 +02:00
Julian Oes
8ded6a58ab mavlink_log: enable queueing
We don't want to drop messages if possible for mavlink log messages, so
let's use the orb queueing.
2016-07-13 10:10:45 +02:00
Julian Oes
314ee6b7e0 commander: remove some if confusion
This is a try to simplify the if statements a bit. Also, a check of
new_arming_state which was impossible, is removed.
2016-07-13 10:10:45 +02:00
Julian Oes
631ce1fc55 commander: proper arguments for preflight check 2016-07-13 10:10:45 +02:00
Andreas Antener
af8cd3f880 correctly scale and trim outputs in IO 2016-07-13 09:29:13 +02:00
Roman
08bbd6dbfa px4iofirmware: added scale parameters for roll, pitch and yaw
since pure manual control for fixed wings in handled on the io side
the scale parameters for roll, pitch and yaw had to be introduced there
as well.

Signed-off-by: Roman <bapstr@ethz.ch>
2016-07-13 09:29:12 +02:00