diff --git a/ArduCopter/mode.h b/ArduCopter/mode.h index e0f1f7c018..aa906edefb 100644 --- a/ArduCopter/mode.h +++ b/ArduCopter/mode.h @@ -1052,7 +1052,7 @@ public: // this should probably not be exposed bool state_complete() { return _state_complete; } - bool is_landing() const override; + virtual bool is_landing() const override; void restart_without_terrain(); @@ -1133,6 +1133,8 @@ public: void save_position(); void exit(); + bool is_landing() const override; + protected: const char *name() const override { return "SMARTRTL"; } diff --git a/ArduCopter/mode_smart_rtl.cpp b/ArduCopter/mode_smart_rtl.cpp index dde31446e3..73d13a1cdd 100644 --- a/ArduCopter/mode_smart_rtl.cpp +++ b/ArduCopter/mode_smart_rtl.cpp @@ -59,6 +59,11 @@ void ModeSmartRTL::run() } } +bool ModeSmartRTL::is_landing() const +{ + return smart_rtl_state == SmartRTL_Land; +} + void ModeSmartRTL::wait_cleanup_run() { // hover at current target position