1
0
mirror of https://bitbucket.org/librepilot/librepilot.git synced 2025-01-17 02:52:12 +01:00

OP-629 Block arming on all navigation based modes

Conflicts:
	flight/modules/ManualControl/manualcontrol.c
This commit is contained in:
Alessio Morale 2013-05-03 01:44:41 +02:00
parent 976999eba0
commit 1c3fb70ab1

View File

@ -916,7 +916,18 @@ static bool okToArm(void)
}
}
return true;
uint8_t flightMode;
FlightStatusFlightModeGet(&flightMode);
switch(flightMode) {
case FLIGHTSTATUS_FLIGHTMODE_MANUAL:
case FLIGHTSTATUS_FLIGHTMODE_STABILIZED1:
case FLIGHTSTATUS_FLIGHTMODE_STABILIZED2:
case FLIGHTSTATUS_FLIGHTMODE_STABILIZED3:
return true;
default:
return false;
}
}
/**
* @brief Determine if the aircraft is forced to disarm by an explicit alarm