|
Re: Position and velocity PIDControllers using same encoder
Quote:
Originally Posted by GeeTwo
Again, it's a matter of weighing the ugly, but perhaps you could free the encoder you aren't using (if I understand correctly, setting the variable(s) referencing it to null and possibly running garbage collection will accomplish this), then initiate the new one.
|
If I were never going to use them at the same time, this would probably work - but, as mentioned earlier in the thread, the notion is to run a cascading control loop on a turret where the position controller outputs to a velocity controller using the same encoder.
__________________
"Mmmmm, chain grease and aluminum shavings..."
"The breakfast of champions!"
Member, FRC Team 449: 2007-2010
Drive Mechanics Lead, FRC Team 449: 2009-2010
Alumnus/Technical Mentor, FRC Team 449: 2010-Present
Lead Technical Mentor, FRC Team 4464: 2012-2015
Technical Mentor, FRC Team 5830: 2015-2016
|