Skip to content

Instantly share code, notes, and snippets.

@imeredith
Created August 28, 2011 05:33
Show Gist options
  • Save imeredith/1176284 to your computer and use it in GitHub Desktop.
Save imeredith/1176284 to your computer and use it in GitHub Desktop.
diff --git a/flight/Modules/ManualControl/manualcontrol.c b/flight/Modules/ManualControl/manualcontrol.c
index ba47fd6..ef000a2 100644
--- a/flight/Modules/ManualControl/manualcontrol.c
+++ b/flight/Modules/ManualControl/manualcontrol.c
@@ -218,6 +218,10 @@ static void manualControlTask(void *parameters)
cmd.Roll = 0;
cmd.Yaw = 0;
cmd.Pitch = 0;
+
+ // This will follow the low throttle path to disarming. Needed for recievers that disc
+ processArm(&cmd, &settings);
+
//cmd.FlightMode = MANUALCONTROLCOMMAND_FLIGHTMODE_AUTO; // don't do until AUTO implem
// Important: Throttle < 0 will reset Stabilization coefficients among other things. E
// or leave throttle at IDLE speed or above when going into AUTO-failsafe.
@@ -447,12 +451,8 @@ static void processArm(ManualControlCommandData * cmd, ManualControlSettingsData
// In this configuration we always disarm
setArmedIfChanged(FLIGHTSTATUS_ARMED_DISARMED);
} else {
- // Not really needed since this function not called when disconnected
- if (cmd->Connected == MANUALCONTROLCOMMAND_CONNECTED_FALSE)
- return;
-
// The throttle is not low, in case we where arming or disarming, abort
- if (!lowThrottle) {
+ if (!lowThrottle) {
switch(armState) {
case ARM_STATE_DISARMING_MANUAL:
case ARM_STATE_DISARMING_TIMEOUT:
17:32 ~/OpenPilot/OpenPilot (OP-599_reciever_disconnect_doesnt_disar
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment