1
0
Fork 0
mirror of https://github.com/iNavFlight/inav.git synced 2025-07-23 00:05:28 +03:00

Renamed servoPwmConfig to servoConfig

This commit is contained in:
Martin Budden 2016-10-04 14:43:09 +01:00
parent c1add72e41
commit ee80b582da
5 changed files with 13 additions and 13 deletions

View file

@ -260,10 +260,10 @@ void resetMotorConfig(motorConfig_t *motorConfig)
} }
#ifdef USE_SERVOS #ifdef USE_SERVOS
void resetServoPwmConfig(servoPwmConfig_t *servoPwmConfig) void resetServoConfig(servoConfig_t *servoConfig)
{ {
servoPwmConfig->servoCenterPulse = 1500; servoConfig->servoCenterPulse = 1500;
servoPwmConfig->servoPwmRate = 50; servoConfig->servoPwmRate = 50;
} }
#endif #endif
@ -366,7 +366,7 @@ static void resetMixerConfig(mixerConfig_t *mixerConfig)
} }
#ifdef USE_SERVOS #ifdef USE_SERVOS
static void resetServoConfig(servoMixerConfig_t *servoMixerConfig) static void resetServoMixerConfig(servoMixerConfig_t *servoMixerConfig)
{ {
servoMixerConfig->tri_unarmed_servo = 1; servoMixerConfig->tri_unarmed_servo = 1;
servoMixerConfig->servo_lowpass_freq = 400; servoMixerConfig->servo_lowpass_freq = 400;
@ -488,8 +488,8 @@ static void resetConf(void)
resetMixerConfig(&masterConfig.mixerConfig); resetMixerConfig(&masterConfig.mixerConfig);
#ifdef USE_SERVOS #ifdef USE_SERVOS
resetServoConfig(&masterConfig.servoMixerConfig); resetServoMixerConfig(&masterConfig.servoMixerConfig);
resetServoPwmConfig(&masterConfig.servoPwmConfig); resetServoConfig(&masterConfig.servoConfig);
#endif #endif
resetMotorConfig(&masterConfig.motorConfig); resetMotorConfig(&masterConfig.motorConfig);

View file

@ -37,7 +37,7 @@ typedef struct master_s {
#endif #endif
// motor/esc/servo related stuff // motor/esc/servo related stuff
motorConfig_t motorConfig; motorConfig_t motorConfig;
servoPwmConfig_t servoPwmConfig; servoConfig_t servoConfig;
flight3DConfig_t flight3DConfig; flight3DConfig_t flight3DConfig;
// global sensor-related stuff // global sensor-related stuff

View file

@ -760,8 +760,8 @@ const clivalue_t valueTable[] = {
{ "servo_lowpass_freq", VAR_INT16 | MASTER_VALUE, &masterConfig.servoMixerConfig.servo_lowpass_freq, .config.minmax = { 10, 400}, 0 }, { "servo_lowpass_freq", VAR_INT16 | MASTER_VALUE, &masterConfig.servoMixerConfig.servo_lowpass_freq, .config.minmax = { 10, 400}, 0 },
{ "servo_lowpass_enable", VAR_INT8 | MASTER_VALUE | MODE_LOOKUP, &masterConfig.servoMixerConfig.servo_lowpass_enable, .config.lookup = { TABLE_OFF_ON }, 0 }, { "servo_lowpass_enable", VAR_INT8 | MASTER_VALUE | MODE_LOOKUP, &masterConfig.servoMixerConfig.servo_lowpass_enable, .config.lookup = { TABLE_OFF_ON }, 0 },
{ "gimbal_mode", VAR_UINT8 | PROFILE_VALUE | MODE_LOOKUP, &masterConfig.profile[0].gimbalConfig.mode, .config.lookup = { TABLE_GIMBAL_MODE }, 0 }, { "gimbal_mode", VAR_UINT8 | PROFILE_VALUE | MODE_LOOKUP, &masterConfig.profile[0].gimbalConfig.mode, .config.lookup = { TABLE_GIMBAL_MODE }, 0 },
{ "servo_center_pulse", VAR_UINT16 | MASTER_VALUE, &masterConfig.servoPwmConfig.servoCenterPulse, .config.minmax = { PWM_RANGE_ZERO, PWM_RANGE_MAX }, 0 }, { "servo_center_pulse", VAR_UINT16 | MASTER_VALUE, &masterConfig.servoConfig.servoCenterPulse, .config.minmax = { PWM_RANGE_ZERO, PWM_RANGE_MAX }, 0 },
{ "servo_pwm_rate", VAR_UINT16 | MASTER_VALUE, &masterConfig.servoPwmConfig.servoPwmRate, .config.minmax = { 50, 498 }, 0 }, { "servo_pwm_rate", VAR_UINT16 | MASTER_VALUE, &masterConfig.servoConfig.servoPwmRate, .config.minmax = { 50, 498 }, 0 },
{ "fw_iterm_throw_limit", VAR_INT16 | PROFILE_VALUE, &masterConfig.profile[0].pidProfile.fixedWingItermThrowLimit, .config.minmax = { FW_ITERM_THROW_LIMIT_MIN, FW_ITERM_THROW_LIMIT_MAX}, 0 }, { "fw_iterm_throw_limit", VAR_INT16 | PROFILE_VALUE, &masterConfig.profile[0].pidProfile.fixedWingItermThrowLimit, .config.minmax = { FW_ITERM_THROW_LIMIT_MIN, FW_ITERM_THROW_LIMIT_MAX}, 0 },
#endif #endif

View file

@ -17,8 +17,8 @@
#pragma once #pragma once
typedef struct servoPwmConfig_s { typedef struct servoConfig_s {
// PWM values, in milliseconds, common range is 1000-2000 (1ms to 2ms) // PWM values, in milliseconds, common range is 1000-2000 (1ms to 2ms)
uint16_t servoCenterPulse; // This is the value for servos when they should be in the middle. e.g. 1500. uint16_t servoCenterPulse; // This is the value for servos when they should be in the middle. e.g. 1500.
uint16_t servoPwmRate; // The update rate of servo outputs (50-498Hz) uint16_t servoPwmRate; // The update rate of servo outputs (50-498Hz)
} servoPwmConfig_t; } servoConfig_t;

View file

@ -270,8 +270,8 @@ void init(void)
#ifdef USE_SERVOS #ifdef USE_SERVOS
pwm_params.useServos = isMixerUsingServos(); pwm_params.useServos = isMixerUsingServos();
pwm_params.useChannelForwarding = feature(FEATURE_CHANNEL_FORWARDING); pwm_params.useChannelForwarding = feature(FEATURE_CHANNEL_FORWARDING);
pwm_params.servoCenterPulse = masterConfig.servoPwmConfig.servoCenterPulse; pwm_params.servoCenterPulse = masterConfig.servoConfig.servoCenterPulse;
pwm_params.servoPwmRate = masterConfig.servoPwmConfig.servoPwmRate; pwm_params.servoPwmRate = masterConfig.servoConfig.servoPwmRate;
#endif #endif
pwm_params.useOneshot = feature(FEATURE_ONESHOT125); pwm_params.useOneshot = feature(FEATURE_ONESHOT125);