+The ``Shooter`` subsystem holds a ``PIDController`` and a ``SimpleMotorFeedForward``. They are used by ``shootCommand`` to spin the shooter flywheel to the specified velocity. The calculations and motor setting are performed in a lambda expression that is passed to the ``run`` command factory, which creates a command that repeatedly executes the lambda expression while the command is scheduled. This command runs in parallel (using the ``parallel`` command factory) with another command that waits until the ``PIDController`` reaches the specified velocity, and runs the feeder when the specified velocity is reached. This is command is created with the ``waitUntil`` command factory, which creates a command that does nothing and finishes when ``m_shooterFeedback.atSetpoint`` returns ``true``, and the ``andThen`` decorator which runs the feeders when the previous command is finished.
0 commit comments