Commit Graph

10024 Commits

Author SHA1 Message Date
Matthias Grob 3ce5525b7c mc_att_control: use expo input for acro mode to allow for high input rates without loosing input sensitivity 2017-10-17 16:54:16 +02:00
Beat Küng 291872a28d mavlink: fix flight_information: use COM_FLIGHT_UUID instead of the board id
The board id was used as flight id which does not make sense.
2017-10-17 09:56:01 +02:00
Beat Küng 85e82dca0d commander: add COM_FLIGHT_UUID param, increased upon disarm 2017-10-17 09:56:01 +02:00
Beat Küng fa8453443f fix commander: remove arming_state_changed, check for was_armed != armed.armed instead
arming_state_changed was not set in all places where an arming transition
occurred, for example when calling arm_disarm() from auto-disarm.

We did not notice because the state is published with at least 5 Hz already.
2017-10-17 09:56:01 +02:00
José Roberto de Souza 239de7191f dataman: Prevent database corruption
The size in g_per_item_size[item] is the real struct size
+ DM_SECTOR_HDR_SIZE bytes of header and the backend functions were
not taking in care it. So a call to dm_write() with more bytes than
the real struct is allowed, causing corruption in the header of the
next item.

Kudos to jeonghwan-lee for finding it. https://github.com/PX4/Firmware/issues/7927
2017-10-16 23:38:03 +02:00
sanderux fd6f2192ac Code style 2017-10-15 15:34:59 +02:00
sanderux b01d887700 When switching to land in VTOL, update land target during back transition 2017-10-15 15:34:59 +02:00
Beat Küng 98e6ba858d logger: change SDLOG_PROFILE into a bitset
This is more flexible, allowing a combination of sets.

