Fix jumps in average value calculation due to range switches

Use a different tick for average value calculation that only updates
if the average value sum was also updated.
Add support for 3.3V range
Add support for changing the averaging length