From 3490be909c96d806ad2bbf4be41ee7beaa42af18 Mon Sep 17 00:00:00 2001 From: Lorenz Meier Date: Sat, 25 May 2013 18:28:43 +0200 Subject: [PATCH] Made vehicle config robust against unknown system types --- src/ui/QGCVehicleConfig.cc | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/ui/QGCVehicleConfig.cc b/src/ui/QGCVehicleConfig.cc index 3bf813070..348dab33f 100644 --- a/src/ui/QGCVehicleConfig.cc +++ b/src/ui/QGCVehicleConfig.cc @@ -39,6 +39,7 @@ QGCVehicleConfig::QGCVehicleConfig(QWidget *parent) : systemTypeToParamMap["FIXED_WING"] = new QMap(); systemTypeToParamMap["QUADROTOR"] = new QMap(); systemTypeToParamMap["GROUND_ROVER"] = new QMap(); + systemTypeToParamMap["BOAT"] = new QMap(); libParamToWidgetMap = new QMap(); setObjectName("QGC_VEHICLECONFIG"); @@ -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(); + paramToWidgetMap = systemTypeToParamMap[mav->getSystemTypeName()]; } if (!paramTooltips.isEmpty()) -- 2.22.0