/*===================================================================== QGroundControl Open Source Ground Control Station (c) 2009 - 2015 QGROUNDCONTROL PROJECT This file is part of the QGROUNDCONTROL project QGROUNDCONTROL is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. QGROUNDCONTROL is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with QGROUNDCONTROL. If not, see . ======================================================================*/ /// @file /// @author Pritam Ghanghas #include "ArduPlaneFirmwarePlugin.h" APMPlaneMode::APMPlaneMode(uint32_t mode, bool settable) : APMCustomMode(mode, settable) { QMap enumToString; enumToString.insert(MANUAL, "Manual"); enumToString.insert(CIRCLE, "Circle"); enumToString.insert(STABILIZE, "Stabilize"); enumToString.insert(TRAINING, "Training"); enumToString.insert(ACRO, "Acro"); enumToString.insert(FLY_BY_WIRE_A, "FWB A"); enumToString.insert(FLY_BY_WIRE_B, "FWB B"); enumToString.insert(CRUISE, "Cruise"); enumToString.insert(AUTOTUNE, "Autotune"); enumToString.insert(AUTO, "Auto"); enumToString.insert(RTL, "RTL"); enumToString.insert(LOITER, "Loiter"); enumToString.insert(GUIDED, "Guided"); enumToString.insert(INITIALIZING, "Initializing"); setEnumToStringMapping(enumToString); } ArduPlaneFirmwarePlugin::ArduPlaneFirmwarePlugin(void) { QList supportedFlightModes; supportedFlightModes << APMPlaneMode(APMPlaneMode::MANUAL ,true); supportedFlightModes << APMPlaneMode(APMPlaneMode::CIRCLE ,true); supportedFlightModes << APMPlaneMode(APMPlaneMode::STABILIZE ,true); supportedFlightModes << APMPlaneMode(APMPlaneMode::TRAINING ,true); supportedFlightModes << APMPlaneMode(APMPlaneMode::ACRO ,true); supportedFlightModes << APMPlaneMode(APMPlaneMode::FLY_BY_WIRE_A ,true); supportedFlightModes << APMPlaneMode(APMPlaneMode::FLY_BY_WIRE_B ,true); supportedFlightModes << APMPlaneMode(APMPlaneMode::CRUISE ,true); supportedFlightModes << APMPlaneMode(APMPlaneMode::AUTOTUNE ,true); supportedFlightModes << APMPlaneMode(APMPlaneMode::AUTO ,true); supportedFlightModes << APMPlaneMode(APMPlaneMode::RTL ,true); supportedFlightModes << APMPlaneMode(APMPlaneMode::LOITER ,true); supportedFlightModes << APMPlaneMode(APMPlaneMode::GUIDED ,true); supportedFlightModes << APMPlaneMode(APMPlaneMode::INITIALIZING ,false); setSupportedModes(supportedFlightModes); }