mode auto

This commit is contained in:
samuel desharnais
2026-03-24 17:52:09 -04:00
parent a7fb3108ea
commit 7d2b2ea139
18 changed files with 277 additions and 73 deletions

View File

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