This is a response to #153: a simple wavefolder with settable high and low limits. The wave can be folded multiple times.
Not fully tested so far. Seems to work well on the scope.
Lacks at least an example before considering merging but if someone see an obvious optimization, I am all hear! I had to resort to use one division, which are notoriously slow on microcontrollers but I am not sure if the trick of computing the inverse on the changes of bounds only is actually worth it, open to comment!
Hello!
This is a response to #153: a simple wavefolder with settable high and low limits. The wave can be folded multiple times. Not fully tested so far. Seems to work well on the scope.
Lacks at least an example before considering merging but if someone see an obvious optimization, I am all hear! I had to resort to use one division, which are notoriously slow on microcontrollers but I am not sure if the trick of computing the inverse on the changes of bounds only is actually worth it, open to comment!
Best, Tom