|
Re: PIDSubsystem works once then disables the entire RobotDrive
Quote:
Originally Posted by pblankenbaker
It looks to me like your DriveToDistance command will only work one time the way you have it coded. The "go" flag was being set to "false" in the original end() method in the original implementation. Once the flag is set to false, then your drive train PID was never enabled on any subsequent invocation (until you power cycle).
You may also want to add a time out parameter to your command. For example, if you know it should always take less than 5 seconds for the command to complete, set the timeout to 5 seconds to make sure you get back manual control should something go wrong in reaching the set point (like a broken encoder).
|
Good catch!
Both of these suggestions look solid to me.
__________________
"Never let your schooling interfere with your education" -Mark Twain
|