Updated with output reducer.

Less consecutive lines to output reduces saturarion on bus.
Two new params:
param_out reducer_max: Number of samples who will produce output in a window of samples.
param_window_size: The size of the winow.