1
0
mirror of https://bitbucket.org/librepilot/librepilot.git synced 2024-12-01 09:24:10 +01:00

OP-1567 Fixed some defaults in wizard.

If CC or CC3D disable GPS.
This commit is contained in:
m_thread 2014-10-23 12:42:27 +02:00
parent 1f1c0bea58
commit 2ee9e04ff6
2 changed files with 4 additions and 0 deletions

View File

@ -80,6 +80,9 @@ bool ControllerPage::isComplete() const
bool ControllerPage::validatePage()
{
getWizard()->setControllerType((SetupWizard::CONTROLLER_TYPE)ui->boardTypeCombo->itemData(ui->boardTypeCombo->currentIndex()).toInt());
if (getWizard()->getControllerType() == SetupWizard::CONTROLLER_CC || getWizard()->getControllerType() == SetupWizard::CONTROLLER_CC3D) {
getWizard()->setGpsType(SetupWizard::GPS_DISABLED);
}
return true;
}

View File

@ -58,6 +58,7 @@ SetupWizard::SetupWizard(QWidget *parent) : QWizard(parent), VehicleConfiguratio
m_controllerType(CONTROLLER_UNKNOWN),
m_vehicleType(VEHICLE_UNKNOWN), m_inputType(INPUT_UNKNOWN), m_escType(ESC_UNKNOWN),
m_servoType(SERVO_UNKNOWN), m_vehicleTemplate(NULL),
m_gpsType(GPS_DISABLED), m_airspeedType(AIRSPEED_DISABLED),
m_calibrationPerformed(false), m_restartNeeded(false), m_connectionManager(0)
{
setWindowTitle(tr("OpenPilot Setup Wizard"));