1
0
Fork 0
mirror of https://github.com/betaflight/betaflight.git synced 2025-07-17 21:35:44 +03:00

Enable Faster cycletimes (Sample Rates) on all targets // More automatic looptime calculations

cleanup
This commit is contained in:
borisbstyle 2016-02-24 16:36:12 +01:00
parent 981bddf182
commit f5de06c59e
12 changed files with 72 additions and 25 deletions

View file

@ -960,7 +960,7 @@ bool isMixerUsingServos(void)
void filterServos(void)
{
#ifdef USE_SERVOS
int16_t servoIdx;
static int16_t servoIdx;
static bool servoFilterIsSet;
static biquad_t servoFilterState[MAX_SUPPORTED_SERVOS];
@ -971,7 +971,7 @@ void filterServos(void)
if (mixerConfig->servo_lowpass_enable) {
for (servoIdx = 0; servoIdx < MAX_SUPPORTED_SERVOS; servoIdx++) {
if (!servoFilterIsSet) {
BiQuadNewLpf(mixerConfig->servo_lowpass_freq, &servoFilterState[servoIdx], targetLooptime);
BiQuadNewLpf(mixerConfig->servo_lowpass_freq, &servoFilterState[servoIdx], targetPidLooptime);
servoFilterIsSet = true;
}