Plane: disable TECS use during NAV_SCRIPT_TIME

This commit is contained in:
Hwurzburg 2022-01-30 19:26:51 -06:00 committed by Andrew Tridgell
parent 4309fc817e
commit 0efb2f2048
2 changed files with 18 additions and 2 deletions

View File

@ -173,9 +173,9 @@ public:
bool allows_throttle_nudging() const override { return true; }
bool does_auto_navigation() const override { return true; }
bool does_auto_navigation() const override;
bool does_auto_throttle() const override { return true; }
bool does_auto_throttle() const override;
protected:

View File

@ -112,3 +112,19 @@ void ModeAuto::navigate()
}
}
bool ModeAuto::does_auto_navigation() const
{
#if AP_SCRIPTING_ENABLED
return (!plane.nav_scripting_active());
#endif
return true;
}
bool ModeAuto::does_auto_throttle() const
{
#if AP_SCRIPTING_ENABLED
return (!plane.nav_scripting_active());
#endif
return true;
}