Bayley Wang
/
priustroller
Prius IPM controller
Fork of analoghalls5_5 by
meta/filters.cpp
- Committer:
- bwang
- Date:
- 2015-03-16
- Revision:
- 35:83cf9564bd0c
- Parent:
- 11:dccbaa9274c5
File content as of revision 35:83cf9564bd0c:
#include "includes.h" #include "filters.h" MeanFilter::MeanFilter(float strength) { _strength = strength; _mean = 0; } float MeanFilter::Update(float x) { return _mean = _strength * _mean + (1.0f - _strength) * x; }