mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-26 01:35:41 +03:00
Fixed conditions for RC smoothing validation.
This commit is contained in:
parent
47b2620672
commit
fb83ea4b52
3 changed files with 13 additions and 6 deletions
|
@ -245,18 +245,15 @@ static void validateAndFixConfig(void)
|
|||
rxConfigMutable()->rssi_src_frame_errors = false;
|
||||
}
|
||||
|
||||
if ((
|
||||
#if defined(USE_RC_SMOOTHING_FILTER)
|
||||
rxConfig()->rc_smoothing_type == RC_SMOOTHING_TYPE_INTERPOLATION &&
|
||||
#endif
|
||||
rxConfig()->rcInterpolation == RC_SMOOTHING_OFF) || rxConfig()->rcInterpolationChannels == INTERPOLATION_CHANNELS_T) {
|
||||
if (rcSmoothingIsOff() || rxConfig()->rcInterpolationChannels == INTERPOLATION_CHANNELS_T) {
|
||||
for (unsigned i = 0; i < MAX_PROFILE_COUNT; i++) {
|
||||
pidProfilesMutable(i)->dtermSetpointWeight = 0;
|
||||
}
|
||||
}
|
||||
|
||||
#if defined(USE_THROTTLE_BOOST)
|
||||
if (!(rxConfig()->rcInterpolationChannels == INTERPOLATION_CHANNELS_RPYT
|
||||
if (rcSmoothingIsOff() ||
|
||||
!(rxConfig()->rcInterpolationChannels == INTERPOLATION_CHANNELS_RPYT
|
||||
|| rxConfig()->rcInterpolationChannels == INTERPOLATION_CHANNELS_T
|
||||
|| rxConfig()->rcInterpolationChannels == INTERPOLATION_CHANNELS_RPT)) {
|
||||
for (unsigned i = 0; i < MAX_PROFILE_COUNT; i++) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue