From 51f82dedbe89e3658b814486f4a6dfd5815fdeca Mon Sep 17 00:00:00 2001 From: Laurent Lalanne Date: Sun, 2 Nov 2014 15:38:41 +0100 Subject: [PATCH] OP-1592 Same logic using dataObj --- .../src/plugins/setupwizard/vehicleconfigurationhelper.cpp | 6 +++--- .../src/plugins/setupwizard/vehicleconfigurationhelper.h | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/ground/openpilotgcs/src/plugins/setupwizard/vehicleconfigurationhelper.cpp b/ground/openpilotgcs/src/plugins/setupwizard/vehicleconfigurationhelper.cpp index cb320c810..28e4f0ddb 100644 --- a/ground/openpilotgcs/src/plugins/setupwizard/vehicleconfigurationhelper.cpp +++ b/ground/openpilotgcs/src/plugins/setupwizard/vehicleconfigurationhelper.cpp @@ -98,12 +98,12 @@ bool VehicleConfigurationHelper::setupHardwareSettings(bool save) return result; } -bool VehicleConfigurationHelper::isApplicable(UAVObject *object) +bool VehicleConfigurationHelper::isApplicable(UAVObject *dataObj) { switch (m_configSource->getControllerType()) { case VehicleConfigurationSource::CONTROLLER_CC: case VehicleConfigurationSource::CONTROLLER_CC3D: - if (object->getName() == "EKFConfiguration") { + if (dataObj->getName() == "EKFConfiguration") { return false; } default: @@ -765,7 +765,7 @@ void VehicleConfigurationHelper::applyTemplateSettings() foreach(UAVObject * object, updatedObjects) { UAVDataObject *dataObj = dynamic_cast(object); - if (dataObj != NULL && isApplicable(object)) { + if (dataObj != NULL && isApplicable(dataObj)) { addModifiedObject(dataObj, tr("Writing template settings for %1").arg(object->getName())); } } diff --git a/ground/openpilotgcs/src/plugins/setupwizard/vehicleconfigurationhelper.h b/ground/openpilotgcs/src/plugins/setupwizard/vehicleconfigurationhelper.h index c777b09e6..b94de497f 100644 --- a/ground/openpilotgcs/src/plugins/setupwizard/vehicleconfigurationhelper.h +++ b/ground/openpilotgcs/src/plugins/setupwizard/vehicleconfigurationhelper.h @@ -57,7 +57,7 @@ public: VehicleConfigurationHelper(VehicleConfigurationSource *configSource); bool setupVehicle(bool save = true); bool setupHardwareSettings(bool save = true); - bool isApplicable(UAVObject *object); + bool isApplicable(UAVObject *dataObj); static const qint16 LEGACY_ESC_FREQUENCY = 50; static const qint16 RAPID_ESC_FREQUENCY = 500; static const qint16 ANALOG_SERVO_FREQUENCY = 50;