mirror of
https://bitbucket.org/librepilot/librepilot.git
synced 2025-03-16 08:29:15 +01:00
OP-1685 Fixed some issues in the wizard for oneshot
This commit is contained in:
parent
deafed615d
commit
927886bf8e
@ -376,18 +376,19 @@ void VehicleConfigurationHelper::applyActuatorConfiguration()
|
||||
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) {
|
||||
bankMode = ActuatorSettings::BANKMODE_PWM;
|
||||
escFrequence = RAPID_ESC_FREQUENCY;
|
||||
} else {
|
||||
bankMode = ActuatorSettings::BANKMODE_PWMSYNC;
|
||||
escFrequence = PWMSYNC_ESC_FREQUENCY;
|
||||
}
|
||||
break;
|
||||
case VehicleConfigurationSource::ESC_ONESHOT:
|
||||
escFrequence = RAPID_ESC_FREQUENCY;
|
||||
bankMode = ActuatorSettings::BANKMODE_ONESHOT125;
|
||||
escFrequence = ONESHOT_ESC_FREQUENCY;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
|
@ -59,6 +59,8 @@ public:
|
||||
bool setupHardwareSettings(bool save = true);
|
||||
static const qint16 LEGACY_ESC_FREQUENCY = 50;
|
||||
static const qint16 RAPID_ESC_FREQUENCY = 490;
|
||||
static const qint16 PWMSYNC_ESC_FREQUENCY = 0;
|
||||
static const qint16 ONESHOT_ESC_FREQUENCY = 0;
|
||||
static const qint16 ANALOG_SERVO_FREQUENCY = 50;
|
||||
static const qint16 DIGITAL_SERVO_FREQUENCY = 333;
|
||||
static const int MIXER_TYPE_NONE = 0;
|
||||
|
Loading…
x
Reference in New Issue
Block a user