Quote:
Originally Posted by cgmv123
Timer.delay() is supposed to leave outputs set where they are as well, but I've had more success using Timer.getFPGATimestamp() in conjunction with a loop.
|
This is critical to understand.
Our team had similar requirements surrounding our catapult (do X, wait half a second, then do Y). Originally the programmers implemented this using Timer.delay().
The result was that when the drivers tried to perform the action while moving, but then stopped moving or changed directions during the action, the robot would keep moving.
Though .5 seconds doesn't sound like much, it is plenty of time for your robot to go just a little too far and injure someone, break something, or get you a penalty for going too far outside the arena.
Use Timer.delay() with caution.