Filter: add get method to LowPassFilter

This commit is contained in:
Randy Mackay 2015-02-23 12:54:36 +09:00
parent c711179ffe
commit 4b78b2ce80

View File

@ -40,6 +40,9 @@ public:
// apply - Add a new raw value to the filter, retrieve the filtered result
virtual T apply(T sample);
// get - returns latest filtered value from filter (equal to the value returned by latest call to apply method)
virtual T get() const { return (T)_base_value; }
// reset - clear the filter - next sample added will become the new base value
virtual void reset() {
_base_value_set = false;