fixed y sensor edge detection problems