stock mbed AnalogReads current loop closed and working
Fork of priustroller_2 by
meta/filters.cpp
- Committer:
- bwang
- Date:
- 2016-01-31
- Revision:
- 56:85a26f839af2
- Parent:
- 11:dccbaa9274c5
File content as of revision 56:85a26f839af2:
#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; }