1
0
mirror of https://bitbucket.org/librepilot/librepilot.git synced 2025-02-21 11:54:15 +01:00

LP-551 Switch - break cleanup

This commit is contained in:
Laurent Lalanne 2018-01-15 19:19:19 +01:00
parent 9787bee599
commit 5ecf3f22eb

View File

@ -630,17 +630,14 @@ ConfigOutputWidget::ChannelConfigWarning ConfigOutputWidget::checkChannelConfig(
switch (bankControls->modeCombo()->currentIndex()) { switch (bankControls->modeCombo()->currentIndex()) {
case ActuatorSettings::BANKMODE_DSHOT: case ActuatorSettings::BANKMODE_DSHOT:
if (channelForm->isServoOutput()) { if (channelForm->isServoOutput()) {
// Driving a servo using DShot doest not make sense
warning = CannotDriveServo; warning = CannotDriveServo;
// Driving a servo using DShot doest not make sense so break } else if (channelForm->isReversableMotor()) {
break;
}
if (channelForm->isReversableMotor()) {
// Bi-directional DShot not yet supported // Bi-directional DShot not yet supported
warning = BiDirectionalDShotNotSupported; warning = BiDirectionalDShotNotSupported;
} }
break; break;
case ActuatorSettings::BANKMODE_PWMSYNC: case ActuatorSettings::BANKMODE_PWMSYNC:
break;
case ActuatorSettings::BANKMODE_PWM: case ActuatorSettings::BANKMODE_PWM:
break; break;
case ActuatorSettings::BANKMODE_ONESHOT125: case ActuatorSettings::BANKMODE_ONESHOT125:
@ -649,7 +646,6 @@ ConfigOutputWidget::ChannelConfigWarning ConfigOutputWidget::checkChannelConfig(
if (channelForm->isServoOutput()) { if (channelForm->isServoOutput()) {
warning = CannotDriveServo; warning = CannotDriveServo;
// Driving a servo using this mode does not make sense so break // Driving a servo using this mode does not make sense so break
break;
} }
default: default:
break; break;