When you are using the timed option on a controller, it has a 3 second countdown time before the program starts. This is the time the controller allows the program to run its pre-auton. However, if your pre-auton runs for longer than 3 seconds it won’t run the autonomous function.
Timed competition option (on controller) for programming will not run your autonomous if your pre-auton last longer than 3 seconds
It should always run the autonomous task. But if pre-auton is taking longer than 3 seconds it will also continue to run. What are you doing that takes so long ?
Almost sounds like a feature
Why should you expect to have loads of time to initialize variables?
There are plenty of reasonable things to do in pre-auton that are bound to take time.
Good gyro calibration used to take quite some time on Cortex and you may want to explicitly calibrate gyro on V5 in pre-auton too.
You could be building non-trivial UI for your telemetry (though the CPU in V5 is rather fast and the pixels are few).
But the best example of something necessarily slow is self-calibration of mechanisms. If you have a slow mechanism and need to move it to some well-defined spot and reset the encoder there, it will take time.
Oh, and I completely forgot the slowest of the things: Human in the loop.
What if you have one unified program with interactive auton selection? The built-in timed run then becomes completely useless unless you hard-code your pick for the time being.
At that point, using the external manual competition switch becomes better option (except for the timing aspect), also matching the tournament experience more closely.
Then using the controller for a timed run is certainly not appropriate.
and what I would recommend.
I was really mostly forced by my coaches to post this problem; I assume they wanted to draw attention to it? Also, to answer the question about what would take longer than 3 seconds: Our team has an autonomous selector that will select an autonomous by default if a program isn’t selected in a small amount of time. That amount of time, however, was longer than 3 seconds. Thus, how we came across this issue.
welp there you go - you need a match controller :(. or could you use a second V5 Brain with Skills Field Control to achieve your desired results. I do know there are events that will use this V5 Brain approach.
never mind - you want both 15 autonomous and 1:45 driver ?
I was more worried about timing skills runs, so we just ended up copying the file and removing the autonomous selector, but I am going to see if I can find a competition switch in the future.
You can get the official vex Competition switch here - VEXnet Competition Switch - VEX Robotics
Or, if you have some experience with electronics, you can try to build something like this. Self-Timing Competition Switch | Online Challenges - There is a schematic within the PDF, and the code for it is rather simple - basically, in a constant loop, it checks how much time has passed since the last time the button was pressed, which pin of the slector is grounded and adjusts the output to the controller automatically. This means it’s highly configurable and able to time itself. I’ll post an update once I publish the design and documentation.