N K
/
GaNtroller
a fork of priustroller
Fork of priustroller_current by
Diff: currentsensors.cpp
- Revision:
- 7:76d6ceb23e0d
- Parent:
- 6:99ee0ce47fb2
--- a/currentsensors.cpp Wed Mar 04 15:33:32 2015 +0000 +++ b/currentsensors.cpp Thu Mar 05 11:02:54 2015 +0000 @@ -8,11 +8,7 @@ } void AnalogCurrentSensor::Zero() { - float mean = 0; - for(int i = 1; i<=1000; i++){ - mean = 0.1f*((float) *_in) + 0.9f*mean; - } - _zero_level = mean; + _zero_level = (float) *_in; } float AnalogCurrentSensor::GetCurrent() {