1
0
mirror of https://bitbucket.org/librepilot/librepilot.git synced 2024-12-01 09:24:10 +01:00

OP-1573 fix armhandler to not timeout-disarm when flying autonomously

This commit is contained in:
Corvus Corax 2014-10-29 21:10:41 +01:00
parent 063db57322
commit d0417dda84

View File

@ -214,6 +214,15 @@ void armHandler(bool newinit)
break;
case ARM_STATE_DISARMING_TIMEOUT:
{
// we should never reach the disarming timeout if the pathfollower is engaged - reset timeout
FlightStatusControlChainData cc;
FlightStatusControlChainGet(&cc);
if (cc.PathFollower == FLIGHTSTATUS_CONTROLCHAIN_TRUE) {
armedDisarmStart = sysTime;
}
}
// We get here when armed while throttle low, even when the arming timeout is not enabled
if ((settings.ArmedTimeout != 0) && (timeDifferenceMs(armedDisarmStart, sysTime) > settings.ArmedTimeout)) {
armState = ARM_STATE_DISARMED;