Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions src/main/flight/servos.c
Original file line number Diff line number Diff line change
Expand Up @@ -231,10 +231,12 @@ void loadCustomServoMixer(void)
// target-profile response.
if (carryOverServoSpeedLimitsOnNextLoad) {
for (int i = 0; i < servoRuleCount; i++) {
if(currentServoMixer[i].inputSource == INPUT_MIXER_SWITCH_HELPER || movefilterCount >= MAX_SERVO_RULES_SWITCH_CARRY) {
//will not carry over INPUT_MIXER_SWITCH_HELPER rules
break;
if (movefilterCount >= MAX_SERVO_RULES_SWITCH_CARRY) {
break; // no room left to carry more filter states
}
// INPUT_MIXER_SWITCH_HELPER rules are carried over as well. They hold the
// still decaying output of an earlier switch, so dropping them would make
// the servo jump when switching back before that decay has finished.
if(currentServoMixer[i].speed != 0 && fabsf(servoSpeedLimitFilter[i].state) > 0.01f) {
servoMixerSwitchHelper[movefilterCount].targetChannel = currentServoMixer[i].targetChannel;
servoMixerSwitchHelper[movefilterCount].speed = currentServoMixer[i].speed;
Expand Down