Commit Graph

74 Commits

Author SHA1 Message Date
Randy Mackay fbfc94cf69 Copter: remove GPS glitch and failsafe
The EKF failsafe now captures all failures that could lead to a bad
position including GPS glitches and a bad compass meaning we do not need
this protection in the main flight code.
2015-03-13 16:40:46 +09:00
Randy Mackay d5fd6d2a99 Copter: use home_is_set function 2015-02-12 15:00:52 +09:00
Robert Lefebvre 205b312789 Copter: GCS Failsafe comments and format changes 2015-01-05 10:34:17 +09:00
Robert Lefebvre 5f19a43104 Copter: GCS Failsafe to trigger if using Guided mode 2015-01-05 10:33:50 +09:00
Randy Mackay 562f3e7382 Copter: set notify event when failsafe changes flight mode 2014-12-15 14:10:19 +09:00
Randy Mackay 0994529624 Copter: remove OF_Loiter from FLTMODE param descriptions
Also remove OF_Loiter reference in comments
No functional change
2014-12-08 14:57:04 +09:00
Jonathan Challinger 8e3d163c3d Copter: Change all zero throttle checks that should be conservative to use ap.throttle_zero 2014-10-08 20:54:24 +09:00
Randy Mackay e7753223ba Copter: low battery msg to severity high 2014-09-21 17:33:19 +09:00
Randy Mackay 85b4ba6142 Copter: Thr and Batt failsafe disarm when landed
When throttle/radio failsafe or battery failsafe are triggered, the
vehicle will disarm if it is landed even if the throttle is not at zero.
Auto mode will disarm if landed and mission has not started.  This
ensures that the vehicle does not disarm during a mission land command
that appears mid way through a mission.
2014-07-31 15:00:06 +09:00
Randy Mackay 73fcfbd174 Copter: add no-break to case to resolve compiler warning
This also helps kick off the auto builder for AC3.2-rc3
2014-07-17 12:10:45 +09:00
Randy Mackay 65e5367619 Copter: rename hybrid to poshold 2014-07-11 14:09:01 +09:00
Jonathan Challinger 09a01a4668 Copter: Wait 4 seconds before beginning to land during failsafes 2014-07-06 20:25:04 +09:00
Randy Mackay 4686eef266 Copter: GPS failsafe ensures LAND is pilot-controlled
This resolves issue #880 in which if a GPS failsafe occurred while the
vehicle was already in LAND mode, the LAND would continue to be GPS
controlled LAND instead of pilot-controlled LAND
2014-04-27 15:11:47 +09:00
Randy Mackay b5ed23f592 Copter: integrate skeleton Hybrid mode 2014-04-23 14:59:17 +09:00
Emile Castelnuovo f5a68fdba1 Copter: clear RC in overrides on GCS failsafe. 2014-04-13 22:59:51 +09:00
Randy Mackay 0a2adbac1b Copter: renaming functions after moving xy control 2014-02-15 05:27:36 +11:00
Andrew Tridgell e8b8cc1a5d Copter: converted to AP_ServoRelayEvents 2014-01-20 17:06:29 +11:00
Andrew Tridgell e3804e2846 Copter: fixes for AP_Relay API change 2014-01-20 17:06:29 +11:00
Randy Mackay 59cea4b88c Copter: remove CopterLED from main code 2013-11-30 18:20:55 +09:00
Randy Mackay 699a5bd381 Copter: radio, batt failsafe disarm if copter is landed in Loiter or AltHold 2013-11-18 15:51:17 +09:00
Randy Mackay a98fb174c4 Copter: batt failsafe triggers RTL from AUTO 2013-11-16 14:55:49 +09:00
Randy Mackay 87127f0ab8 Copter: allow battery failsafe to trigger RTL 2013-11-16 14:46:57 +09:00
Randy Mackay bc1e06757b Copter: allow GPS failsafe to trigger AltHold
FS_GPS_ENABLE parameter accepts two new options, 2=AltHold,
3=LandEvenFromStabilize.
If set to 3 the GPS failsafe will trigger and LAND even from manual
flight modes like Stabilize and ACRO.  This is useful for users who want
to ensure their copters can never stray outside the circular fence (the
fence only triggers when it knows it is outside the bounds, and it can't
know this if it has no GPS)
2013-11-16 13:55:59 +09:00
Randy Mackay 13fd33c2d8 Copter: gps failsafe disabled until we get first 3d lock 2013-11-12 11:13:05 +09:00
Randy Mackay 03831cdd28 Copter: GPS ok only when not glitching
Removed redundant checks to GPS_ok before setting flight mode to RTL
(this check is already performed inside the set_mode function)
Removed reset of home distance and bearing when GPS lock is lost, it now
remains at the last known value
2013-11-11 22:24:18 +09:00
Randy Mackay 32f53624d6 Copter: rename low_battery to failsafe.battery 2013-10-13 13:52:52 +09:00
Randy Mackay dab4f032f9 Copter: integrate BattMonitor 2013-10-03 11:16:28 +09:00
Randy Mackay 7cc8a9038f Copter: move failsafe flags into structure 2013-09-26 19:37:15 +09:00
Randy Mackay 29b30cf752 Copter: gps failsafe on lengthy glitches 2013-09-24 21:41:30 +09:00
Randy Mackay c5bd1a76ed Copter: comment update re low battery event 2013-09-12 22:41:28 +09:00
Randy Mackay 39ab4f62ef Copter: add SPORT mode 2013-08-05 21:04:41 +09:00
Olivier-ADLER ac0886334d Copter: Failsafe GCS typo in comments
replaced GPS by GCS word in different comments locations
2013-07-20 20:54:51 +09:00
Randy Mackay 7ea971d948 Copter: check set_mode for failure
Previously if set_mode failed it would return the copter to stabilize
mode.  With this commit set_mode returns a true/false indicating whether
it succeeded or not so the caller can make the decision as to the
appropriate response which could be to stay in the current flight mode
or try another flight mode.
2013-07-20 11:01:10 +09:00
Randy Mackay 6bfcd28ade Copter: thr failsafe will not RTL if in batt failsafe
resolves issue #413
2013-07-13 19:49:25 +09:00
Randy Mackay 9361e9fe32 Coper: compile error fix when FENCE disabled 2013-07-05 17:22:05 -10:00
Randy Mackay 917ae883a0 Copter: revert prev changes to battery failsafe
The battery failsafe should remain independent of any throttle failsafe
behaviour settings
2013-06-27 10:30:46 -10:00
Robert Gayle 917edcab11 Copter: added FS_THR_ENABLED_ALWAYS_LAND (=3) option: don't attempt RTL, just land 2013-06-27 10:19:38 -10:00
Randy Mackay cb0e262e24 Copter: GPS Failsafe switch to LAND if circular fence enabled 2013-06-26 11:57:59 +09:00
Dr Gareth Owen 18e566ccc5 failsafe gps lost bug fix 2013-06-02 11:41:59 +09:00
Dr Gareth Owen f175111243 added GPS check before mode change. New mode_requires_gps() function. 2013-05-30 20:33:15 +09:00
Randy Mackay bab9fa25e5 Copter: add GCS failsafe 2013-04-29 21:30:22 +09:00
Randy Mackay 629d23b7e2 Copter: remove WP_SPEED and WP_RADIUS parameters
AC_WPNav library has equivalent params with very similar names
2013-04-14 13:27:37 +09:00
Randy Mackay 7cf2255822 Copter LEDs: replace bitRead with bitmask
Consolidate all checks of led_mode to leds.pde
Add #defines for bitmasks comparisons
Some formatting changes
2013-04-01 13:10:12 +09:00
Randy Mackay 150046f2b8 Copter: GPS Failsafe implemented
Switches to LAND mode 5 seconds after losing GPS if you're in a flight
mode that requires a GPS
2013-03-16 17:27:46 +09:00
Randy Mackay f9539384a1 Copter: rename failsafe to failsafe_radio
Makes way for separation of failsafes for throttle, gps and gcs
2013-03-16 17:14:21 +09:00
Randy Mackay 9ad6f711f8 ArduCopter: replace FS_THR_RTL_MIN_DISTANCE with wp_radius
This effectively means that an RTL kicked off by a failsafe will
immediately switch to LAND mode only if within 2 meters.  Previously the
radius was much wider (15m).
2013-01-13 20:00:47 +11:00
rmackay9 2181ec2ab0 ArduCopter: log watchdog event to dataflash 2013-01-02 09:55:37 +11:00
rmackay9 16f99ebcab ArduCopter: fix to sub system used to record failsafe in dataflash ERR message 2013-01-02 09:55:37 +11:00
rmackay9 672fdfbf71 ArduCopter: added ERR dataflash message
Failsafe events changed to errors so they are more obvious.
Errors recorded to dataflash for failure to init compass and optical flow sensor.
Errors recorded for pwm failure.
Resolved a compile error when dataflash logging is disabled.
2013-01-02 09:55:37 +11:00
rmackay9 02bf3ea027 ArduCopter: Battery failsafe triggers RTL only if we are more than 15m from home, otherwise it performs a LAND 2013-01-02 09:55:37 +11:00