Browse Source

Copter: disarm on land even if pilot throttle not zero

default behaviour remains as before, this is an compile time option only
mission-4.1.18
Randy Mackay 11 years ago
parent
commit
a9f1a2ee5e
  1. 5
      ArduCopter/APM_Config.h
  2. 4
      ArduCopter/Attitude.pde
  3. 3
      ArduCopter/config.h

5
ArduCopter/APM_Config.h

@ -34,8 +34,9 @@ @@ -34,8 +34,9 @@
//#define SPRAYER ENABLED // enable the crop sprayer feature (two ESC controlled pumps the speed of which depends upon the vehicle's horizontal velocity)
//#define EPM_ENABLED ENABLED // enable epm cargo gripper costs 500bytes of flash
// redefine size of throttle deadband in pwm (0 ~ 1000)
//#define THROTTLE_IN_DEADBAND 100
// other settings
//#define THROTTLE_IN_DEADBAND 100 // redefine size of throttle deadband in pwm (0 ~ 1000)
//#define LAND_REQUIRE_MIN_THROTTLE_TO_DISARM DISABLED // when set to DISABLED vehicle will disarm after landing (in LAND mode or RTL) even if pilot has not put throttle to zero
//#define HIL_MODE HIL_MODE_SENSORS // build for hardware-in-the-loop simulation

4
ArduCopter/Attitude.pde

@ -1094,7 +1094,11 @@ get_throttle_land() @@ -1094,7 +1094,11 @@ get_throttle_land()
get_throttle_rate_stabilized(-abs(g.land_speed));
// disarm when the landing detector says we've landed and throttle is at min (or we're in failsafe so we have no pilot thorottle input)
#if LAND_REQUIRE_MIN_THROTTLE_TO_DISARM == ENABLED
if( ap.land_complete && (g.rc_3.control_in == 0 || failsafe.radio) ) {
#else
if (ap.land_complete) {
#endif
init_disarm_motors();
}
}

3
ArduCopter/config.h

@ -464,6 +464,9 @@ @@ -464,6 +464,9 @@
#ifndef LAND_DETECTOR_TRIGGER
# define LAND_DETECTOR_TRIGGER 50 // number of 50hz iterations with near zero climb rate and low throttle that triggers landing complete.
#endif
#ifndef LAND_REQUIRE_MIN_THROTTLE_TO_DISARM // require pilot to reduce throttle to minimum before vehicle will disarm
# define LAND_REQUIRE_MIN_THROTTLE_TO_DISARM ENABLED
#endif
//////////////////////////////////////////////////////////////////////////////
// CAMERA TRIGGER AND CONTROL

Loading…
Cancel
Save