limelight avec tourelle
This commit is contained in:
		| @@ -32,11 +32,11 @@ public class FollowAprilTag extends Command { | |||||||
|  |  | ||||||
|     if (enlignement.getv()==1) |     if (enlignement.getv()==1) | ||||||
|     { |     { | ||||||
|       drive.drive(0, 0, enlignement.getx()/30); |       lanceur.tourelRotation(0,0, enlignement.getx()/30); | ||||||
|     } |     } | ||||||
|     else |     else | ||||||
|     { |     { | ||||||
|       drive.drive(0, 0, 0); |       lanceur.tourelRotation(0, 0, 0); | ||||||
|     } |     } | ||||||
|  |  | ||||||
|   } |   } | ||||||
| @@ -44,7 +44,7 @@ public class FollowAprilTag extends Command { | |||||||
|   // Called once the command ends or is interrupted. |   // Called once the command ends or is interrupted. | ||||||
|   @Override |   @Override | ||||||
|   public void end(boolean interrupted) { |   public void end(boolean interrupted) { | ||||||
|     drive.drive(0, 0, 0); |     lanceur.tourelRotation(0, 0, 0); | ||||||
|   } |   } | ||||||
|  |  | ||||||
|   // Returns true when the command should end. |   // Returns true when the command should end. | ||||||
|   | |||||||
| @@ -36,8 +36,8 @@ public class Lanceur extends SubsystemBase { | |||||||
|   public void lance(double vitesse){ |   public void lance(double vitesse){ | ||||||
|     lanceur1.set(vitesse); |     lanceur1.set(vitesse); | ||||||
|   } |   } | ||||||
|   public void tourelRotation(double vitesse){ |   public void tourelRotation(double x, double y, double rotation){ | ||||||
|     tourelle.set(vitesse); |     tourelle.set(rotation); | ||||||
|   } |   } | ||||||
|   public double distancetourel(){ |   public double distancetourel(){ | ||||||
|     return(tourelle.getEncoder().getPosition()); |     return(tourelle.getEncoder().getPosition()); | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user