Right now the intake can spin regardless of whether it is deployed or retracted. Ideally, we don't want the intake to spin when it is retracted, as this might cause mechanical problems. The robot can only properly pick up balls when the intake is down.
It might be a good idea to add a boolean variable to the Intake subsystem which records the position of the intake. The reverse() and spin() methods can read this variable before setting the motor speed.
We don't want this logic to be visible outside the Intake subsystem. For example, if the main code calls spin(), the intake object should decide whether or not the intake actually spins.
Right now the intake can spin regardless of whether it is deployed or retracted. Ideally, we don't want the intake to spin when it is retracted, as this might cause mechanical problems. The robot can only properly pick up balls when the intake is down.
It might be a good idea to add a
boolean
variable to theIntake
subsystem which records the position of the intake. Thereverse()
andspin()
methods can read this variable before setting the motor speed.We don't want this logic to be visible outside the
Intake
subsystem. For example, if the main code callsspin()
, the intake object should decide whether or not the intake actually spins.https://github.com/team4015/Infinite-Recharge-Robot-Rebuild-2021/blob/cf6f46c7daa3b0da155305cf765489b92212fbc4/src/main/java/frc/robot/subsystems/Intake.java#L31