1
0
mirror of https://bitbucket.org/librepilot/librepilot.git synced 2025-02-20 10:54:14 +01:00

Move FWing ESC setting to use the setter.

This commit is contained in:
Fredrik Larson 2014-08-23 04:12:25 +10:00
parent e4a4f35178
commit 169b95fb4d
2 changed files with 10 additions and 13 deletions

View File

@ -46,6 +46,7 @@ bool VehiclePage::validatePage()
getWizard()->setVehicleType(SetupWizard::VEHICLE_MULTI);
} else if (ui->fixedwingButton->isChecked()) {
getWizard()->setVehicleType(SetupWizard::VEHICLE_FIXEDWING);
getWizard()->setEscType(SetupWizard::ESC_STANDARD);
} else if (ui->heliButton->isChecked()) {
getWizard()->setVehicleType(SetupWizard::VEHICLE_HELI);
} else if (ui->surfaceButton->isChecked()) {

View File

@ -312,19 +312,15 @@ QString SetupWizard::getSummaryText()
summary.append("<br>");
summary.append("<b>").append(tr("Speed Controller (ESC) type: ")).append("</b>");
if (getVehicleType() == VEHICLE_FIXEDWING) {
summary.append(tr("Standard ESC (50 Hz)"));
} else {
switch (getEscType()) {
case ESC_STANDARD:
summary.append(tr("Legacy ESC (50 Hz)"));
break;
case ESC_RAPID:
summary.append(tr("Rapid ESC (400 Hz)"));
break;
default:
summary.append(tr("Unknown"));
}
switch (getEscType()) {
case ESC_STANDARD:
summary.append(tr("Legacy ESC (50 Hz)"));
break;
case ESC_RAPID:
summary.append(tr("Rapid ESC (400 Hz)"));
break;
default:
summary.append(tr("Unknown"));
}
if (getVehicleSubType() == MULTI_ROTOR_TRI_Y || getVehicleType() == VEHICLE_FIXEDWING) {