1
0
mirror of https://bitbucket.org/librepilot/librepilot.git synced 2025-01-18 03:52:11 +01:00

+review OPReview-496

Performed uncrustify
Corrected statement order
This commit is contained in:
Glenn Campigli 2013-06-04 20:11:23 +10:00
parent 558a47dc7c
commit 940f768af0

View File

@ -1,3 +1,4 @@
/**
/** /**
****************************************************************************** ******************************************************************************
* *
@ -1106,15 +1107,15 @@ void ConfigCcpmWidget::SwashLvlStartButtonPressed()
MaxField = obj->getField(QString("ChannelMax")); MaxField = obj->getField(QString("ChannelMax"));
// channel assignments // channel assignments
oldSwashLvlConfiguration.ServoChannels[0] = m_aircraft->ccpmServoWChannel->currentIndex()-1; oldSwashLvlConfiguration.ServoChannels[0] = m_aircraft->ccpmServoWChannel->currentIndex() - 1;
oldSwashLvlConfiguration.ServoChannels[1] = m_aircraft->ccpmServoXChannel->currentIndex()-1; oldSwashLvlConfiguration.ServoChannels[1] = m_aircraft->ccpmServoXChannel->currentIndex() - 1;
oldSwashLvlConfiguration.ServoChannels[2] = m_aircraft->ccpmServoYChannel->currentIndex()-1; oldSwashLvlConfiguration.ServoChannels[2] = m_aircraft->ccpmServoYChannel->currentIndex() - 1;
oldSwashLvlConfiguration.ServoChannels[3] = m_aircraft->ccpmServoZChannel->currentIndex()-1; oldSwashLvlConfiguration.ServoChannels[3] = m_aircraft->ccpmServoZChannel->currentIndex() - 1;
// if servos are used // if servos are used
oldSwashLvlConfiguration.Used[0] = ((m_aircraft->ccpmServoWChannel->currentIndex()-1 > 0) && (m_aircraft->ccpmServoWChannel->isEnabled())); oldSwashLvlConfiguration.Used[0] = ((m_aircraft->ccpmServoWChannel->isEnabled()) && (m_aircraft->ccpmServoWChannel->currentIndex() - 1 > 0));
oldSwashLvlConfiguration.Used[1] = ((m_aircraft->ccpmServoXChannel->currentIndex()-1 > 0) && (m_aircraft->ccpmServoXChannel->isEnabled())); oldSwashLvlConfiguration.Used[1] = ((m_aircraft->ccpmServoXChannel->isEnabled()) && (m_aircraft->ccpmServoXChannel->currentIndex() - 1 > 0));
oldSwashLvlConfiguration.Used[2] = ((m_aircraft->ccpmServoYChannel->currentIndex()-1 > 0) && (m_aircraft->ccpmServoYChannel->isEnabled())); oldSwashLvlConfiguration.Used[2] = ((m_aircraft->ccpmServoYChannel->isEnabled()) && (m_aircraft->ccpmServoYChannel->currentIndex() - 1 > 0));
oldSwashLvlConfiguration.Used[3] = ((m_aircraft->ccpmServoZChannel->currentIndex()-1 > 0) && (m_aircraft->ccpmServoZChannel->isEnabled())); oldSwashLvlConfiguration.Used[3] = ((m_aircraft->ccpmServoZChannel->isEnabled()) && (m_aircraft->ccpmServoZChannel->currentIndex() - 1 > 0));
// min,neutral,max values for the servos // min,neutral,max values for the servos
for (i = 0; i < CCPM_MAX_SWASH_SERVOS; i++) { for (i = 0; i < CCPM_MAX_SWASH_SERVOS; i++) {
oldSwashLvlConfiguration.Min[i] = MinField->getValue(oldSwashLvlConfiguration.ServoChannels[i]).toInt(); oldSwashLvlConfiguration.Min[i] = MinField->getValue(oldSwashLvlConfiguration.ServoChannels[i]).toInt();