OSCSYS / brewtroller

BrewTroller Open Source Brewing Control System
9 stars 15 forks source link

Volume Reading enhancement #2

Closed shockerengr closed 9 years ago

shockerengr commented 9 years ago

Current design for volume measurement converts each individual reading to a volume prior to averaging. It would be more efficient to average the raw input readings first, then convert to volume measurement for system use.

mattreba commented 9 years ago

How would the proposed logic be more efficient? It's still going to need perform the ADC reading to calibrated volume conversion on each update. The only difference is averaging 16-bit ints verses 32-bit longs. I'm not sure how much difference it makes.

shockerengr commented 9 years ago

nm

mattreba commented 9 years ago

The more I think about it the more your changes make sense. It would cut the memory usage by half and the averaging would have to be a few cycles less for 16-bit vs 32-bit values i'd assume.