I feel a bit uneasy about the need for things like active_sample_count (gating the filter) - it just seems like it's a bit of a workaround that'll probably end up biting us later.
The only major thing I could suggest would be a simpler filter that has much less ring
Yes, I've been wondering about this. I was thinking a simple low pass filter might do what we need (producing a nice, smooth signal) without introducing anywhere near as much ringing.
Did you find anything out about the best frequency cut-off to use? I know I used 2.5Hz, and I could just do that as a low-pass filter (without trying to cut off anything below 1hz).
Espruino is a JavaScript interpreter for low-power Microcontrollers. This site is both a support community for Espruino and a place to share what you are working on.
Thanks - I've been a bit busy lately I'm afraid.
I feel a bit uneasy about the need for things like
active_sample_count
(gating the filter) - it just seems like it's a bit of a workaround that'll probably end up biting us later.Yes, I've been wondering about this. I was thinking a simple low pass filter might do what we need (producing a nice, smooth signal) without introducing anywhere near as much ringing.
Did you find anything out about the best frequency cut-off to use? I know I used 2.5Hz, and I could just do that as a low-pass filter (without trying to cut off anything below 1hz).