This commit is contained in:
		| @@ -19,7 +19,7 @@ public class Lancer extends Command { | ||||
|     this.limelight = limelight; | ||||
|     this.lanceur = lanceur; | ||||
|     // Use addRequirements() here to declare subsystem dependencies. | ||||
|     addRequirements(lanceur,limelight); | ||||
|     addRequirements(lanceur); | ||||
|   } | ||||
|  | ||||
|   // Called when the command is initially scheduled. | ||||
|   | ||||
| @@ -17,7 +17,7 @@ public class Lancerampli extends Command { | ||||
|   private Limelight limelight; | ||||
|   public Lancerampli(Lanceur lanceur,Limelight limelight) { | ||||
|     // Use addRequirements() here to declare subsystem dependencies. | ||||
|     addRequirements(lanceur, limelight); | ||||
|     addRequirements(lanceur); | ||||
|     this.limelight = limelight; | ||||
|     this.lanceur = lanceur; | ||||
|   } | ||||
|   | ||||
| @@ -29,6 +29,7 @@ public class Limelight_tracker extends Command { | ||||
|  | ||||
|     if (tracker.getv()){ | ||||
|       drive.drive(0,0, tracker.getx()); | ||||
|        | ||||
|       } | ||||
|       else{ | ||||
|         drive.drive(0, 0, 0); | ||||
|   | ||||
| @@ -32,6 +32,11 @@ public class Drive extends SubsystemBase { | ||||
|   } | ||||
|    | ||||
|   public Drive() { | ||||
|      try { | ||||
|       this.swerveDrive = new SwerveParser(swerveJsonDirectory).createSwerveDrive(2); | ||||
|     } catch (IOException e) { | ||||
|       e.printStackTrace(); | ||||
|     } | ||||
|     AutoBuilder.configureHolonomic(swerveDrive::getPose, swerveDrive::resetOdometry, swerveDrive::getRobotVelocity, swerveDrive::setChassisSpeeds, new HolonomicPathFollowerConfig( | ||||
|       new PIDConstants(5,0,0), new PIDConstants(5,0,0), 4.5, | ||||
|       0.275, | ||||
| @@ -43,11 +48,6 @@ public class Drive extends SubsystemBase { | ||||
|         } | ||||
|         return false; | ||||
|          }, this); | ||||
|      try { | ||||
|       this.swerveDrive = new SwerveParser(swerveJsonDirectory).createSwerveDrive(2); | ||||
|     } catch (IOException e) { | ||||
|       e.printStackTrace(); | ||||
|     } | ||||
|   } | ||||
|  | ||||
|   public SwerveModulePosition[] distance(){ | ||||
|   | ||||
		Reference in New Issue
	
	Block a user