This commit is contained in:
Antoine PerreaultE 2023-12-05 19:17:47 -05:00
parent 92325aebca
commit 56d9774135
2 changed files with 5 additions and 4 deletions

View File

@ -3,6 +3,7 @@
// the WPILib BSD license file in the root directory of this project.
package frc.robot;
import edu.wpi.first.cameraserver.CameraServer;
import edu.wpi.first.math.MathUtil;
import edu.wpi.first.networktables.GenericEntry;
import edu.wpi.first.wpilibj.shuffleboard.BuiltInLayouts;
@ -32,8 +33,6 @@ public class RobotContainer {
Lanceur lanceur = new Lanceur();
Accumulateur accumulateur = new Accumulateur();
ShuffleboardTab dashboard = Shuffleboard.getTab("Dashboard");
ShuffleboardLayout forces = Shuffleboard.getTab("Dashboard")
.getLayout("forces", BuiltInLayouts.kList)
@ -50,7 +49,7 @@ public class RobotContainer {
CommandJoystick joystick1 = new CommandJoystick(0);
Drive drive = new Drive();
public RobotContainer() {
CameraServer.startAutomaticCapture();
configureBindings();
drive.setDefaultCommand(new RunCommand(()->{
drive.drive(-joystick1.getY(), -joystick1.getX(), MathUtil.applyDeadband(-joystick1.getZ(), 0.2));

View File

@ -23,6 +23,7 @@ public class Drive extends SubsystemBase {
}
/** Creates a new Drive. */
public Drive() {
try {
@ -31,6 +32,7 @@ public class Drive extends SubsystemBase {
e.printStackTrace();
}
}
public SwerveModulePosition[] distance(){
return swerveDrive.getModulePositions();
}