mirror of
https://bitbucket.org/librepilot/librepilot.git
synced 2025-01-19 04:52:12 +01:00
Uncrustify
This commit is contained in:
parent
423191eae1
commit
ae0e79172f
@ -636,7 +636,7 @@ void ConfigInputWidget::wizardSetUpStep(enum wizardSteps step)
|
||||
case wizardChooseMode:
|
||||
{
|
||||
wizardUi->wzBack->setEnabled(true);
|
||||
QRadioButton* modeButtons[] = {
|
||||
QRadioButton *modeButtons[] = {
|
||||
wizardUi->mode1Button,
|
||||
wizardUi->mode2Button,
|
||||
wizardUi->mode3Button,
|
||||
@ -755,20 +755,20 @@ void ConfigInputWidget::wizardTearDownStep(enum wizardSteps step)
|
||||
}
|
||||
break;
|
||||
case wizardChooseMode:
|
||||
{
|
||||
QRadioButton* modeButtons[] = {
|
||||
wizardUi->mode1Button,
|
||||
wizardUi->mode2Button,
|
||||
wizardUi->mode3Button,
|
||||
wizardUi->mode4Button
|
||||
};
|
||||
for (int i = mode1; i <= mode4; ++i) {
|
||||
if (modeButtons[i]->isChecked()) {
|
||||
transmitterMode = static_cast<txMode>(i);
|
||||
}
|
||||
{
|
||||
QRadioButton *modeButtons[] = {
|
||||
wizardUi->mode1Button,
|
||||
wizardUi->mode2Button,
|
||||
wizardUi->mode3Button,
|
||||
wizardUi->mode4Button
|
||||
};
|
||||
for (int i = mode1; i <= mode4; ++i) {
|
||||
if (modeButtons[i]->isChecked()) {
|
||||
transmitterMode = static_cast<txMode>(i);
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
break;
|
||||
case wizardIdentifySticks:
|
||||
disconnect(receiverActivityObj, SIGNAL(objectUpdated(UAVObject *)), this, SLOT(identifyControls()));
|
||||
wizardUi->wzNext->setEnabled(true);
|
||||
@ -861,7 +861,7 @@ void ConfigInputWidget::setChannel(int newChan)
|
||||
wizardUi->identifyStickInstructions->setText(QString(tr("Please disable throttle hold mode.\n\nMove the Throttle stick.")));
|
||||
} else {
|
||||
wizardUi->identifyStickInstructions->setText(QString(tr("Please move each control one at a time according to the instructions and picture below.\n\n"
|
||||
"Move the %1 stick.")).arg(manualSettingsObj->getField("ChannelGroups")->getElementNames().at(newChan)));
|
||||
"Move the %1 stick.")).arg(manualSettingsObj->getField("ChannelGroups")->getElementNames().at(newChan)));
|
||||
}
|
||||
|
||||
if (manualSettingsObj->getField("ChannelGroups")->getElementNames().at(newChan).contains("Accessory")) {
|
||||
|
@ -46,9 +46,9 @@ bool EscPage::validatePage()
|
||||
{
|
||||
if (ui->oneshotESCButton->isChecked()) {
|
||||
getWizard()->setEscType(SetupWizard::ESC_ONESHOT);
|
||||
}else if (ui->rapidESCButton->isChecked()) {
|
||||
} else if (ui->rapidESCButton->isChecked()) {
|
||||
getWizard()->setEscType(SetupWizard::ESC_RAPID);
|
||||
} else if (ui->defaultESCButton->isChecked()){
|
||||
} else if (ui->defaultESCButton->isChecked()) {
|
||||
getWizard()->setEscType(SetupWizard::ESC_STANDARD);
|
||||
}
|
||||
|
||||
@ -59,7 +59,8 @@ bool EscPage::validatePage()
|
||||
void EscPage::initializePage()
|
||||
{
|
||||
bool enabled = true;
|
||||
switch(getWizard()->getControllerType()) {
|
||||
|
||||
switch (getWizard()->getControllerType()) {
|
||||
case SetupWizard::CONTROLLER_CC:
|
||||
case SetupWizard::CONTROLLER_CC3D:
|
||||
switch (getWizard()->getVehicleType()) {
|
||||
|
@ -45,7 +45,6 @@ public:
|
||||
|
||||
private:
|
||||
Ui::EscPage *ui;
|
||||
|
||||
};
|
||||
|
||||
#endif // ESCPAGE_H
|
||||
|
@ -373,13 +373,13 @@ void VehicleConfigurationHelper::applyActuatorConfiguration()
|
||||
switch (m_configSource->getEscType()) {
|
||||
case VehicleConfigurationSource::ESC_STANDARD:
|
||||
escFrequence = LEGACY_ESC_FREQUENCY;
|
||||
bankMode = ActuatorSettings::BANKMODE_PWM;
|
||||
bankMode = ActuatorSettings::BANKMODE_PWM;
|
||||
break;
|
||||
case VehicleConfigurationSource::ESC_RAPID:
|
||||
escFrequence = RAPID_ESC_FREQUENCY;
|
||||
if ((m_configSource->getControllerType() == VehicleConfigurationSource::CONTROLLER_CC ||
|
||||
m_configSource->getControllerType() == VehicleConfigurationSource::CONTROLLER_CC3D) &&
|
||||
m_configSource->getInputType() == VehicleConfigurationSource::INPUT_PWM) {
|
||||
m_configSource->getInputType() == VehicleConfigurationSource::INPUT_PWM) {
|
||||
bankMode = ActuatorSettings::BANKMODE_PWM;
|
||||
} else {
|
||||
bankMode = ActuatorSettings::BANKMODE_PWMSYNC;
|
||||
@ -387,7 +387,7 @@ void VehicleConfigurationHelper::applyActuatorConfiguration()
|
||||
break;
|
||||
case VehicleConfigurationSource::ESC_ONESHOT:
|
||||
escFrequence = RAPID_ESC_FREQUENCY;
|
||||
bankMode = ActuatorSettings::BANKMODE_ONESHOT125;
|
||||
bankMode = ActuatorSettings::BANKMODE_ONESHOT125;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
@ -423,39 +423,39 @@ void VehicleConfigurationHelper::applyActuatorConfiguration()
|
||||
|
||||
for (quint16 i = 0; i < ActuatorSettings::BANKUPDATEFREQ_NUMELEM; i++) {
|
||||
data.BankUpdateFreq[i] = LEGACY_ESC_FREQUENCY;
|
||||
data.BankMode[i] = ActuatorSettings::BANKMODE_PWM;
|
||||
data.BankMode[i] = ActuatorSettings::BANKMODE_PWM;
|
||||
}
|
||||
|
||||
switch (m_configSource->getVehicleSubType()) {
|
||||
case VehicleConfigurationSource::MULTI_ROTOR_TRI_Y:
|
||||
// Servo always on channel 4
|
||||
data.BankUpdateFreq[0] = escFrequence;
|
||||
data.BankMode[0] = bankMode;
|
||||
data.BankMode[0] = bankMode;
|
||||
if (m_configSource->getControllerType() == VehicleConfigurationSource::CONTROLLER_CC ||
|
||||
m_configSource->getControllerType() == VehicleConfigurationSource::CONTROLLER_CC3D) {
|
||||
data.BankUpdateFreq[1] = servoFrequence;
|
||||
data.BankMode[1] = bankMode;
|
||||
data.BankMode[1] = bankMode;
|
||||
} else if (m_configSource->getControllerType() == VehicleConfigurationSource::CONTROLLER_REVO) {
|
||||
data.BankUpdateFreq[1] = escFrequence;
|
||||
data.BankMode[1] = bankMode;
|
||||
data.BankMode[1] = bankMode;
|
||||
data.BankUpdateFreq[2] = servoFrequence;
|
||||
} else if (m_configSource->getControllerType() == VehicleConfigurationSource::CONTROLLER_NANO) {
|
||||
data.BankUpdateFreq[1] = escFrequence;
|
||||
data.BankMode[1] = bankMode;
|
||||
data.BankMode[1] = bankMode;
|
||||
data.BankUpdateFreq[2] = escFrequence;
|
||||
data.BankMode[2] = bankMode;
|
||||
data.BankMode[2] = bankMode;
|
||||
data.BankUpdateFreq[3] = servoFrequence;
|
||||
}
|
||||
break;
|
||||
case VehicleConfigurationSource::MULTI_ROTOR_QUAD_X:
|
||||
case VehicleConfigurationSource::MULTI_ROTOR_QUAD_PLUS:
|
||||
data.BankUpdateFreq[0] = escFrequence;
|
||||
data.BankMode[0] = bankMode;
|
||||
data.BankMode[0] = bankMode;
|
||||
data.BankUpdateFreq[1] = escFrequence;
|
||||
data.BankMode[1] = bankMode;
|
||||
data.BankMode[1] = bankMode;
|
||||
if (m_configSource->getControllerType() == VehicleConfigurationSource::CONTROLLER_REVO) {
|
||||
data.BankUpdateFreq[2] = escFrequence;
|
||||
data.BankMode[2] = bankMode;
|
||||
data.BankMode[2] = bankMode;
|
||||
}
|
||||
break;
|
||||
case VehicleConfigurationSource::MULTI_ROTOR_HEXA:
|
||||
@ -468,13 +468,13 @@ void VehicleConfigurationHelper::applyActuatorConfiguration()
|
||||
case VehicleConfigurationSource::MULTI_ROTOR_OCTO_COAX_PLUS:
|
||||
case VehicleConfigurationSource::MULTI_ROTOR_OCTO_V:
|
||||
data.BankUpdateFreq[0] = escFrequence;
|
||||
data.BankMode[0] = bankMode;
|
||||
data.BankMode[0] = bankMode;
|
||||
data.BankUpdateFreq[1] = escFrequence;
|
||||
data.BankMode[1] = bankMode;
|
||||
data.BankMode[1] = bankMode;
|
||||
data.BankUpdateFreq[2] = escFrequence;
|
||||
data.BankMode[2] = bankMode;
|
||||
data.BankMode[2] = bankMode;
|
||||
data.BankUpdateFreq[3] = escFrequence;
|
||||
data.BankMode[3] = bankMode;
|
||||
data.BankMode[3] = bankMode;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
@ -499,7 +499,7 @@ void VehicleConfigurationHelper::applyActuatorConfiguration()
|
||||
|
||||
for (quint16 i = 0; i < ActuatorSettings::BANKUPDATEFREQ_NUMELEM; i++) {
|
||||
data.BankUpdateFreq[i] = servoFrequence;
|
||||
data.BankMode[i] = ActuatorSettings::BANKMODE_PWM;
|
||||
data.BankMode[i] = ActuatorSettings::BANKMODE_PWM;
|
||||
if (m_configSource->getControllerType() == VehicleConfigurationSource::CONTROLLER_REVO) {
|
||||
if (i == 1) {
|
||||
data.BankUpdateFreq[i] = escFrequence;
|
||||
|
Loading…
x
Reference in New Issue
Block a user