I've been reading on chief delphi that the data is not always immediately available at the exact start of the match. The way we're doing it right now will fail if the data is not available when autonomousInit is called. So, we need to add a safeguard.
There are a couple different ways to do this.
Add a "retry" loop in autonomousInit. Retry x amount of times before switching to a default drive forward command (so robot doesn't just sit there if game data isn't available for some reason).
Check for it in autonomousPeriodic. I'm not sure if this would work. We'd have to add an if to only run the scheduler if the game data is set or max retries has been exceeded.
What do you think @xpctr3v0lut1on?
We'll have to experiment with it. Practice matches are going to be vital to test this out.
I've been reading on chief delphi that the data is not always immediately available at the exact start of the match. The way we're doing it right now will fail if the data is not available when autonomousInit is called. So, we need to add a safeguard.
There are a couple different ways to do this.
What do you think @xpctr3v0lut1on? We'll have to experiment with it. Practice matches are going to be vital to test this out.