It allows to control the ratio in which certain items will use the different outputs.
This is done by adding an item multiple times to the same filter.
Because of this, the hardcoded permutations are replaced with a Fisher-Yates-Shuffle.
This is theoretically a little bit slower; but according to my measurements, about one million of copy-shuffle operations can be executed per second (tested with a table length of four); so it doesn't seem to be a big problem.
Additionally, a bit of outdated information was removed from the manuals.
Add support for reading distributor slot status. This action
is complementary to already present filter setting function.
'port' distributor message is modified to accept filter color
only (without '=on/off'), device returns selected filter state.
A wrapper function ($get_filter(...)) for Lua Controller and
condition selector for ICTA Controller are implemented as well.
Signed-off-by: Michal Cieslakiewicz <michal.cieslakiewicz@wp.pl>
Distributor iterates through filter indices always in the same order,
accidentally favouring certain ports. This is particularly noticeable
for 3 outputs configured with the same item - lowest numbered port
is receiving double quantity (TA2 distributor moves items in pack of 4).
Fix provided in this patch adds an extra mapping for filter indexing,
permutating randomly outputs with identical items so no ports are
preferred anymore.
Signed-off-by: Michal Cieslakiewicz <michal.cieslakiewicz@wp.pl>