disable a button input unitll another pressed

On second thought, just use counter as a position indicator. Set it in calibration, then increment it on forward ticks of the hall sensor, decrement it when going backwards. On that point, consider using an interrupt to ensure you don't miss anything from the hall.