Hi Clinton,
Use smoothed version of sensor array data to calculate movement and add weight
to prior values when calculating average. This gives more granular and more
predictable movement.
Great patch, just one thing:
quoted hunk ↗ jump to hunk
+ /* Handle other edge. */
+ smooth_tmp[nb_sensors + 7] = (smooth[nb_sensors + 7] + smooth[nb_sensors + 6]) >> 1;
+
+ for (i = 0; i < nb_sensors + 7; i++)
+ smooth[i] = smooth_tmp[i];
Should be "< nb_sensors + 8" here, no?
Thanks,
Henrik