avance
This commit is contained in:
@@ -151,7 +151,7 @@ public class RobotContainer {
|
|||||||
elevateur.setDefaultCommand(new RunCommand(()->{
|
elevateur.setDefaultCommand(new RunCommand(()->{
|
||||||
elevateur.vitesse(MathUtil.applyDeadband(manette2.getLeftY()*manette2.getLeftY()*manette2.getLeftY(), 0.05));
|
elevateur.vitesse(MathUtil.applyDeadband(manette2.getLeftY()*manette2.getLeftY()*manette2.getLeftY(), 0.05));
|
||||||
}, elevateur));
|
}, elevateur));
|
||||||
|
|
||||||
//Reset encodeur
|
//Reset encodeur
|
||||||
manette2.start().whileTrue(new reset(elevateur, pince, requin));
|
manette2.start().whileTrue(new reset(elevateur, pince, requin));
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -50,11 +50,14 @@ public class AprilTag3 extends Command {
|
|||||||
double a = limelight3.getTx();
|
double a = limelight3.getTx();
|
||||||
double b = (limelight3.getTA()*100) / (Math.cos(90-limelight3.getTx()));
|
double b = (limelight3.getTA()*100) / (Math.cos(90-limelight3.getTx()));
|
||||||
if(limelight3.getV() == true){
|
if(limelight3.getV() == true){
|
||||||
|
if(limelight3.getTA() > 1.2){
|
||||||
drivetrain.setControl(drive.
|
drivetrain.setControl(drive.
|
||||||
withRotationalRate(a/20).
|
withRotationalRate(a/20).
|
||||||
withVelocityX(0).
|
withVelocityX(0).
|
||||||
withVelocityY( b/50));
|
withVelocityY( b/50));
|
||||||
System.out.println(b/50);
|
System.out.println(b/50);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
drivetrain.setControl(drive.
|
drivetrain.setControl(drive.
|
||||||
|
|||||||
Reference in New Issue
Block a user