mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-01-09 09:28:31 -04:00
Plane: never stick mix without valid RC input
This commit is contained in:
parent
bb3bedb90d
commit
a7bc844780
@ -61,6 +61,10 @@ float Plane::calc_speed_scaler(void)
|
|||||||
*/
|
*/
|
||||||
bool Plane::stick_mixing_enabled(void)
|
bool Plane::stick_mixing_enabled(void)
|
||||||
{
|
{
|
||||||
|
if (!rc().has_valid_input()) {
|
||||||
|
// never stick mix without valid RC
|
||||||
|
return false;
|
||||||
|
}
|
||||||
#if AC_FENCE == ENABLED
|
#if AC_FENCE == ENABLED
|
||||||
const bool stickmixing = fence_stickmixing();
|
const bool stickmixing = fence_stickmixing();
|
||||||
#else
|
#else
|
||||||
@ -81,9 +85,7 @@ bool Plane::stick_mixing_enabled(void)
|
|||||||
// we're in an auto mode. Check the stick mixing flag
|
// we're in an auto mode. Check the stick mixing flag
|
||||||
if (g.stick_mixing != StickMixing::NONE &&
|
if (g.stick_mixing != StickMixing::NONE &&
|
||||||
g.stick_mixing != StickMixing::VTOL_YAW &&
|
g.stick_mixing != StickMixing::VTOL_YAW &&
|
||||||
stickmixing &&
|
stickmixing) {
|
||||||
!rc_failsafe_active()) {
|
|
||||||
// we're in an auto mode, and haven't triggered rc failsafe
|
|
||||||
return true;
|
return true;
|
||||||
} else {
|
} else {
|
||||||
return false;
|
return false;
|
||||||
|
Loading…
Reference in New Issue
Block a user