|
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?
|