Minor tidy processRcCommand
This commit is contained in:
parent
5a68276784
commit
b314c36b81
|
@ -253,15 +253,15 @@ void processRcCommand(void)
|
||||||
}
|
}
|
||||||
|
|
||||||
// Interpolate steps of rcCommand
|
// Interpolate steps of rcCommand
|
||||||
int channel;
|
|
||||||
if (factor > 0) {
|
if (factor > 0) {
|
||||||
for (channel=ROLL; channel < interpolationChannels; channel++)
|
for (int channel=ROLL; channel < interpolationChannels; channel++) {
|
||||||
rcCommand[channel] = lastCommand[channel] - deltaRC[channel] * factor/rcInterpolationFactor;
|
rcCommand[channel] = lastCommand[channel] - deltaRC[channel] * factor/rcInterpolationFactor;
|
||||||
|
readyToCalculateRateAxisCnt = MAX(channel,FD_YAW); // throttle channel doesn't require rate calculation
|
||||||
|
readyToCalculateRate = true;
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
factor = 0;
|
factor = 0;
|
||||||
}
|
}
|
||||||
readyToCalculateRateAxisCnt = MAX(channel, FD_YAW); // throttle channel doesn't require rate calculation
|
|
||||||
readyToCalculateRate = true;
|
|
||||||
} else {
|
} else {
|
||||||
factor = 0; // reset factor in case of level modes flip flopping
|
factor = 0; // reset factor in case of level modes flip flopping
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue