mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-24 16:55:36 +03:00
Preparation for conversion to parameter groups 10
This commit is contained in:
parent
ba6f3a0046
commit
90c8ed5e3e
14 changed files with 63 additions and 70 deletions
|
@ -243,6 +243,8 @@ void resetServoConfig(servoConfig_t *servoConfig)
|
|||
{
|
||||
servoConfig->servoCenterPulse = 1500;
|
||||
servoConfig->servoPwmRate = 50;
|
||||
servoConfig->tri_unarmed_servo = 1;
|
||||
servoConfig->servo_lowpass_freq = 0;
|
||||
|
||||
int servoIndex = 0;
|
||||
for (int i = 0; i < USABLE_TIMER_CHANNEL_COUNT && servoIndex < MAX_SUPPORTED_SERVOS; i++) {
|
||||
|
@ -477,15 +479,6 @@ void resetMixerConfig(mixerConfig_t *mixerConfig)
|
|||
mixerConfig->yaw_motor_direction = 1;
|
||||
}
|
||||
|
||||
#ifdef USE_SERVOS
|
||||
void resetServoMixerConfig(servoMixerConfig_t *servoMixerConfig)
|
||||
{
|
||||
servoMixerConfig->tri_unarmed_servo = 1;
|
||||
servoMixerConfig->servo_lowpass_freq = 400;
|
||||
servoMixerConfig->servo_lowpass_enable = 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef USE_MAX7456
|
||||
void resetMax7456Config(vcdProfile_t *pVcdProfile)
|
||||
{
|
||||
|
@ -732,7 +725,6 @@ void createDefaultConfig(master_t *config)
|
|||
resetMixerConfig(&config->mixerConfig);
|
||||
resetMotorConfig(&config->motorConfig);
|
||||
#ifdef USE_SERVOS
|
||||
resetServoMixerConfig(&config->servoMixerConfig);
|
||||
resetServoConfig(&config->servoConfig);
|
||||
#endif
|
||||
resetFlight3DConfig(&config->flight3DConfig);
|
||||
|
@ -904,7 +896,7 @@ void activateConfig(void)
|
|||
setAccelerationFilter(accelerometerConfig()->acc_lpf_hz);
|
||||
|
||||
#ifdef USE_SERVOS
|
||||
servoUseConfigs(&masterConfig.servoMixerConfig, masterConfig.servoProfile.servoConf, &masterConfig.channelForwardingConfig);
|
||||
servoUseConfigs(masterConfig.servoProfile.servoConf, &masterConfig.channelForwardingConfig);
|
||||
#endif
|
||||
|
||||
imuConfigure(throttleCorrectionConfig()->throttle_correction_angle);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue