limelight avec tourelle

This commit is contained in:
Antoine 2024-10-30 19:27:41 -04:00
parent 9804a3cfbf
commit f1406f0db0
2 changed files with 5 additions and 5 deletions

View File

@ -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.

View File

@ -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());