|
Re: Detecting If We're Competing
TL;DR: Set a flag in your autonomous routine, only triggered when you are playing a real game or during "practice" on driver station.
We are going to be doing something different on the real field then at our pits with one of presets on the robot we are building and I had a similar problem.
I will tell you how I plan to only allow a preset when we are in the pits versus during the actual game and you can see if it applies for you.
Basically, we use IterativeRobot in Java and C++ and we are setting a flag during the autonomous portion. While that flag is tripped, then we are in a real game and as such I do not want to return to our start position of the robot. When it is not tripped, that means we just flipped the driver station to teleop and are playing around in the pit and I will allow the robot to be returned to start position automatically then.
|