Problems with using rev through bore encoder

We are trying to use our through bore encoder to move the launcher as shown in the pictures. But I am having some trouble trying to figure out how to turn the encoder values into two different positions, one for picking up the notes and one for launching them.

We are also having the issue of the intake slowly falling back down into the lower position due to the weight of the unit and the fact that the brakes on the spark maxes are not powerful enough to hold it up. So we need to find a way to keep the unit up (possibly a coding solution rather than mechanical). I was thinking of using a PID loop & then encoder for this, but am not sure how.

We are using Java, and using a time based program because we haven’t quite figured out command based.

I will send a picture of our code and the values the encoder are returning in a minute.

Any suggestions?