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

OP-559: Process the arm status when disconnect and allow it to timeout and

disarm
This commit is contained in:
James Cotton 2011-09-03 23:57:51 -05:00
parent 697dbf4f5f
commit d3de8ff0ef

View File

@ -278,7 +278,6 @@ static void manualControlTask(void *parameters)
// Important: Throttle < 0 will reset Stabilization coefficients among other things. Either change this,
// or leave throttle at IDLE speed or above when going into AUTO-failsafe.
AlarmsSet(SYSTEMALARMS_ALARM_MANUALCONTROL, SYSTEMALARMS_ALARM_WARNING);
ManualControlCommandSet(&cmd);
} else {
AlarmsClear(SYSTEMALARMS_ALARM_MANUALCONTROL);
@ -314,13 +313,15 @@ static void manualControlTask(void *parameters)
processFlightMode(&settings, flightMode);
}
// Process arming outside conditional so system will disarm when disconnected
processArm(&cmd, &settings);
// Update cmd object
ManualControlCommandSet(&cmd);
}
} else {
ManualControlCommandGet(&cmd); /* Under GCS control */
}
@ -645,7 +646,7 @@ static void processArm(ManualControlCommandData * cmd, ManualControlSettingsData
} else {
// Not really needed since this function not called when disconnected
if (cmd->Connected == MANUALCONTROLCOMMAND_CONNECTED_FALSE)
return;
lowThrottle = true;
// The throttle is not low, in case we where arming or disarming, abort
if (!lowThrottle) {