limelight avec tourelle
This commit is contained in:
parent
9804a3cfbf
commit
f1406f0db0
@ -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.
|
||||
|
@ -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());
|
||||
|
Loading…
x
Reference in New Issue
Block a user