Commit 009daae1 authored by Tomaz Canabrava's avatar Tomaz Canabrava Committed by Daniel Agar

Map to bracket initializer

parent f664e6dd
...@@ -22,28 +22,27 @@ FirmwarePlugin::remapParamNameMajorVersionMap_t ArduCopterFirmwarePlugin::_remap ...@@ -22,28 +22,27 @@ FirmwarePlugin::remapParamNameMajorVersionMap_t ArduCopterFirmwarePlugin::_remap
APMCopterMode::APMCopterMode(uint32_t mode, bool settable) : APMCopterMode::APMCopterMode(uint32_t mode, bool settable) :
APMCustomMode(mode, settable) APMCustomMode(mode, settable)
{ {
QMap<uint32_t,QString> enumToString; setEnumToStringMapping({
enumToString.insert(STABILIZE, "Stabilize"); {STABILIZE, "Stabilize"},
enumToString.insert(ACRO, "Acro"); {ACRO, "Acro"},
enumToString.insert(ALT_HOLD, "Altitude Hold"); {ALT_HOLD, "Altitude Hold"},
enumToString.insert(AUTO, "Auto"); {AUTO, "Auto"},
enumToString.insert(GUIDED, "Guided"); {GUIDED, "Guided"},
enumToString.insert(LOITER, "Loiter"); {LOITER, "Loiter"},
enumToString.insert(RTL, "RTL"); {RTL, "RTL"},
enumToString.insert(CIRCLE, "Circle"); {CIRCLE, "Circle"},
enumToString.insert(LAND, "Land"); {LAND, "Land"},
enumToString.insert(DRIFT, "Drift"); {DRIFT, "Drift"},
enumToString.insert(SPORT, "Sport"); {SPORT, "Sport"},
enumToString.insert(FLIP, "Flip"); {FLIP, "Flip"},
enumToString.insert(AUTOTUNE, "Autotune"); {AUTOTUNE, "Autotune"},
enumToString.insert(POS_HOLD, "Position Hold"); {POS_HOLD, "Position Hold"},
enumToString.insert(BRAKE, "Brake"); {BRAKE, "Brake"},
enumToString.insert(THROW, "Throw"); {THROW, "Throw"},
enumToString.insert(AVOID_ADSB, "Avoid ADSB"); {AVOID_ADSB, "Avoid ADSB"},
enumToString.insert(GUIDED_NOGPS, "Guided No GPS"); {GUIDED_NOGPS, "Guided No GPS"},
enumToString.insert(SAFE_RTL, "Smart RTL"); {SAFE_RTL, "Smart RTL"},
});
setEnumToStringMapping(enumToString);
} }
ArduCopterFirmwarePlugin::ArduCopterFirmwarePlugin(void) ArduCopterFirmwarePlugin::ArduCopterFirmwarePlugin(void)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment