Skip to content

Commit

Permalink
Fix incorrect PID filter reset introduced in #803 (#843)
Browse files Browse the repository at this point in the history
  • Loading branch information
matejkarasek authored Sep 3, 2021
1 parent 0b2caed commit 949d378
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/modules/src/position_controller_pid.c
Original file line number Diff line number Diff line change
Expand Up @@ -258,7 +258,11 @@ void positionControllerResetAllfilters() {
filterReset(&this.pidZ.pid, POSITION_RATE, POSITION_LPF_CUTOFF_FREQ, POSITION_LPF_ENABLE);
filterReset(&this.pidVX.pid, POSITION_RATE, POSITION_LPF_CUTOFF_FREQ, POSITION_LPF_ENABLE);
filterReset(&this.pidVY.pid, POSITION_RATE, POSITION_LPF_CUTOFF_FREQ, POSITION_LPF_ENABLE);
filterReset(&this.pidVZ.pid, POSITION_RATE, ZVELOCITY_LPF_CUTOFF_FREQ, POSITION_LPF_ENABLE);
#ifdef IMPROVED_BARO_Z_HOLD
filterReset(&this.pidVZ.pid, POSITION_RATE, ZVELOCITY_LPF_CUTOFF_FREQ, POSITION_LPF_ENABLE);
#else
filterReset(&this.pidVZ.pid, POSITION_RATE, POSITION_LPF_CUTOFF_FREQ, POSITION_LPF_ENABLE);
#endif
}

/**
Expand Down

0 comments on commit 949d378

Please sign in to comment.