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)
{
drive.drive(0, 0, enlignement.getx()/30);
lanceur.tourelRotation(0,0, enlignement.getx()/30);
}
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.
@Override
public void end(boolean interrupted) {
drive.drive(0, 0, 0);
lanceur.tourelRotation(0, 0, 0);
}
// Returns true when the command should end.

View File

@ -36,8 +36,8 @@ public class Lanceur extends SubsystemBase {
public void lance(double vitesse){
lanceur1.set(vitesse);
}
public void tourelRotation(double vitesse){
tourelle.set(vitesse);
public void tourelRotation(double x, double y, double rotation){
tourelle.set(rotation);
}
public double distancetourel(){
return(tourelle.getEncoder().getPosition());