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:
parent
063db57322
commit
d0417dda84
@ -214,6 +214,15 @@ void armHandler(bool newinit)
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case ARM_STATE_DISARMING_TIMEOUT:
|
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
|
// 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)) {
|
if ((settings.ArmedTimeout != 0) && (timeDifferenceMs(armedDisarmStart, sysTime) > settings.ArmedTimeout)) {
|
||||||
armState = ARM_STATE_DISARMED;
|
armState = ARM_STATE_DISARMED;
|
||||||
|
Loading…
Reference in New Issue
Block a user