Merge pull request #489 from wolfmanjm/upstreamedge

Half hearted attempt at implementing M112 ESTOP
Fix switch state sio it is false if PWM switch and S0