Hey all, so I think I’m dealing with a weird race condition here, and I need another set of eyes on this.
So here’s the intention. We want when a button is pressed, our intake to tilt to a specific position, then shoot the note through our shooter. It’s supposed to be waiting for the intake to get to it’s given position. Sometimes, this works properly. Sometimes, it immediately shoots the note out.
For code, the command starts in RobotContainer.java at line 119. The code is here.
For context. m_pickupSubsytem is our tilting arm, and m_shooterSubsystem is our actual shooter. We run the shooter during the entire command, so that way it has time to spin up, but the intake is what holds the note until it’s shot.
Any help would be greatly appreciated, and if there’s any other context you need from me, just let me know. Thanks all!
You appear to be checking for out of bounds… is above range OR is it below range. If I am reading this right, it will return true when out of range and false when in range.