Browse Source

ArduCopter: Remove unused fence floor enable function

c415-sdk
James O'Shannessy 4 years ago committed by Peter Barker
parent
commit
2a9affe517
  1. 2
      ArduCopter/mode.h
  2. 16
      ArduCopter/takeoff.cpp

2
ArduCopter/mode.h

@ -115,8 +115,6 @@ protected:
// return expected input throttle setting to hover: // return expected input throttle setting to hover:
virtual float throttle_hover() const; virtual float throttle_hover() const;
void autoenable_floor_fence(void);
// Alt_Hold based flight mode states used in Alt_Hold, Loiter, and Sport // Alt_Hold based flight mode states used in Alt_Hold, Loiter, and Sport
enum AltHoldModeState { enum AltHoldModeState {
AltHold_MotorStopped, AltHold_MotorStopped,

16
ArduCopter/takeoff.cpp

@ -225,19 +225,3 @@ bool Mode::is_taking_off() const
} }
return takeoff.running(); return takeoff.running();
} }
// called when takeoff is complete
void Mode::autoenable_floor_fence(void)
{
#if AC_FENCE == ENABLED
switch(copter.fence.auto_enabled()) {
case AC_Fence::AutoEnable::ALWAYS_ENABLED:
case AC_Fence::AutoEnable::ENABLE_DISABLE_FLOOR_ONLY:
copter.fence.enable(true);
break;
default:
// fence does not auto-enable in other takeoff conditions
break;
}
#endif
}

Loading…
Cancel
Save