dankamongmen / counterforce

leet monitoring tool for schwarzgerät, running on its 5.5" amoled frontpiece
GNU General Public License v3.0
3 stars 1 forks source link

sample RPM over a longer period for more stable readings #42

Closed dankamongmen closed 2 years ago

dankamongmen commented 2 years ago

currently, we send an RPM measurement every second, by multiplying the number of interrupts by 30 (60 to extrapolate seconds to minutes, divided by 2 since tach hits twice). if we sampled over 5 or even just 3 seconds, we could probably get a more stable read. currently, these readings are much more erratic than any other fans (see screenshot).

to be sure, we still want to send the count every second, but it ought represent up to N seconds (normalized to the unit time). so for N seconds, keep N boxes in a ring buffer, and overwrite the next value once we've collected N.

2022-10-30-082222_1435x474_scrot

dankamongmen commented 2 years ago

i've effected this, and updated the MEGA. there is indeed noticeably reduced volatility, as expected. w00t! =]