|
Re: SetSafetyEnabled() and SetExpiration()
If SetSafetyEnabled is false, then the SetExpiration doesn't matter.
These are safeties for the drive motors that shut them down if the code goes for too long (.1 second as specified by SetExpiration) without setting the motor power. It's there to protect you, from infinite code loops or usually during debugging when you could set the motor speed and have a breakpoint that allows the robot to keep running without stopping or responding to driver controls.
If that solved your issue, then it can mean your code is laggy and not running as fast as you want it to (doing too much or having delays in your code), or your code is structured so that you aren't revisiting the motor often enough (set and leave until a change is necessary). Check the Charts tab of the Driver Station to see what communication delays may be happening.
You can run on the field without the Safety, but make sure the robot's up on blocks if you're running in debug with breakpoints set.
__________________
"Rationality is our distinguishing characteristic - it's what sets us apart from the beasts." - Aristotle
Last edited by Mark McLeod : 10-04-2012 at 14:01.
|