frc5517 / PowerUp2018

Code for Luigi, Team 5517's robot for the 2018 FRC Game: FIRST Power Up
MIT License
2 stars 1 forks source link

FMS game data: may need to check for it more than just once in autonomousInit #2

Closed nathan815 closed 6 years ago

nathan815 commented 6 years ago

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.

  1. 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).
  2. 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.

nathan815 commented 6 years ago

After Kettering it is apparent that this isn't needed.