Unverified Commit a2fca7b2 authored by Don Gagne's avatar Don Gagne Committed by GitHub

Merge pull request #7515 from DonLakeFlyer/Fixes

Crash and typo fixes
parents 083dcf0a c7d0eb75
...@@ -223,11 +223,15 @@ QVariantList MissionCommandTree::getCommandsForCategory(Vehicle* vehicle, const ...@@ -223,11 +223,15 @@ QVariantList MissionCommandTree::getCommandsForCategory(Vehicle* vehicle, const
{ {
MAV_AUTOPILOT baseFirmwareType; MAV_AUTOPILOT baseFirmwareType;
MAV_TYPE baseVehicleType; MAV_TYPE baseVehicleType;
QList<MAV_CMD> supportedCommands = vehicle->firmwarePlugin()->supportedMissionCommands();
_baseVehicleInfo(vehicle, baseFirmwareType, baseVehicleType); _baseVehicleInfo(vehicle, baseFirmwareType, baseVehicleType);
_buildAllCommands(vehicle); _buildAllCommands(vehicle);
// vehicle can be null in which case _baseVehicleInfo will tell of the firmware/vehicle type for the offline editing vehicle.
// We then use that to get a firmware plugin so we can get the list of supported commands.
FirmwarePlugin* firmwarePlugin = qgcApp()->toolbox()->firmwarePluginManager()->firmwarePluginForAutopilot(baseFirmwareType, baseVehicleType);
QList<MAV_CMD> supportedCommands = firmwarePlugin->supportedMissionCommands();
QVariantList list; QVariantList list;
QMap<MAV_CMD, MissionCommandUIInfo*> commandMap = _allCommands[baseFirmwareType][baseVehicleType]; QMap<MAV_CMD, MissionCommandUIInfo*> commandMap = _allCommands[baseFirmwareType][baseVehicleType];
for (MAV_CMD command: commandMap.keys()) { for (MAV_CMD command: commandMap.keys()) {
......
...@@ -232,7 +232,7 @@ QGCViewDialog { ...@@ -232,7 +232,7 @@ QGCViewDialog {
QGCLabel { QGCLabel {
visible: fact.qgcRebootRequired visible: fact.qgcRebootRequired
text: "Appliction restart required after change" text: "Application restart required after change"
} }
QGCLabel { QGCLabel {
......
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