ArduCopter: cope with AP_AVOIDANCE_ENABLED being false

This commit is contained in:
Peter Barker 2024-03-09 18:49:48 +11:00 committed by Peter Barker
parent e4ff1a97d5
commit f4bb15d8cd
2 changed files with 6 additions and 2 deletions

View File

@ -195,7 +195,11 @@
//////////////////////////////////////////////////////////////////////////////
// Follow - follow another vehicle or GCS
#ifndef MODE_FOLLOW_ENABLED
# define MODE_FOLLOW_ENABLED AP_FOLLOW_ENABLED
#if AP_FOLLOW_ENABLED && AP_AVOIDANCE_ENABLED
#define MODE_FOLLOW_ENABLED ENABLED
#else
#define MODE_FOLLOW_ENABLED DISABLED
#endif
#endif
//////////////////////////////////////////////////////////////////////////////

View File

@ -1774,7 +1774,7 @@ private:
};
#if AP_FOLLOW_ENABLED
#if MODE_FOLLOW_ENABLED == ENABLED
class ModeFollow : public ModeGuided {
public: