mirror of
https://bitbucket.org/librepilot/librepilot.git
synced 2025-02-20 10:54:14 +01:00
OP-1685 Added more OneShot code to wizard.
This commit is contained in:
parent
d859ad78df
commit
899cf3aa1d
@ -58,9 +58,14 @@ bool EscPage::validatePage()
|
||||
|
||||
void EscPage::initializePage()
|
||||
{
|
||||
ui->oneshotESCButton->setEnabled(getWizard()->getInputType() != SetupWizard::INPUT_PWM);
|
||||
if (ui->oneshotESCButton->isChecked() && getWizard()->getInputType() == SetupWizard::INPUT_PWM) {
|
||||
ui->oneshotESCButton->setChecked(false);
|
||||
ui->rapidESCButton->setChecked(true);
|
||||
if (getWizard()->getControllerType() == SetupWizard::CONTROLLER_CC ||
|
||||
getWizard()->getControllerType() == SetupWizard::CONTROLLER_CC3D) {
|
||||
ui->oneshotESCButton->setEnabled(getWizard()->getInputType() != SetupWizard::INPUT_PWM);
|
||||
if (ui->oneshotESCButton->isChecked() && getWizard()->getInputType() == SetupWizard::INPUT_PWM) {
|
||||
ui->oneshotESCButton->setChecked(false);
|
||||
ui->rapidESCButton->setChecked(true);
|
||||
}
|
||||
} else {
|
||||
ui->oneshotESCButton->setEnabled(true);
|
||||
}
|
||||
}
|
||||
|
@ -150,7 +150,11 @@ void VehicleConfigurationHelper::applyHardwareConfiguration()
|
||||
data.CC_RcvrPort = HwSettings::CC_RCVRPORT_PWMNOONESHOT;
|
||||
break;
|
||||
case VehicleConfigurationSource::INPUT_PPM:
|
||||
data.CC_RcvrPort = HwSettings::CC_RCVRPORT_PPMNOONESHOT;
|
||||
if (m_configSource->getEscType() == VehicleConfigurationSource::ESC_ONESHOT) {
|
||||
data.CC_RcvrPort = HwSettings::CC_RCVRPORT_PPM_PIN6ONESHOT;
|
||||
} else {
|
||||
data.CC_RcvrPort = HwSettings::CC_RCVRPORT_PPMNOONESHOT;
|
||||
}
|
||||
break;
|
||||
case VehicleConfigurationSource::INPUT_SBUS:
|
||||
// We have to set teletry on flexport since s.bus needs the mainport.
|
||||
@ -373,10 +377,12 @@ void VehicleConfigurationHelper::applyActuatorConfiguration()
|
||||
break;
|
||||
case VehicleConfigurationSource::ESC_RAPID:
|
||||
escFrequence = RAPID_ESC_FREQUENCY;
|
||||
if (m_configSource->getInputType() != VehicleConfigurationSource::INPUT_PWM) {
|
||||
bankMode = ActuatorSettings::BANKMODE_ONESHOT;
|
||||
} else {
|
||||
if ((m_configSource->getControllerType() == VehicleConfigurationSource::CONTROLLER_CC ||
|
||||
m_configSource->getControllerType() == VehicleConfigurationSource::CONTROLLER_CC3D) &&
|
||||
m_configSource->getInputType() == VehicleConfigurationSource::INPUT_PWM) {
|
||||
bankMode = ActuatorSettings::BANKMODE_PWM;
|
||||
} else {
|
||||
bankMode = ActuatorSettings::BANKMODE_PWMSYNC;
|
||||
}
|
||||
break;
|
||||
case VehicleConfigurationSource::ESC_ONESHOT:
|
||||
|
Loading…
x
Reference in New Issue
Block a user