mirror of https://github.com/ArduPilot/ardupilot
Copter: implement is_landing and is_taking_off for use by lua
This commit is contained in:
parent
7ebc2256bc
commit
fdac668782
|
@ -443,6 +443,18 @@ bool Copter::has_ekf_failsafed() const
|
|||
return failsafe.ekf;
|
||||
}
|
||||
|
||||
// returns true if vehicle is landing. Only used by Lua scripts
|
||||
bool Copter::is_landing() const
|
||||
{
|
||||
return flightmode->is_landing();
|
||||
}
|
||||
|
||||
// returns true if vehicle is taking off. Only used by Lua scripts
|
||||
bool Copter::is_taking_off() const
|
||||
{
|
||||
return flightmode->is_taking_off();
|
||||
}
|
||||
|
||||
#endif // AP_SCRIPTING_ENABLED
|
||||
|
||||
bool Copter::current_mode_requires_mission() const
|
||||
|
|
|
@ -679,6 +679,8 @@ private:
|
|||
// lua scripts use this to retrieve EKF failsafe state
|
||||
// returns true if the EKF failsafe has triggered
|
||||
bool has_ekf_failsafed() const override;
|
||||
bool is_landing() const override;
|
||||
bool is_taking_off() const override;
|
||||
#endif // AP_SCRIPTING_ENABLED
|
||||
void rc_loop();
|
||||
void throttle_loop();
|
||||
|
|
Loading…
Reference in New Issue