1
0
mirror of https://bitbucket.org/librepilot/librepilot.git synced 2025-02-18 08:54:15 +01:00

Flight/ManualControl: Making failsafe test (which must explicitly look at receiver inputs instead of throttle values in case of reversal) also consider readonly flag to detect GCS control.

git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@1545 ebee16cc-31ac-478f-84a7-5cbb03baadba
This commit is contained in:
peabody124 2010-09-06 02:58:41 +00:00 committed by peabody124
parent 61854ac6ab
commit e260077247

View File

@ -190,7 +190,8 @@ static void manualControlTask(void* parameters)
// Implement hysteresis loop on connection status
// Must check both Max and Min in case they reversed
if (cmd.Channel[settings.Throttle] < settings.ChannelMax[settings.Throttle] &&
if (!ManualControlCommandReadOnly(&cmd) &&
cmd.Channel[settings.Throttle] < settings.ChannelMax[settings.Throttle] &&
cmd.Channel[settings.Throttle] < settings.ChannelMin[settings.Throttle])
{
if (disconnected_count++ > 10)