Rework Command Constructors to Make Sense

Subsystems passed through the command are requirements, while subsystems gotten from other subsystems in the constructor are for reference only.
This commit is contained in:
Keenan D. Buckley
2020-03-03 00:12:38 -07:00
parent 8f6578a47b
commit 1b603d4f5d
8 changed files with 32 additions and 31 deletions
@@ -7,14 +7,13 @@
package frc4388.robot.commands.shooter;
import edu.wpi.first.wpilibj.smartdashboard.SmartDashboard;
import edu.wpi.first.wpilibj2.command.CommandBase;
import frc4388.robot.subsystems.Shooter;
import frc4388.robot.subsystems.ShooterHood;
public class HoodPositionPID extends CommandBase {
ShooterHood m_shooterHood;
double firingAngle;
private ShooterHood m_shooterHood;
/**
* Creates a new HoodPositionPID.
*/
@@ -49,7 +48,7 @@ public class HoodPositionPID extends CommandBase {
public boolean isFinished() {
double encoderPos = m_shooterHood.m_angleAdjustMotor.getEncoder().getPosition();
if(encoderPos < firingAngle + 1 || encoderPos < firingAngle - 1){
return false;
return true;
}
return false;
}