ardupilot/ArduCopter
Peter Barker dba3158446 Copter: correct mode change for GCS failsafe in SmartRTL mode
In the case that you:
 - have previously done a successful SmartRTL flight
 - get a mid-air gcs failsafe and enter SmartRTL
 - recover from that gcs failsafe but remain in SmartRTL
 - get another mid-air failsafe

then without this patch you will enter LAND mode.

When determining our failsafe action, we were looking at whether we
should just continue landing.  To do that, we ask the current mode if we
are landing.  Problem is that SmartRTL was handing back the wrong answer
- it was handing back ModeRTL's answer rather than its own, and
ModeRTL's answer was "yes, I'm landing", as that's the last state that
step 1 in the above list leaves that mode in.

This patch simply hands back the correct answer for, "am I landing"
2020-09-08 09:05:03 +09:00
..
afs_copter.cpp ArduCopter: log disarm method 2020-02-22 12:16:29 +11:00
afs_copter.h Copter: correct build when AFS disabled 2019-08-22 10:49:43 +09:00
AP_Arming.cpp Copter: add ekf alt pre-arm and mode init checks 2020-08-20 12:41:40 +09:00
AP_Arming.h Copter: add ekf alt pre-arm and mode init checks 2020-08-20 12:41:40 +09:00
AP_Rally.cpp Copter: adjust for Location_Class and Location unification 2019-01-16 11:45:29 +11:00
AP_Rally.h Copter: Rally no longer takes ahrs in constructor 2019-02-20 18:03:38 +11:00
AP_State.cpp Copter: make SuperSimple type-safe 2020-06-16 19:39:42 +10:00
APM_Config_mavlink_hil.h Copter: Fix typo 2019-03-26 15:39:23 +11:00
APM_Config.h Copter: visual odometry moved to AP_Vehicle 2020-04-09 19:41:08 +09:00
Attitude.cpp Copter: remove wrapper for get_avoidance_adjusted_climbrate 2020-08-22 08:31:25 +09:00
autoyaw.cpp Copter: make make/gimbal configurable on a per-board basis 2020-08-04 09:18:14 +10:00
avoidance_adsb.cpp ArduCopter: use an enumeration for the AP_Avoidance recovery action 2020-08-19 11:38:19 +10:00
avoidance_adsb.h ArduCopter: use an enumeration for the AP_Avoidance recovery action 2020-08-19 11:38:19 +10:00
baro_ground_effect.cpp Copter: simplified update of ekf terrain height stable setting 2020-06-24 21:16:50 +09:00
commands.cpp Copter: cope with change in namespace of LogEvent enum 2019-11-05 08:19:26 +08:00
compassmot.cpp Arducopter: Primary Compass is always serial# 0 2020-02-19 13:59:53 +09:00
config.h Copter: winch enabled with hal-minimize-features 2020-08-07 21:55:07 +09:00
Copter.cpp Copter: integrate winch changes 2020-08-07 21:55:07 +09:00
Copter.h Copter: add gripper release FS_Option 2020-08-26 17:58:24 +09:00
crash_check.cpp Copter: crash check reqs 15deg lean and under 10m/s 2020-07-20 12:49:53 +09:00
defines.h Copter: move mavlink set-position defines into mavlink library 2020-08-11 09:52:52 +09:00
ekf_check.cpp Copter: minor comment fix 2020-04-24 18:18:05 +09:00
esc_calibration.cpp Copter: reject reboot request from GCS if auto esc cal on next reboot 2019-10-15 07:41:44 +09:00
events.cpp Copter: add gripper release FS_Option 2020-08-26 17:58:24 +09:00
failsafe.cpp Copter: rename dataflash to logger 2019-03-28 16:40:57 +11:00
fence.cpp ArduCopter: log disarm method 2020-02-22 12:16:29 +11:00
GCS_Copter.cpp Copter: make SuperSimple type-safe 2020-06-16 19:39:42 +10:00
GCS_Copter.h ArduCopter: create and use INTERNAL_ERROR macro so we get line numbers 2020-04-30 13:21:36 +10:00
GCS_Mavlink.cpp Copter: guided consumes set-pos-target-local-ned Z-axis as offset from origin 2020-09-01 10:27:18 +10:00
GCS_Mavlink.h Copter: implement send_winch_status 2020-08-07 21:55:07 +09:00
heli.cpp Copter: Allow manual autorotations without enabling arot flight mode 2020-05-20 21:56:09 -04:00
inertia.cpp Copter: avoid SITL failure when changing current_loc.alt frame 2020-02-05 17:29:34 +09:00
land_detector.cpp Copter: add air mode aux function 2020-06-16 20:30:26 +10:00
landing_gear.cpp Copter: integrate landing gear option and make edge based 2020-02-26 08:01:00 +09:00
leds.cpp Copter: remove shims used in scheduler 2018-02-12 11:19:34 +09:00
Log.cpp Copter: fix typos in PL dataflash logs field description text 2020-08-04 08:14:29 +09:00
Makefile.waf waf: use single entry point for make wrappers 2015-12-10 10:40:34 +09:00
mode_acro_heli.cpp Copter: add in additional acro options 2020-07-14 15:54:24 +09:00
mode_acro.cpp Copter: add in additional acro options 2020-07-14 15:54:24 +09:00
mode_althold.cpp Copter: add missing fallthrough statements 2020-01-15 13:55:42 +11:00
mode_auto.cpp Copter: integrate winch changes 2020-08-07 21:55:07 +09:00
mode_autorotate.cpp Copter: fixed use of timestamps in autorotate 2020-04-20 07:10:21 +10:00
mode_autotune.cpp Copter: remove wrapper for get_avoidance_adjusted_climbrate 2020-08-22 08:31:25 +09:00
mode_avoid_adsb.cpp Copter: move control_mode_t into being Mode::Number enum class 2019-09-13 13:12:08 +09:00
mode_brake.cpp Copter: Support new AP_Vehicle::set_mode 2019-10-25 08:48:22 +08:00
mode_circle.cpp Copter: support circle with terrain altitude 2020-04-16 17:30:29 +09:00
mode_drift.cpp Copter: Delay release of I term until take off 2019-11-09 09:40:10 +08:00
mode_flip.cpp Copter: Delay release of I term until take off 2019-11-09 09:40:10 +08:00
mode_flowhold.cpp Copter: remove wrapper for get_avoidance_adjusted_climbrate 2020-08-22 08:31:25 +09:00
mode_follow.cpp Copter: follow mode restores offsets to zero on exit 2019-10-07 08:30:45 +09:00
mode_guided_nogps.cpp Copter: correct namespacing of Copter modes 2019-06-11 09:18:22 +09:00
mode_guided.cpp Copter: dev option so set-attitude-target thrust field used as thrust 2020-08-01 08:32:23 +09:00
mode_land.cpp Copter: integrate landing gear option and make edge based 2020-02-26 08:01:00 +09:00
mode_loiter.cpp Copter: add missing fallthrough statements 2020-01-15 13:55:42 +11:00
mode_poshold.cpp Copter: add missing fallthrough statements 2020-01-15 13:55:42 +11:00
mode_rtl.cpp Copter: remove superfluous RETURN_TARGET_ALTTYPE_ from enum class names 2020-09-08 10:01:59 +10:00
mode_smart_rtl.cpp Copter: correct mode change for GCS failsafe in SmartRTL mode 2020-09-08 09:05:03 +09:00
mode_sport.cpp Copter: add missing fallthrough statements 2020-01-15 13:55:42 +11:00
mode_stabilize_heli.cpp Copter: add missing fallthrough statements 2020-01-15 13:55:42 +11:00
mode_stabilize.cpp Copter: Delay release of I term until take off 2019-11-09 09:40:10 +08:00
mode_systemid.cpp Copter: use SID_AXIS to hide other SystemID mode params 2019-12-03 14:53:55 +08:00
mode_throw.cpp Copter: Added Throw Mode logger documentation 2020-04-07 08:05:10 +09:00
mode_zigzag.cpp Copter: add ZIGZ_AUTO_ENABLE parameter 2020-06-03 15:21:21 +09:00
mode.cpp Copter: remove wrapper for get_avoidance_adjusted_climbrate 2020-08-22 08:31:25 +09:00
mode.h Copter: correct mode change for GCS failsafe in SmartRTL mode 2020-09-08 09:05:03 +09:00
motor_test.cpp Copter: Support higher resolution percent based motor tests 2020-08-09 13:47:48 +10:00
motors.cpp Copter: do not adjust trims while landed 2020-06-03 16:19:01 +10:00
navigation.cpp ArduCopter: move get_bearing_cd to Location and rename to get_bearing_to 2019-04-06 09:10:28 +11:00
Parameters.cpp Copter: add gripper release FS_Option 2020-08-26 17:58:24 +09:00
Parameters.h Copter: move to using CANManager library 2020-08-19 17:31:09 +10:00
precision_landing.cpp Copter: precision landing does not use terrain database 2019-12-17 20:02:01 +09:00
radio.cpp Copter: add air mode aux function 2020-06-16 20:30:26 +10:00
RC_Channel.cpp Copter: fix init of RC option 52 2020-08-18 18:55:29 +10:00
RC_Channel.h Copter: add in additional acro options 2020-07-14 15:54:24 +09:00
ReleaseNotes.txt Copter: 4.0.4-rc4 release notes 2020-08-28 09:37:59 +09:00
sensors.cpp Copter: integrate winch changes 2020-08-07 21:55:07 +09:00
standby.cpp Copter: Standby functions 2019-10-17 14:57:18 +09:00
surface_tracking.cpp Copter: CTUN logging fix for SAlt 2019-11-12 09:10:21 +08:00
system.cpp Copter: add ekf alt pre-arm and mode init checks 2020-08-20 12:41:40 +09:00
takeoff.cpp Copter: move set_throttle_takeoff implementation into Mode 2020-08-05 08:23:03 +09:00
terrain.cpp Copter: precision landing does not use terrain database 2019-12-17 20:02:01 +09:00
toy_mode.cpp Copter: make SuperSimple type-safe 2020-06-16 19:39:42 +10:00
toy_mode.h Copter: correct compilation with toymode enabled 2019-11-06 16:36:35 +11:00
tuning.cpp Copter: integrate winch changes 2020-08-07 21:55:07 +09:00
UserCode.cpp Copter: implement user auxswitch functions 2018-07-26 20:27:49 +09:00
UserParameters.cpp Copter: User parameters implementation 2018-08-31 08:42:03 +09:00
UserParameters.h Copter: User parameters implementation 2018-08-31 08:42:03 +09:00
UserVariables.h Global: remove mode line from headers 2016-10-24 09:42:01 -02:00
version.cpp Copter: set os_sw_version to date fw was compiled 2019-06-18 10:54:01 +10:00
version.h Copter: version to 4.1.0-dev 2020-06-01 12:58:12 +09:00
wscript Copter: remove linkage of AP_Stats 2020-01-16 20:36:54 +11:00