Commit bce8f983 authored by dogmaphobic's avatar dogmaphobic

Merge remote-tracking branch 'MavLink/master' into moreLinkSettings

* MavLink/master:
  Friendly edit for APM supported mission item
parents 8cb7fcd6 41a81a78
......@@ -394,8 +394,15 @@ QList<MAV_CMD> APMFirmwarePlugin::supportedMissionCommands(void)
{
QList<MAV_CMD> list;
// FIXME: Temp list, just dup of PX4
list << MAV_CMD_NAV_WAYPOINT << MAV_CMD_NAV_LOITER_UNLIM << MAV_CMD_NAV_LOITER_TURNS << MAV_CMD_NAV_LOITER_TIME
<< MAV_CMD_NAV_RETURN_TO_LAUNCH << MAV_CMD_NAV_LAND << MAV_CMD_NAV_TAKEOFF << MAV_CMD_CONDITION_DELAY << MAV_CMD_DO_JUMP;
list << MAV_CMD_NAV_WAYPOINT
<< MAV_CMD_NAV_LOITER_UNLIM << MAV_CMD_NAV_LOITER_TURNS << MAV_CMD_NAV_LOITER_TIME
<< MAV_CMD_NAV_RETURN_TO_LAUNCH << MAV_CMD_NAV_LAND << MAV_CMD_NAV_TAKEOFF
<< MAV_CMD_NAV_GUIDED_ENABLE
<< MAV_CMD_DO_SET_ROI << MAV_CMD_DO_GUIDED_LIMITS << MAV_CMD_DO_JUMP << MAV_CMD_DO_CHANGE_SPEED << MAV_CMD_DO_SET_CAM_TRIGG_DIST
<< MAV_CMD_DO_SET_RELAY << MAV_CMD_DO_REPEAT_RELAY
<< MAV_CMD_DO_SET_SERVO << MAV_CMD_DO_REPEAT_SERVO
<< MAV_CMD_DO_DIGICAM_CONFIGURE << MAV_CMD_DO_DIGICAM_CONTROL
<< MAV_CMD_DO_MOUNT_CONTROL
<< MAV_CMD_CONDITION_DELAY << MAV_CMD_CONDITION_CHANGE_ALT << MAV_CMD_CONDITION_DISTANCE << MAV_CMD_CONDITION_YAW;
return list;
}
......@@ -214,8 +214,14 @@ QList<MAV_CMD> PX4FirmwarePlugin::supportedMissionCommands(void)
list << MAV_CMD_NAV_WAYPOINT
<< MAV_CMD_NAV_LOITER_UNLIM << MAV_CMD_NAV_LOITER_TURNS << MAV_CMD_NAV_LOITER_TIME
<< MAV_CMD_NAV_RETURN_TO_LAUNCH << MAV_CMD_NAV_LAND << MAV_CMD_NAV_TAKEOFF
<< MAV_CMD_NAV_ROI
<< MAV_CMD_NAV_LAND << MAV_CMD_NAV_TAKEOFF
<< MAV_CMD_DO_JUMP << MAV_CMD_DO_SET_SERVO;
<< MAV_CMD_NAV_GUIDED_ENABLE
<< MAV_CMD_DO_SET_ROI << MAV_CMD_DO_GUIDED_LIMITS << MAV_CMD_DO_JUMP << MAV_CMD_DO_CHANGE_SPEED << MAV_CMD_DO_SET_CAM_TRIGG_DIST
<< MAV_CMD_DO_SET_RELAY << MAV_CMD_DO_REPEAT_RELAY
<< MAV_CMD_DO_SET_SERVO << MAV_CMD_DO_REPEAT_SERVO
<< MAV_CMD_DO_DIGICAM_CONFIGURE << MAV_CMD_DO_DIGICAM_CONTROL
<< MAV_CMD_DO_MOUNT_CONTROL
<< MAV_CMD_CONDITION_DELAY << MAV_CMD_CONDITION_CHANGE_ALT << MAV_CMD_CONDITION_DISTANCE << MAV_CMD_CONDITION_YAW;
return list;
}
This diff is collapsed.
This diff is collapsed.
......@@ -215,21 +215,23 @@ private:
private:
typedef struct {
int param;
QString label;
QString units;
double defaultValue;
int decimalPlaces;
double defaultValue;
int decimalPlaces;
QStringList enumStrings;
QVariantList enumValues;
QString label;
int param;
QString units;
} ParamInfo_t;
typedef struct {
MAV_CMD command;
QString rawName;
QString friendlyName;
QString description;
bool specifiesCoordinate;
bool friendlyEdit;
QString friendlyName;
QMap<int, ParamInfo_t> paramInfoMap;
QString rawName;
bool specifiesCoordinate;
} MavCmdInfo_t;
bool _rawEdit;
......@@ -266,6 +268,9 @@ private:
FactMetaData _param2MetaData;
FactMetaData _param3MetaData;
FactMetaData _param4MetaData;
FactMetaData _param5MetaData;
FactMetaData _param6MetaData;
FactMetaData _param7MetaData;
/// This is used to reference any subsequent mission items which do not specify a coordinate.
QmlObjectListModel _childItems;
......@@ -279,6 +284,8 @@ private:
static const QString _decimalPlacesJsonKey;
static const QString _defaultJsonKey;
static const QString _descriptionJsonKey;
static const QString _enumStringsJsonKey;
static const QString _enumValuesJsonKey;
static const QString _friendlyNameJsonKey;
static const QString _friendlyEditJsonKey;
static const QString _idJsonKey;
......@@ -295,6 +302,7 @@ private:
static const QString _versionJsonKey;
static const QString _degreesUnits;
static const QString _degreesConvertUnits;
};
QDebug operator<<(QDebug dbg, const MissionItem& missionItem);
......
......@@ -133,11 +133,25 @@ Rectangle {
Repeater {
model: missionItem.comboboxFacts
FactComboBox {
width: valuesColumn.width
indexModel: false
model: object.enumStrings
fact: object
Item {
width: valuesColumn.width
height: comboBoxFact.height
QGCLabel {
id: comboBoxLabel
anchors.baseline: comboBoxFact.baseline
text: object.name
visible: object.name != ""
}
FactComboBox {
id: comboBoxFact
anchors.right: parent.right
width: comboBoxLabel.visible ? _editFieldWidth : parent.width
indexModel: false
model: object.enumStrings
fact: object
}
}
}
......
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