View Single Post
  #2   Spotlight this post!  
Unread 10-04-2012, 12:58
Mark McLeod's Avatar
Mark McLeod Mark McLeod is online now
Just Itinerant
AKA: Hey dad...Father...MARK
FRC #0358 (Robotic Eagles)
Team Role: Engineer
 
Join Date: Mar 2003
Rookie Year: 2002
Location: Hauppauge, Long Island, NY
Posts: 8,791
Mark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond repute
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.
Reply With Quote