dgfbcg
This commit is contained in:
parent
2b57758fc5
commit
6c93d58f09
@ -31,7 +31,6 @@ import frc.robot.commands.Force5;
|
||||
import frc.robot.commands.Force6;
|
||||
import frc.robot.commands.Force7;
|
||||
import frc.robot.commands.LanceurAuto;
|
||||
import frc.robot.commands.Force1;
|
||||
import frc.robot.commands.AvancerGauche;
|
||||
import frc.robot.commands.accumulateurtest;
|
||||
import frc.robot.subsystems.Accumulateur;
|
||||
|
@ -38,18 +38,16 @@ public class Avancer extends CommandBase {
|
||||
// Called every time the scheduler runs while the command is scheduled.
|
||||
@Override
|
||||
public void execute() {
|
||||
drive.drive(0.5, 0.2, 0);
|
||||
drive.drive(0.5, -0.2, 0);
|
||||
}
|
||||
|
||||
// Called once the command ends or is interrupted.
|
||||
@Override
|
||||
public void end(boolean interrupted) {
|
||||
drive.drive(0, 0, 0);
|
||||
}
|
||||
public void end(boolean interrupted) {}
|
||||
|
||||
// Returns true when the command should end.
|
||||
@Override
|
||||
public boolean isFinished() {
|
||||
return drive.distance()[0].distanceMeters>0.01;
|
||||
return drive.distance()[0].distanceMeters>1;
|
||||
}
|
||||
}
|
||||
|
@ -31,7 +31,7 @@ public class Force1 extends CommandBase {
|
||||
// Called every time the scheduler runs while the command is scheduled.
|
||||
@Override
|
||||
public void execute() {
|
||||
lanceur.lancer(0.3);
|
||||
lanceur.lancer(0.33);
|
||||
}
|
||||
|
||||
// Called once the command ends or is interrupted.
|
||||
|
@ -24,7 +24,7 @@ public class LanceurAuto extends CommandBase {
|
||||
// Called every time the scheduler runs while the command is scheduled.
|
||||
@Override
|
||||
public void execute() {
|
||||
lanceur.lancer(0.75);
|
||||
lanceur.lancer(0.755);
|
||||
}
|
||||
|
||||
// Called once the command ends or is interrupted.
|
||||
|
@ -7,25 +7,15 @@ package frc.robot.subsystems;
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
|
||||
import edu.wpi.first.cameraserver.CameraServer;
|
||||
import edu.wpi.first.math.geometry.Translation2d;
|
||||
import edu.wpi.first.math.kinematics.SwerveModulePosition;
|
||||
import edu.wpi.first.wpilibj.Filesystem;
|
||||
import edu.wpi.first.wpilibj.shuffleboard.BuiltInLayouts;
|
||||
import edu.wpi.first.wpilibj.shuffleboard.Shuffleboard;
|
||||
import edu.wpi.first.wpilibj.shuffleboard.ShuffleboardLayout;
|
||||
import com.revrobotics.CANSparkMax;
|
||||
import com.revrobotics.CANSparkMaxLowLevel.MotorType;
|
||||
|
||||
import edu.wpi.first.math.geometry.Translation2d;
|
||||
import edu.wpi.first.math.kinematics.SwerveModulePosition;
|
||||
import edu.wpi.first.wpilibj.Filesystem;
|
||||
import edu.wpi.first.wpilibj.shuffleboard.Shuffleboard;
|
||||
import edu.wpi.first.wpilibj.shuffleboard.ShuffleboardTab;
|
||||
import edu.wpi.first.wpilibj2.command.SubsystemBase;
|
||||
import frc.robot.Constants;
|
||||
import swervelib.SwerveDrive;
|
||||
import swervelib.encoders.CanAndCoderSwerve;
|
||||
import swervelib.parser.SwerveParser;
|
||||
|
||||
public class Drive extends SubsystemBase {
|
||||
@ -49,7 +39,7 @@ public class Drive extends SubsystemBase {
|
||||
final CanAndCoderSwerve arrieregaucheangle = new CanAndCoderSwerve(Constants.arrieregaucheAngle);
|
||||
final CanAndCoderSwerve arrieredroitangle = new CanAndCoderSwerve(Constants.arrieredroitAngle); */
|
||||
public void drive(double x, double y, double zRotation){
|
||||
swerveDrive.drive(new Translation2d(x, y), zRotation, false, false);
|
||||
swerveDrive.drive(new Translation2d(x, y), zRotation, true, false);
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user