Browse Source

Made vehicle config robust against unknown system types

QGC4.4
Lorenz Meier 12 years ago
parent
commit
3490be909c
  1. 3
      src/ui/QGCVehicleConfig.cc

3
src/ui/QGCVehicleConfig.cc

@ -39,6 +39,7 @@ QGCVehicleConfig::QGCVehicleConfig(QWidget *parent) : @@ -39,6 +39,7 @@ QGCVehicleConfig::QGCVehicleConfig(QWidget *parent) :
systemTypeToParamMap["FIXED_WING"] = new QMap<QString,QGCToolWidget*>();
systemTypeToParamMap["QUADROTOR"] = new QMap<QString,QGCToolWidget*>();
systemTypeToParamMap["GROUND_ROVER"] = new QMap<QString,QGCToolWidget*>();
systemTypeToParamMap["BOAT"] = new QMap<QString,QGCToolWidget*>();
libParamToWidgetMap = new QMap<QString,QGCToolWidget*>();
setObjectName("QGC_VEHICLECONFIG");
@ -726,6 +727,8 @@ void QGCVehicleConfig::setActiveUAS(UASInterface* active) @@ -726,6 +727,8 @@ void QGCVehicleConfig::setActiveUAS(UASInterface* active)
{
//Indication that we have no meta data for this system type.
qDebug() << "No parameters defined for system type:" << mav->getSystemTypeName();
systemTypeToParamMap[mav->getSystemTypeName()] = new QMap<QString,QGCToolWidget*>();
paramToWidgetMap = systemTypeToParamMap[mav->getSystemTypeName()];
}
if (!paramTooltips.isEmpty())

Loading…
Cancel
Save