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

LP-401 Scan only active flightmodes

This commit is contained in:
Laurent Lalanne 2016-10-21 13:14:20 +02:00
parent 27d6b04b58
commit 762b1c1ef1

View File

@ -578,9 +578,11 @@ static bool AutoTuneFoundInFMS()
{
bool found = false;
FlightModeSettingsFlightModePositionOptions fms[FLIGHTMODESETTINGS_FLIGHTMODEPOSITION_NUMELEM];
uint8_t num_flightMode;
FlightModeSettingsFlightModePositionGet(fms);
for (uint8_t i = 0; i < FLIGHTMODESETTINGS_FLIGHTMODEPOSITION_NUMELEM; ++i) {
ManualControlSettingsFlightModeNumberGet(&num_flightMode);
for (uint8_t i = 0; i < num_flightMode; ++i) {
if (fms[i] == FLIGHTMODESETTINGS_FLIGHTMODEPOSITION_AUTOTUNE) {
found = true;
break;