Last minute modification for 6-pos switch steps detection. Needs to be
tested again!