Plane: is_landing/is_taking_off not to req scripting

This commit is contained in:
Tom Pittenger 2023-06-26 11:07:33 -07:00 committed by Tom Pittenger
parent ecc517360f
commit 606ef1b269
2 changed files with 3 additions and 4 deletions

View File

@ -863,6 +863,7 @@ bool Plane::set_land_descent_rate(float descent_rate)
#endif #endif
return false; return false;
} }
#endif // AP_SCRIPTING_ENABLED
// returns true if vehicle is landing. // returns true if vehicle is landing.
bool Plane::is_landing() const bool Plane::is_landing() const
@ -886,8 +887,6 @@ bool Plane::is_taking_off() const
return control_mode->is_taking_off(); return control_mode->is_taking_off();
} }
#endif // AP_SCRIPTING_ENABLED
// correct AHRS pitch for TRIM_PITCH_CD in non-VTOL modes, and return VTOL view in VTOL // correct AHRS pitch for TRIM_PITCH_CD in non-VTOL modes, and return VTOL view in VTOL
void Plane::get_osd_roll_pitch_rad(float &roll, float &pitch) const void Plane::get_osd_roll_pitch_rad(float &roll, float &pitch) const
{ {

View File

@ -1237,6 +1237,8 @@ private:
public: public:
void failsafe_check(void); void failsafe_check(void);
bool is_landing() const override;
bool is_taking_off() const override;
#if AP_SCRIPTING_ENABLED #if AP_SCRIPTING_ENABLED
bool set_target_location(const Location& target_loc) override; bool set_target_location(const Location& target_loc) override;
bool get_target_location(Location& target_loc) override; bool get_target_location(Location& target_loc) override;
@ -1245,8 +1247,6 @@ public:
// allow for landing descent rate to be overridden by a script, may be -ve to climb // allow for landing descent rate to be overridden by a script, may be -ve to climb
bool set_land_descent_rate(float descent_rate) override; bool set_land_descent_rate(float descent_rate) override;
bool is_landing() const override;
bool is_taking_off() const override;
#endif // AP_SCRIPTING_ENABLED #endif // AP_SCRIPTING_ENABLED
}; };