Megunolink / MLP

Arduino library for sending data to MegunoLink visualisers and useful components
http://www.megunolink.com
GNU Lesser General Public License v3.0
46 stars 26 forks source link

Update Filter.h #10

Closed dmchaplin closed 2 years ago

dmchaplin commented 2 years ago

the SetCurrent() method multiplies the NewValue by 100. If the constructor is used instead of the method, then the m_Current variable is never multiplied by 100 and causes the Filter() method to calculate the wrong value.

This issue can be replicated by using a small weight (20) and passing in the initial value in the constructor.

PaulMartinsen commented 2 years ago

Thanks for spotting and fixing this issue. Much appreciated.