Compare commits

...

2 Commits

Author SHA1 Message Date
Antoine PerreaultE
56b28100df weq 2026-04-01 19:11:30 -04:00
Antoine PerreaultE
db935eceda regle crach 2026-04-01 19:11:09 -04:00

View File

@@ -35,7 +35,7 @@ public class GrimperReservoir extends Command {
double pigeonAngle; double pigeonAngle;
private double MaxSpeed = TunerConstants.kSpeedAt12Volts.in(MetersPerSecond); private double MaxSpeed = TunerConstants.kSpeedAt12Volts.in(MetersPerSecond);
private double MaxAngularRate = RotationsPerSecond.of(0.75).in(RadiansPerSecond); private double MaxAngularRate = RotationsPerSecond.of(0.75).in(RadiansPerSecond);
Optional<Alliance> alliance = DriverStation.getAlliance(); Optional<Alliance> alliance;
private final SwerveRequest.FieldCentric drive = new SwerveRequest.FieldCentric() private final SwerveRequest.FieldCentric drive = new SwerveRequest.FieldCentric()
.withDeadband(MaxSpeed * 0.1).withRotationalDeadband(MaxAngularRate * 0.1) .withDeadband(MaxSpeed * 0.1).withRotationalDeadband(MaxAngularRate * 0.1)
.withDriveRequestType(DriveRequestType.OpenLoopVoltage); .withDriveRequestType(DriveRequestType.OpenLoopVoltage);
@@ -50,7 +50,7 @@ public class GrimperReservoir extends Command {
// Called when the command is initially scheduled. // Called when the command is initially scheduled.
@Override @Override
public void initialize() { public void initialize() {
// alliance = DriverStation.getAlliance(); alliance = DriverStation.getAlliance();
// if(drivetrain.Equipe()){ // if(drivetrain.Equipe()){
// drivetrain.getPigeon2().setYaw(drivetrain.getPigeon2().getYaw().getValueAsDouble()+180); // drivetrain.getPigeon2().setYaw(drivetrain.getPigeon2().getYaw().getValueAsDouble()+180);
// } // }