stock mbed AnalogReads current loop closed and working
Fork of priustroller by
meta/filters.cpp
- Committer:
- nki
- Date:
- 2015-04-16
- Revision:
- 36:11766b5da6ed
- Parent:
- 11:dccbaa9274c5
File content as of revision 36:11766b5da6ed:
#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; }