camera
This commit is contained in:
		| @@ -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)); | ||||
|   | ||||
| @@ -23,6 +23,7 @@ public class Drive extends SubsystemBase { | ||||
|   } | ||||
|    | ||||
|    | ||||
|  | ||||
|   /** Creates a new Drive. */ | ||||
|   public Drive() { | ||||
|     try { | ||||
| @@ -31,7 +32,8 @@ public class Drive extends SubsystemBase { | ||||
|       e.printStackTrace(); | ||||
|     } | ||||
|   } | ||||
|    public SwerveModulePosition[] distance(){ | ||||
|  | ||||
|   public SwerveModulePosition[] distance(){ | ||||
|     return swerveDrive.getModulePositions(); | ||||
|   } | ||||
|   @Override | ||||
|   | ||||
		Reference in New Issue
	
	Block a user