mode auto
This commit is contained in:
@@ -24,6 +24,7 @@ public class Limelighter extends Command {
|
||||
double botx;
|
||||
double boty;
|
||||
double angle;
|
||||
double calcul;
|
||||
private final SwerveRequest.FieldCentric drive = new SwerveRequest.FieldCentric()
|
||||
.withDeadband(MaxSpeed * 0.1).withRotationalDeadband(MaxAngularRate * 0.1)
|
||||
.withDriveRequestType(DriveRequestType.OpenLoopVoltage);
|
||||
@@ -55,7 +56,7 @@ public class Limelighter extends Command {
|
||||
if(angle >180){
|
||||
angle =- 360;
|
||||
}
|
||||
double calcul = limelight3g.Calcule(botx, 4, boty, 4.6, angle) / 20;
|
||||
calcul = limelight3g.Calcule(botx, 4, boty, 4.6, angle) / 5;
|
||||
drivetrain.setControl(
|
||||
drive.withVelocityX(0).withVelocityY(0).withRotationalRate(calcul));
|
||||
System.out.println(calcul);
|
||||
|
||||
Reference in New Issue
Block a user