From b314c36b81eadd78674c2f9ded93d46fd8d7440a Mon Sep 17 00:00:00 2001 From: borisbstyle Date: Mon, 16 Jan 2017 22:53:02 +0100 Subject: [PATCH] Minor tidy processRcCommand --- src/main/fc/fc_core.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/main/fc/fc_core.c b/src/main/fc/fc_core.c index dd22a3b08a..6e6e83da68 100644 --- a/src/main/fc/fc_core.c +++ b/src/main/fc/fc_core.c @@ -238,7 +238,7 @@ void processRcCommand(void) rcInterpolationFactor = rxRefreshRate / targetPidLooptime + 1; if (debugMode == DEBUG_RC_INTERPOLATION) { - for (int axis = 0; axis < 2; axis++) debug[axis] = rcCommand[axis]; + for(int axis = 0; axis < 2; axis++) debug[axis] = rcCommand[axis]; debug[3] = rxRefreshRate; } @@ -253,15 +253,15 @@ void processRcCommand(void) } // Interpolate steps of rcCommand - int channel; if (factor > 0) { - for (channel=ROLL; channel < interpolationChannels; channel++) + for (int channel=ROLL; channel < interpolationChannels; channel++) { rcCommand[channel] = lastCommand[channel] - deltaRC[channel] * factor/rcInterpolationFactor; + readyToCalculateRateAxisCnt = MAX(channel,FD_YAW); // throttle channel doesn't require rate calculation + readyToCalculateRate = true; + } } else { factor = 0; } - readyToCalculateRateAxisCnt = MAX(channel, FD_YAW); // throttle channel doesn't require rate calculation - readyToCalculateRate = true; } else { factor = 0; // reset factor in case of level modes flip flopping }