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

Rework Fast PWM protocol configuration and timing

This commit is contained in:
borisbstyle 2016-05-07 00:51:25 +02:00
parent c74c5df73d
commit 9e5c5e88c7
12 changed files with 67 additions and 77 deletions

View file

@ -140,7 +140,7 @@ static uint32_t activeFeaturesLatch = 0;
static uint8_t currentControlRateProfileIndex = 0;
controlRateConfig_t *currentControlRateProfile;
static const uint8_t EEPROM_CONF_VERSION = 134;
static const uint8_t EEPROM_CONF_VERSION = 135;
static void resetAccelerometerTrims(flightDynamicsTrims_t *accelerometerTrims)
{
@ -190,8 +190,6 @@ static void resetPidProfile(pidProfile_t *pidProfile)
pidProfile->dterm_lpf_hz = 80; // filtering ON by default
pidProfile->dynamic_pterm = 1;
pidProfile->H_sensitivity = 75; // TODO - Cleanup during next EEPROM changes
#ifdef GTUNE
pidProfile->gtune_lolimP[ROLL] = 10; // [0..200] Lower limit of ROLL P during G tune.
pidProfile->gtune_lolimP[PITCH] = 10; // [0..200] Lower limit of PITCH P during G tune.
@ -485,7 +483,8 @@ static void resetConf(void)
masterConfig.motor_pwm_rate = BRUSHLESS_MOTORS_PWM_RATE;
#endif
masterConfig.servo_pwm_rate = 50;
masterConfig.use_oneshot42 = 0;
masterConfig.fast_pwm_protocol = 0;
masterConfig.use_unsyncedPwm = 0;
#ifdef CC3D
masterConfig.use_buzzer_p6 = 0;
#endif
@ -500,11 +499,7 @@ static void resetConf(void)
resetSerialConfig(&masterConfig.serialConfig);
#if defined(STM32F10X) && !defined(CC3D)
masterConfig.emf_avoidance = 1;
#else
masterConfig.emf_avoidance = 0;
#endif
masterConfig.emf_avoidance = 0; // TODO - needs removal
resetPidProfile(&currentProfile->pidProfile);