Skip to content

Commit

Permalink
Fix bug in memory old outputs
Browse files Browse the repository at this point in the history
  • Loading branch information
christophfroehlich committed Dec 1, 2024
1 parent b4cfba4 commit 9e702a4
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion include/control_filters/rate_limiter.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -132,8 +132,9 @@ bool RateLimiter<T>::update(const T & data_in, T & data_out)
}
T v = data_in;
limiter->limit(v, v0, v1, static_cast<T>(parameters_.sampling_interval));
// shift the values for the next update call
v1 = v0;
v0 = data_in;
v0 = v; // use the limited value
data_out = v;
return true;
}
Expand Down

0 comments on commit 9e702a4

Please sign in to comment.