View Single Post
  #1   Spotlight this post!  
Unread 10-04-2012, 12:45
Batman Batman is offline
Registered User
AKA: Evan Wiederspan
FRC #3663 (CPR)
Team Role: Programmer
 
Join Date: Feb 2012
Rookie Year: 2012
Location: Bothell, WA
Posts: 4
Batman is an unknown quantity at this point
SetSafetyEnabled() and SetExpiration()

During the beginning of the season, our robot had about a quarter to a half second of lag, which I thought was just caused by a bad wireless connection. Then I noticed that all of the motors in the code (there are about 7) were set as follows:

motor1->SetSafetyEnabled(true);
motor1->SetExpiration(0.1);

So just because I had some free time I changed these settings on all the motors to the following:

motor1->SetSafetyEnabled(false);
motor1->SetExpiration(0.5);

When I did this, the robot started to run without any lag at all. What exactly do these functions do, and does anyone have any idea on how they would cause lag with the previous settings?
Reply With Quote