The default enables the same set & rates as before
2017-10-14 14:21:11 +02:00
Beat Küng be6079bc52 logger: add high rate & debug profiles 2017-10-14 14:21:11 +02:00
Beat Küng 30bc248138 rc_check: cleanup mavlink log messages 2017-10-13 15:50:37 +02:00
Daniel Agar c47cd972a8 attitude_estimator_q remove unused (#8106) 2017-10-13 00:54:52 -04:00
Beat Küng 4da4093839 logger status output: print 'Not logging' if not actually logging 2017-10-12 16:40:47 +02:00
acfloria 9d2da611f6 Fix mixer issue with undefined return in callback and non value initialized variables. 2017-10-12 12:03:22 +02:00
Daniel Agar 651df03f76 RTPS and micro-CDR build system cleanup (#8084) 2017-10-11 13:05:44 -04:00
Dennis Mannhart bb9f8c3b44 navigator set cruising speed/throttle for reposition (#8096) 2017-10-11 10:30:03 -04:00
Sugnan Prabhu 81809be7cd Add include guard in headers files (#8108)
Signed-off-by: Sugnan Prabhu S <sugnan.prabhu.s@intel.com>
2017-10-11 09:47:52 -04:00
Dennis Mannhart 8a0a8e20e1 mc_pos_control: use correct altitude as limit
fadfdasf
2017-10-10 10:28:07 +02:00
Dennis Mannhart 115e7246b0 battery: only propagate warning state in upwards 2017-10-10 10:28:07 +02:00
Dennis Mannhart f9b8afc006 Navigator: Use maximum flight altitude to limit missions
This change limits all mission items to the maximum flight altitude. The mission will still be executed and flown,
but the vehicle will never exceed the mission altitude. This ensures the vehicle can always reach the mission
items. Wether or not the entire mission should be rejected if it falls outside of the fenced area is enforced
in the mission feasibility checker function.
2017-10-10 10:28:07 +02:00
Dennis Mannhart 29cdb655c3 landdetector: remove outdated comment 2017-10-10 10:21:09 +02:00
Dennis Mannhart 44a71d90f5 mc_pos_control: takeoff threshold to 0.65 2017-10-09 19:05:15 +02:00
Julian Oes 7229ec2a37 Move throttle check from land detector to posctrl
This commit is an attempt to fix a race condition happening on takeoff
between the land detector and the multicopter position controller.

Previously, an auto-takeoff leads to the following events:

1. A takeoff setpoint is given.
2. The thrust setpoint spikes because we don't enter smooth takeoff yet.
3. The land detector detects a takeoff because of the high thrust.
4. The position controller sees the landed state transition and
   initiates the smooth takeoff. Thrust goes back down.
5. Depending on control gains the takeoff is successful or fails
   if the smoothing takes too long which causes thrust to be too low, so
   the land detector detects land again.

The two obvious problems with this are:
- The intermittent spike.
- The failed takeoff because of the smoothing leads to a delay..

With this change, the logic for a takeoff detection is moved from the
land detector to the position controller.

The events are now:

1. A takeoff setpoint is given.
2. The position controller detects the takeoff setpoint and initiates
   the smooth takeoff.
3. As thrust ramps up, the land detector detects the take off.

In the same way, we now detect the intent to takeoff in manual,
altitude, control, position control in the position controller instead
of in the land detector.
2017-10-09 19:05:15 +02:00
Dario Röthlisberger 3dd4454a87 version: include FIRMWARE_TYPE in vendor version 2017-10-09 14:41:58 +02:00
Dario Röthlisberger 257e54b304 logger: write vendor version if existent 2017-10-09 14:41:58 +02:00
Dennis Mannhart 0d7d6e59f5 mc_pos_control: description fix 2017-10-09 10:20:29 +02:00
Matthias Grob 2b7dcd3f34 mc_pos_control: multiple small fixes in position controller we acumulated over time during our PX4 deployment and want to contribute back 2017-10-09 10:20:29 +02:00
Matthias Grob c177d6491a mc_pos_control: simplify unnecessary complicated boolean conditions 2017-10-09 10:20:29 +02:00
Paul Riseborough ed950d70ce ekf2: Add missing documentation 2017-10-09 08:58:01 +02:00
Paul Riseborough dbc3a13236 ekf2: remove unused parameter
The logging of replay data is now controlled by the logging module
2017-10-09 08:58:01 +02:00
Paul Riseborough 6cfee65060 ekf2: Add parameters to tune accelerometer bias learning
These parameters enable the accel bias limiting and learning inhibit logic in the ecl EKF to be easily tuned during testing and replay.
2017-10-09 08:58:01 +02:00
Paul Riseborough 66277d0c02 ekf2: Added @reboot_required to parameters 2017-10-09 08:58:01 +02:00
Lorenz Meier dd7b72dfb0 MAVLink app: Fix boot-time race between receive thread and instantiation. 2017-10-07 13:56:30 +02:00
Bart Slinger adba797323 Helicopter mixer scale throttle to -1 .. +1
Not sure why it worked for me without this change. I cannot test it myself. Should fix https://github.com/PX4/Firmware/issues/8013
2017-10-07 10:59:18 +02:00
Beat Küng 353caec1af temperature_calibration: check if no sensor is found 2017-10-07 10:57:53 +02:00
Florian Achermann 6b97470106 SDLOG2: Fix definition of DPRS log format. (#8058) 2017-10-06 18:57:43 -07:00
Paul Riseborough 2a4336b6ef commander: EKF2 GPS requirement 20 sec after 3D lock 2017-10-06 16:22:53 -07:00
Daniel Agar 2495f8942b preflightcheck EKF2 GPS requirement after 20s 2017-10-06 16:22:53 -07:00
Daniel Agar 9a9923c517 commander simplify sensors PreflightCheck 2017-10-06 16:22:53 -07:00
Daniel Agar 263b7ea009 commander battery failsafe only error if TRANSITION_DENIED 2017-10-06 20:11:59 +02:00
Daniel Agar 80dd87536e navigator fix vehicle_command_ack (don't copy external) 2017-10-06 20:11:19 +02:00
Daniel Agar aa2566970e FW landing abort remove message comma (read as a pause) 2017-10-06 20:11:19 +02:00
Daniel Agar 123a0b584a cmake fix posix upload targets 2017-10-05 11:28:10 -10:00
Paul Riseborough 0def4ace5f commander: check magnetometers for inconsistency preflight 2017-10-05 09:30:26 -07:00
Paul Riseborough 60a68d30c7 sensors: Calculate and publish magnetometer inconsistency 2017-10-05 09:30:26 -07:00
ChristophTobler ec61ae0003 ekf2: add some comments 2017-10-04 13:11:11 +02:00
Beat Küng 8016d69ba4 mavlink_log_handler: set current_log_filep to NULL after closing the file
It probably did not cause further issues, except that fclose() was called
on an invalid file handle later on.
2017-10-04 07:33:47 +02:00
Beat Küng 2dd34d639d commander: ignore internal commands during calibration
if vmount was enabled in mavlink mode, it was continuously sending mavlink
commmands, which lead to 'command denied during calibration: 205' messages
during calibration.
2017-10-03 07:50:27 +02:00
Beat Küng 29e85edac8 Revert "param MPC_MAN_TILT_MAX: decrease maximum from 90 to 85 degrees"
This reverts commit d6df692b7a.

The changes to attitude controller improve this a lot.
2017-10-01 15:36:21 +02:00
Beat Küng 98893c9f4f mc_att_control params: increase max roll/pitch/yaw rates to 1800
If you want to go to the limit of what the vehicle can do, you need to be
able to set it so large that it is guaranteed that it's never limited by
software.

Tests showed that it's not a problem to increase it to very high numbers.
2017-10-01 15:36:21 +02:00
Beat Küng f5d9155ab2 mc_att_control params: reduce default max acro rates from 360 to 120 deg/s
360 is too fast if you just want to hover. Next step is to add expo(),
so that we still have fine-grained control at the center and high rates
at the edges.
2017-10-01 15:36:21 +02:00