From d2a235805ed59c47da4c25f20ab17102485e0f38 Mon Sep 17 00:00:00 2001 From: acxz <17132214+acxz@users.noreply.github.com> Date: Sat, 22 May 2021 15:21:31 -0400 Subject: [PATCH] fix for range-loop-construct --- src/AutoPilotPlugins/PX4/PX4AdvancedFlightModesController.cc | 4 ++-- src/AutoPilotPlugins/PX4/PX4RadioComponent.cc | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/AutoPilotPlugins/PX4/PX4AdvancedFlightModesController.cc b/src/AutoPilotPlugins/PX4/PX4AdvancedFlightModesController.cc index b26bcf1c275..20c461c99e4 100644 --- a/src/AutoPilotPlugins/PX4/PX4AdvancedFlightModesController.cc +++ b/src/AutoPilotPlugins/PX4/PX4AdvancedFlightModesController.cc @@ -101,7 +101,7 @@ void PX4AdvancedFlightModesController::_init(void) // Setup the channel combobox model QVector usedChannels; - for (const QString &attitudeParam : {"RC_MAP_THROTTLE", "RC_MAP_YAW", "RC_MAP_PITCH", "RC_MAP_ROLL", "RC_MAP_FLAPS", "RC_MAP_AUX1", "RC_MAP_AUX2"}) { + for (const char* const&attitudeParam : {"RC_MAP_THROTTLE", "RC_MAP_YAW", "RC_MAP_PITCH", "RC_MAP_ROLL", "RC_MAP_FLAPS", "RC_MAP_AUX1", "RC_MAP_AUX2"}) { int channel = getParameterFact(-1, attitudeParam)->rawValue().toInt(); if (channel != 0) { usedChannels << channel; @@ -170,7 +170,7 @@ void PX4AdvancedFlightModesController::_validateConfiguration(void) } // Validate thresholds within range - for(const QString &thresholdParam : {"RC_ASSIST_TH", "RC_AUTO_TH", "RC_ACRO_TH", "RC_POSCTL_TH", "RC_LOITER_TH", "RC_RETURN_TH", "RC_OFFB_TH"}) { + for(const char* const&thresholdParam : {"RC_ASSIST_TH", "RC_AUTO_TH", "RC_ACRO_TH", "RC_POSCTL_TH", "RC_LOITER_TH", "RC_RETURN_TH", "RC_OFFB_TH"}) { float threshold = getParameterFact(-1, thresholdParam)->rawValue().toFloat(); if (threshold < 0.0f || threshold > 1.0f) { _validConfiguration = false; diff --git a/src/AutoPilotPlugins/PX4/PX4RadioComponent.cc b/src/AutoPilotPlugins/PX4/PX4RadioComponent.cc index 69f5059911b..ae7d92335c9 100644 --- a/src/AutoPilotPlugins/PX4/PX4RadioComponent.cc +++ b/src/AutoPilotPlugins/PX4/PX4RadioComponent.cc @@ -43,7 +43,7 @@ bool PX4RadioComponent::setupComplete(void) const if (_vehicle->parameterManager()->getParameter(-1, "COM_RC_IN_MODE")->rawValue().toInt() != 1) { // The best we can do to detect the need for a radio calibration is look for attitude // controls to be mapped. - for(const QString &mapParam : {"RC_MAP_ROLL", "RC_MAP_PITCH", "RC_MAP_YAW", "RC_MAP_THROTTLE"}) { + for(const char* const&mapParam : {"RC_MAP_ROLL", "RC_MAP_PITCH", "RC_MAP_YAW", "RC_MAP_THROTTLE"}) { if (_vehicle->parameterManager()->getParameter(FactSystem::defaultComponentId, mapParam)->rawValue().toInt() == 0) { return false; }