Added semi limit switch functionality