Team-5509 / PrincessZeta

2020 Robot
2 stars 0 forks source link

ShootingAutoTimed and IntakeTimed #23

Closed Shalmezad closed 4 years ago

Shalmezad commented 4 years ago

Had to take a bit of time to think about it. There's a slight issue with our auton.

For the shooting command, you're using a combination of intake, ShootingAuto, and WaitNSeconds().

The problem is, Intake and ShootingAuto do not have a way to finish, as they're being handled by a whileHeld button. So the parallel combination command won't move on to the next step.

So, you'll need to make 2 new commands for IntakeTimed and ShootingAutoTimed. The easiest way would be to have these extend the existing commands you have, and:

  1. Override initialize(), and set a timeout (via setTimeout). Don't forget to call super.initialize()
  2. Override isFinished(), and return isTimedOut.

You may also want to consider passing in the time via the constructor.

Afterwards, use these in your parallel command for handling shooting.