Controls Subroutine

I do have, and have used, grey-coded rotary switches, but they require multiple wires and Picaxe pins, which were not available.
This is pretty easy to wire, using a resistor pack, and the decoding is robust.
The switch is make-before-break but nevertheless I used a two pass procedure. On the first pass, when a change is detected, the "SWPending" flag is raised, and the Mode not changed. On a subsequent pass Mode is updated.
There is an arbitary relationship between the switch position and Mode partly because the switch is wired haphazardly, for convenience.
The switch has more positions than there are Modes. The other positions raise a "DispBlank" flag, which is cancelled by any subsequent Mode change, local or remote.
A successful Mode change raises the "NewModeFlag" which causes refreshing and updating of the display