mirror of
https://bitbucket.org/librepilot/librepilot.git
synced 2024-11-29 07:24:13 +01:00
OP-1493 Make Vehicle and TX Wizards work with the discoveryf4bare target
This commit is contained in:
parent
dd86e7f9c4
commit
09a943f17f
@ -34,8 +34,9 @@ USE_DSP_LIB ?= NO
|
||||
#MODULES += Altitude/revolution
|
||||
#MODULES += Airspeed
|
||||
#MODULES += AltitudeHold
|
||||
#MODULES += Stabilization
|
||||
MODULES += Stabilization
|
||||
MODULES += ManualControl
|
||||
MODULES += Receiver
|
||||
MODULES += Actuator
|
||||
MODULES += GPS
|
||||
MODULES += TxPID
|
||||
|
@ -107,6 +107,9 @@ SetupWizard::CONTROLLER_TYPE ControllerPage::getControllerType()
|
||||
case 0x0903:
|
||||
return SetupWizard::CONTROLLER_REVO;
|
||||
|
||||
case 0x0904:
|
||||
return SetupWizard::CONTROLLER_DISCOVERYF4;
|
||||
|
||||
default:
|
||||
return SetupWizard::CONTROLLER_UNKNOWN;
|
||||
}
|
||||
@ -127,6 +130,7 @@ void ControllerPage::setupBoardTypes()
|
||||
ui->boardTypeCombo->addItem(tr("OpenPilot CopterControl 3D"), SetupWizard::CONTROLLER_CC3D);
|
||||
ui->boardTypeCombo->addItem(tr("OpenPilot Revolution"), SetupWizard::CONTROLLER_REVO);
|
||||
ui->boardTypeCombo->addItem(tr("OpenPilot OPLink Radio Modem"), SetupWizard::CONTROLLER_OPLINK);
|
||||
ui->boardTypeCombo->addItem(tr("OpenPilot DiscoveryF4"), SetupWizard::CONTROLLER_DISCOVERYF4);
|
||||
}
|
||||
|
||||
void ControllerPage::setControllerType(SetupWizard::CONTROLLER_TYPE type)
|
||||
|
@ -94,6 +94,7 @@ bool InputPage::restartNeeded(VehicleConfigurationSource::INPUT_TYPE selectedTyp
|
||||
break;
|
||||
}
|
||||
case SetupWizard::CONTROLLER_REVO:
|
||||
case SetupWizard::CONTROLLER_DISCOVERYF4:
|
||||
{
|
||||
switch (selectedType) {
|
||||
case VehicleConfigurationSource::INPUT_PWM:
|
||||
|
@ -83,6 +83,7 @@ int SetupWizard::nextId() const
|
||||
case CONTROLLER_CC:
|
||||
case CONTROLLER_CC3D:
|
||||
case CONTROLLER_REVO:
|
||||
case CONTROLLER_DISCOVERYF4:
|
||||
return PAGE_INPUT;
|
||||
|
||||
case CONTROLLER_OPLINK:
|
||||
@ -141,6 +142,10 @@ int SetupWizard::nextId() const
|
||||
case CONTROLLER_REVO:
|
||||
return PAGE_BIAS_CALIBRATION;
|
||||
|
||||
case CONTROLLER_DISCOVERYF4:
|
||||
// Skip calibration.
|
||||
return PAGE_OUTPUT_CALIBRATION;
|
||||
|
||||
default:
|
||||
return PAGE_NOTYETIMPLEMENTED;
|
||||
}
|
||||
@ -174,6 +179,9 @@ QString SetupWizard::getSummaryText()
|
||||
case CONTROLLER_OPLINK:
|
||||
summary.append(tr("OpenPilot OPLink Radio Modem"));
|
||||
break;
|
||||
case CONTROLLER_DISCOVERYF4:
|
||||
summary.append(tr("OpenPilot DiscoveryF4 Development Board"));
|
||||
break;
|
||||
default:
|
||||
summary.append(tr("Unknown"));
|
||||
break;
|
||||
|
@ -148,6 +148,7 @@ void VehicleConfigurationHelper::applyHardwareConfiguration()
|
||||
}
|
||||
break;
|
||||
case VehicleConfigurationSource::CONTROLLER_REVO:
|
||||
case VehicleConfigurationSource::CONTROLLER_DISCOVERYF4:
|
||||
// Reset all ports
|
||||
data.RM_RcvrPort = HwSettings::RM_RCVRPORT_DISABLED;
|
||||
|
||||
|
@ -55,7 +55,7 @@ class VehicleConfigurationSource {
|
||||
public:
|
||||
VehicleConfigurationSource();
|
||||
|
||||
enum CONTROLLER_TYPE { CONTROLLER_UNKNOWN, CONTROLLER_CC, CONTROLLER_CC3D, CONTROLLER_REVO, CONTROLLER_OPLINK };
|
||||
enum CONTROLLER_TYPE { CONTROLLER_UNKNOWN, CONTROLLER_CC, CONTROLLER_CC3D, CONTROLLER_REVO, CONTROLLER_OPLINK, CONTROLLER_DISCOVERYF4 };
|
||||
enum VEHICLE_TYPE { VEHICLE_UNKNOWN, VEHICLE_MULTI, VEHICLE_FIXEDWING, VEHICLE_HELI, VEHICLE_SURFACE };
|
||||
enum VEHICLE_SUB_TYPE { MULTI_ROTOR_UNKNOWN, MULTI_ROTOR_TRI_Y, MULTI_ROTOR_QUAD_X, MULTI_ROTOR_QUAD_PLUS,
|
||||
MULTI_ROTOR_HEXA, MULTI_ROTOR_HEXA_H, MULTI_ROTOR_HEXA_X, MULTI_ROTOR_HEXA_COAX_Y, MULTI_ROTOR_OCTO,
|
||||
|
@ -50,6 +50,10 @@ public:
|
||||
// Revo Mini
|
||||
return QString("Revolution");
|
||||
|
||||
break;
|
||||
case 0x0904:
|
||||
return QString("DiscoveryF4");
|
||||
|
||||
break;
|
||||
default:
|
||||
return QString("");
|
||||
|
Loading…
Reference in New Issue
Block a user