Thank you. Yep, the logic in the isFinished() looks odd because of the way the Talon was wired. Setting a positive setpoint was generating negative counts, so we compensated for that in the code.
We have got a simple command working and will post a cleaned up example of what we did tonight in case it helps others in the future.
One thing that I don't entirely have my head wrapped around yet is the units used for some of the configuration.
For example, with a 360 cycles/rev quad encoder, are we supposed to use
Code:
talon.configEncoderCodesPerRev(360)
or
Code:
talon.configEncoderCodesPerRev(360 * 4)
We have things working with the former.
Then there is also this
Code:
driveTrain.talon.set(numberOfRevs)
which if we're right is in terms of revolutions (though javadoc says "In Position mode, outputValue is in encoder ticks..."?) and this
Code:
talon.setAllowableClosedLoopErr(allowableError)
which is in terms of cycles (1/360 or 1/(360 *4))? Will nail that down when able to test a bit more.
Again, thanks!