Future improvement: constantly sample at max rate and poll measurements based on a rolling frame. This would hopefully be done using a parallel process.
The current functionality pulls N samples, filters outliers, and then calculates an average. The new feature would open up functionality to sample the scales at any point in time based on the past X seconds without needing the have your main code wait on the scales timing.
With measurements at 10Hz of 0,1,2,3,4,5,6,7,8,9, the main loop sees:
0,0,0.5,0.5,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8
This occurs without the main loop needing to slow down to 10Hz. This also would allow the 10Hz data to fail sometimes without affecting the main loop. Current functionality would force the main loop to loop at 3.33 Hz in order to pull 3 samples at a time and average them.
Future improvement: constantly sample at max rate and poll measurements based on a rolling frame. This would hopefully be done using a parallel process.
The current functionality pulls N samples, filters outliers, and then calculates an average. The new feature would open up functionality to sample the scales at any point in time based on the past X seconds without needing the have your main code wait on the scales timing.