Commit Graph

62 Commits

Author SHA1 Message Date
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
rmackay9 68b62abd38 ArduCopter with the new Camera and Relay classes for APM1 and APM2.
All changes by Sandro Benigno
2013-01-02 09:55:37 +11:00
rmackay9 5526ca204c ArduCopter: on throttle failsafe, only initiate RTL if we are at least 15m from home 2013-01-02 09:22:51 +11:00
Pat Hickey 7af03127f6 ArduCopter: more work 2012-12-20 14:52:28 +11:00
rmackay9 2f748f8382 ArduCopter: renamed BATT_FAILSAFE to FS_BATT_ENABLE 2012-12-10 23:47:14 +09:00
rmackay9 d31efebd44 ArduCopter: rename throttle failsafe parameters.
Switch to LAND flight mode if throttle failsafe triggers and we do not have a GPS.
THR_FAILSAFE renamed to FS_THR_ENABLE.
THR_FS_VALUE renamed to FS_THR_VALUE.
THR_FS_ACTION removed (action is now controlled by setting FS_THR parameter).
2012-12-10 23:38:43 +09:00
rmackay9 e92b560df5 ArduCopter: low baterry failsafe 2012-11-15 23:35:41 +09:00
rmackay9 e212744f4c ArduCopter: failsafe improvements
resolves momentary throttle drop to zero before failsafe engages
resolves motor cut after 30seconds if flying in stabilize without GPS (now switches to ALT_HOLD with target altitude zero)
disables motors if throttle was zero before failsafe event
2012-11-11 22:11:12 +09:00
Jason Short d2a5928c06 Ap state updates 2012-11-09 22:15:15 -08:00
uncrustify ff0e2e537e uncrustify ArduCopter/events.pde 2012-08-21 18:55:43 -07:00
Jason Short d674baadd2 ACM : Events - renamed target alt 2012-08-09 16:59:44 -07:00
Jason Short 8188058404 ACM: Failsafe Fix for Mission planner initiated AUTO mode
Keeps the failsafe from exiting Auto mode when returning from failsafe. Added arming ability for Toy mode.
2012-07-23 19:34:25 -07:00
Andrew Tridgell 8b258e23e7 ACM: prevent link flood with "Low Battery" warnings
thanks to Marco for noticing this
2012-06-05 11:31:40 +10:00