From 5ecf3f22ebc54a682ec520fb6863108b7a725acf Mon Sep 17 00:00:00 2001 From: Laurent Lalanne Date: Mon, 15 Jan 2018 19:19:19 +0100 Subject: [PATCH] LP-551 Switch - break cleanup --- ground/gcs/src/plugins/config/configoutputwidget.cpp | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/ground/gcs/src/plugins/config/configoutputwidget.cpp b/ground/gcs/src/plugins/config/configoutputwidget.cpp index cb1b10227..d7a44ed5f 100644 --- a/ground/gcs/src/plugins/config/configoutputwidget.cpp +++ b/ground/gcs/src/plugins/config/configoutputwidget.cpp @@ -630,17 +630,14 @@ ConfigOutputWidget::ChannelConfigWarning ConfigOutputWidget::checkChannelConfig( switch (bankControls->modeCombo()->currentIndex()) { case ActuatorSettings::BANKMODE_DSHOT: if (channelForm->isServoOutput()) { + // Driving a servo using DShot doest not make sense warning = CannotDriveServo; - // Driving a servo using DShot doest not make sense so break - break; - } - if (channelForm->isReversableMotor()) { + } else if (channelForm->isReversableMotor()) { // Bi-directional DShot not yet supported warning = BiDirectionalDShotNotSupported; } break; case ActuatorSettings::BANKMODE_PWMSYNC: - break; case ActuatorSettings::BANKMODE_PWM: break; case ActuatorSettings::BANKMODE_ONESHOT125: @@ -649,7 +646,6 @@ ConfigOutputWidget::ChannelConfigWarning ConfigOutputWidget::checkChannelConfig( if (channelForm->isServoOutput()) { warning = CannotDriveServo; // Driving a servo using this mode does not make sense so break - break; } default: break;