added support tot he xend for a limit switch