mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-01-24 09:38:29 -04:00
Copter: add option to disable DRIFT flight mode
Saves about 1kB of space
This commit is contained in:
parent
e5056f8d40
commit
0ddeb56a05
@ -24,6 +24,7 @@
|
|||||||
//#define SPRAYER DISABLED // disable the crop sprayer feature (two ESC controlled pumps the speed of which depends upon the vehicle's horizontal velocity)
|
//#define SPRAYER DISABLED // disable the crop sprayer feature (two ESC controlled pumps the speed of which depends upon the vehicle's horizontal velocity)
|
||||||
//#define WINCH_ENABLED DISABLED // disable winch support
|
//#define WINCH_ENABLED DISABLED // disable winch support
|
||||||
//#define MODE_AUTO_ENABLED DISABLED // disable auto mode support
|
//#define MODE_AUTO_ENABLED DISABLED // disable auto mode support
|
||||||
|
//#define MODE_DRIFT_ENABLED DISABLED // disable drift mode support
|
||||||
//#define MODE_LOITER_ENABLED DISABLED // disable loiter mode support
|
//#define MODE_LOITER_ENABLED DISABLED // disable loiter mode support
|
||||||
//#define MODE_POSHOLD_ENABLED DISABLED // disable poshold mode support
|
//#define MODE_POSHOLD_ENABLED DISABLED // disable poshold mode support
|
||||||
//#define MODE_SMARTRTL_ENABLED DISABLED // disable smartrtl mode support
|
//#define MODE_SMARTRTL_ENABLED DISABLED // disable smartrtl mode support
|
||||||
|
@ -964,7 +964,9 @@ private:
|
|||||||
#endif
|
#endif
|
||||||
ModeBrake mode_brake;
|
ModeBrake mode_brake;
|
||||||
ModeCircle mode_circle;
|
ModeCircle mode_circle;
|
||||||
|
#if MODE_DRIFT_ENABLED == ENABLED
|
||||||
ModeDrift mode_drift;
|
ModeDrift mode_drift;
|
||||||
|
#endif
|
||||||
ModeFlip mode_flip;
|
ModeFlip mode_flip;
|
||||||
ModeGuided mode_guided;
|
ModeGuided mode_guided;
|
||||||
ModeLand mode_land;
|
ModeLand mode_land;
|
||||||
|
@ -273,6 +273,12 @@
|
|||||||
# define MODE_AUTO_ENABLED ENABLED
|
# define MODE_AUTO_ENABLED ENABLED
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
//////////////////////////////////////////////////////////////////////////////
|
||||||
|
// Drift - fly vehicle in altitude-held, coordinated-turn mode
|
||||||
|
#ifndef MODE_DRIFT_ENABLED
|
||||||
|
# define MODE_DRIFT_ENABLED ENABLED
|
||||||
|
#endif
|
||||||
|
|
||||||
//////////////////////////////////////////////////////////////////////////////
|
//////////////////////////////////////////////////////////////////////////////
|
||||||
// Loiter mode - allows vehicle to hold global position
|
// Loiter mode - allows vehicle to hold global position
|
||||||
#ifndef MODE_LOITER_ENABLED
|
#ifndef MODE_LOITER_ENABLED
|
||||||
|
@ -78,9 +78,11 @@ Copter::Mode *Copter::mode_from_mode_num(const uint8_t mode)
|
|||||||
ret = &mode_rtl;
|
ret = &mode_rtl;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
#if MODE_DRIFT_ENABLED == ENABLED
|
||||||
case DRIFT:
|
case DRIFT:
|
||||||
ret = &mode_drift;
|
ret = &mode_drift;
|
||||||
break;
|
break;
|
||||||
|
#endif
|
||||||
|
|
||||||
#if MODE_SPORT_ENABLED == ENABLED
|
#if MODE_SPORT_ENABLED == ENABLED
|
||||||
case SPORT:
|
case SPORT:
|
||||||
|
Loading…
Reference in New Issue
Block a user