Due possibly to behavior of the chain, the "reset ramp" action is not being very consistent. A possible approach to get the encoder to read consistently:
- In isFinished(), mark the time when the limit switch is reached but do not reset the encoder and do not actually finish
- .5 seconds after this point, return true in isFinished