@ -91,6 +91,10 @@ public:
@@ -91,6 +91,10 @@ public:
// whether control input is ignored with STICK_MIXING=0
virtual bool does_auto_navigation ( ) const { return false ; }
// true if the mode sets the vehicle destination, which controls
// whether control input is ignored with STICK_MIXING=0
virtual bool does_auto_throttle ( ) const { return false ; }
protected :
// subclasses override this to perform checks before entering the mode
@ -134,6 +138,8 @@ public:
@@ -134,6 +138,8 @@ public:
bool does_auto_navigation ( ) const override { return true ; }
bool does_auto_throttle ( ) const override { return true ; }
protected :
bool _enter ( ) override ;
@ -177,6 +183,8 @@ public:
@@ -177,6 +183,8 @@ public:
bool does_auto_navigation ( ) const override { return true ; }
bool does_auto_throttle ( ) const override { return true ; }
protected :
bool _enter ( ) override ;
@ -195,6 +203,8 @@ public:
@@ -195,6 +203,8 @@ public:
bool does_auto_navigation ( ) const override { return true ; }
bool does_auto_throttle ( ) const override { return true ; }
protected :
bool _enter ( ) override ;
@ -216,8 +226,12 @@ public:
@@ -216,8 +226,12 @@ public:
bool isHeadingLinedUp ( const Location loiterCenterLoc , const Location targetLoc ) ;
bool isHeadingLinedUp_cd ( const int32_t bearing_cd ) ;
bool allows_throttle_nudging ( ) const override { return true ; }
bool does_auto_navigation ( ) const override { return true ; }
bool does_auto_throttle ( ) const override { return true ; }
protected :
bool _enter ( ) override ;
@ -236,7 +250,6 @@ public:
@@ -236,7 +250,6 @@ public:
protected :
bool _enter ( ) override ;
void _exit ( ) override ;
} ;
@ -258,6 +271,8 @@ public:
@@ -258,6 +271,8 @@ public:
bool does_auto_navigation ( ) const override { return true ; }
bool does_auto_throttle ( ) const override { return true ; }
protected :
bool _enter ( ) override ;
@ -273,10 +288,6 @@ public:
@@ -273,10 +288,6 @@ public:
// methods that affect movement of the vehicle in this mode
void update ( ) override ;
protected :
bool _enter ( ) override ;
} ;
class ModeTraining : public Mode
@ -289,10 +300,6 @@ public:
@@ -289,10 +300,6 @@ public:
// methods that affect movement of the vehicle in this mode
void update ( ) override ;
protected :
bool _enter ( ) override ;
} ;
class ModeInitializing : public Mode
@ -308,9 +315,7 @@ public:
@@ -308,9 +315,7 @@ public:
bool allows_throttle_nudging ( ) const override { return true ; }
protected :
bool _enter ( ) override ;
bool does_auto_throttle ( ) const override { return true ; }
} ;
class ModeFBWA : public Mode
@ -324,10 +329,6 @@ public:
@@ -324,10 +329,6 @@ public:
// methods that affect movement of the vehicle in this mode
void update ( ) override ;
bool _enter ( ) override ;
protected :
} ;
class ModeFBWB : public Mode
@ -343,6 +344,8 @@ public:
@@ -343,6 +344,8 @@ public:
// methods that affect movement of the vehicle in this mode
void update ( ) override ;
bool does_auto_throttle ( ) const override { return true ; }
protected :
bool _enter ( ) override ;
@ -365,6 +368,8 @@ public:
@@ -365,6 +368,8 @@ public:
bool get_target_heading_cd ( int32_t & target_heading ) ;
bool does_auto_throttle ( ) const override { return true ; }
protected :
bool _enter ( ) override ;
@ -390,6 +395,8 @@ public:
@@ -390,6 +395,8 @@ public:
virtual bool is_guided_mode ( ) const override { return true ; }
bool does_auto_throttle ( ) const override { return true ; }
protected :
bool _enter ( ) override ;
@ -433,6 +440,8 @@ public:
@@ -433,6 +440,8 @@ public:
// methods that affect movement of the vehicle in this mode
void update ( ) override ;
bool does_auto_throttle ( ) const override { return true ; }
protected :
bool _enter ( ) override ;
@ -452,6 +461,8 @@ public:
@@ -452,6 +461,8 @@ public:
// methods that affect movement of the vehicle in this mode
void update ( ) override ;
bool does_auto_throttle ( ) const override { return true ; }
protected :
bool _enter ( ) override ;
@ -470,6 +481,8 @@ public:
@@ -470,6 +481,8 @@ public:
// methods that affect movement of the vehicle in this mode
void update ( ) override ;
bool does_auto_throttle ( ) const override { return true ; }
protected :
bool _enter ( ) override ;
@ -488,6 +501,8 @@ public:
@@ -488,6 +501,8 @@ public:
// methods that affect movement of the vehicle in this mode
void update ( ) override ;
bool does_auto_throttle ( ) const override { return true ; }
protected :
bool _enter ( ) override ;
@ -527,6 +542,8 @@ public:
@@ -527,6 +542,8 @@ public:
// methods that affect movement of the vehicle in this mode
void update ( ) override ;
bool does_auto_throttle ( ) const override { return true ; }
protected :
bool _enter ( ) override ;
@ -552,6 +569,8 @@ public:
@@ -552,6 +569,8 @@ public:
bool does_auto_navigation ( ) const override { return true ; }
bool does_auto_throttle ( ) const override { return true ; }
// var_info for holding parameter information
static const struct AP_Param : : GroupInfo var_info [ ] ;
@ -589,6 +608,10 @@ public:
@@ -589,6 +608,10 @@ public:
bool does_auto_navigation ( ) const override { return true ; }
// true if we are in an auto-throttle mode, which means
// we need to run the speed/height controller
bool does_auto_throttle ( ) const override { return true ; }
protected :
bool exit_heading_aligned ( ) const ;