From 8e7f27d8a9ff4e6f3b98a6dd80b048ad365631f6 Mon Sep 17 00:00:00 2001 From: Petri Mattila Date: Thu, 25 Jul 2024 21:59:57 +0100 Subject: [PATCH] WIP --- src/main/flight/pid.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/main/flight/pid.c b/src/main/flight/pid.c index e7a1a6c885..d9f425836d 100644 --- a/src/main/flight/pid.c +++ b/src/main/flight/pid.c @@ -233,12 +233,12 @@ void INIT_CODE pidInitProfile(const pidProfile_t *pidProfile) pid.precomp.pitchCollectiveFFGain = pidProfile->pitch_collective_ff_gain / 500.0f; // Cross-coupling compensation - pid.cyclicCrossCouplingGain[FD_PITCH] = pidProfile->cyclic_cross_coupling_gain * mixerRotationSign() * -CROSS_COUPLING_SCALE; + pid.cyclicCrossCouplingGain[FD_PITCH] = pidProfile->cyclic_cross_coupling_gain * mixerRotationSign() * -CROSS_COUPLING_SCALE * 10.0f; pid.cyclicCrossCouplingGain[FD_ROLL] = pid.cyclicCrossCouplingGain[FD_PITCH] * pidProfile->cyclic_cross_coupling_ratio / -100.0f; // Cross-coupling derivative filters - difFilterInit(&pid.crossCouplingFilter[FD_PITCH], pidProfile->cyclic_cross_coupling_cutoff, pid.freq); - difFilterInit(&pid.crossCouplingFilter[FD_ROLL], pidProfile->cyclic_cross_coupling_cutoff, pid.freq); + difFilterInit(&pid.crossCouplingFilter[FD_PITCH], pidProfile->cyclic_cross_coupling_cutoff * 0.1f, pid.freq); + difFilterInit(&pid.crossCouplingFilter[FD_ROLL], pidProfile->cyclic_cross_coupling_cutoff * 0.1f, pid.freq); // Initialise sub-profiles governorInitProfile(pidProfile);