-
Notifications
You must be signed in to change notification settings - Fork 0
Shooter
Shoots the ball to the tower using velocity, measured in encoder ticks per 100 ms.
The shooter currently uses 2 motors: the leftShootMotor
and the rightShootMotor
. They are currently not officially assigned to any ports.
The periodic of the subsystem is mainly used for putting useful information on Shuffleboard.
Here is a list of all the information put on the Shuffleboard:
- Shooter Motor 1 Velocity
- Shooter Motor 2 Velocity
- Shooter Motor 1 Temperature
- Shooter Motor 2 Temperature
- Whether either motor is above 70 degrees Celsius
- It is programmed that if the shooter motors ever reach such a high temperature, they will not be able to be controlled.
- If the shooter is in a certain range of velocity
- The value of an infrared sensor on the shooter that records whether a ball is in front of it or not
During debug mode, the Shuffleboard also records the highest motor velocity reached in the current run.
*Note: velocity is measured in encoder ticks per 100 milliseconds (ms)
The setShooterSpeeed(double velocity)
method is used to set the speed of the motors. The parameter velocity is the target speed (in encoder ticks per 100 ms) for the motors to reach using PIDs.
The stopShooter()
method stops the shooter motors by setting their power input to 0. This safely slows the motors from high speeds.
The int calculateLeftRPM()
and int calculateRightRPM()
methods calculate and return the RPM of the motors using their current speed.
Starts the shooter motors and gets them up to a certain speed. The subsystem that is using the command is required as the first parameter. A velocity is required as a second parameter.
Stops the shooter motors and gets them up to a certain speed. The subsystem that is using the command is required as the parameter.
Team 2337, the EngiNERDS | 2020 Infinite Recharge