Shooter works, swerve works, camera setup (im geekin)

This commit is contained in:
Abhishrek05
2024-02-08 19:52:36 -07:00
parent b9b4f09a32
commit 7947f74a66
3 changed files with 10 additions and 8 deletions
+1 -1
View File
@@ -155,7 +155,7 @@ public final class Constants {
public static final class ShooterConstants {
public static final int LEFT_SHOOTER_ID = 15; // final
public static final int RIGHT_SHOOTER_ID = 16; // final
public static final double SHOOTER_SPEED = 0.8; // final
public static final double SHOOTER_SPEED = 1; // final
}
public static final class IntakeConstants {
+2
View File
@@ -7,6 +7,7 @@
package frc4388.robot;
import edu.wpi.first.cameraserver.CameraServer;
import edu.wpi.first.wpilibj.TimedRobot;
import edu.wpi.first.wpilibj2.command.Command;
import edu.wpi.first.wpilibj2.command.CommandScheduler;
@@ -35,6 +36,7 @@ public class Robot extends TimedRobot {
// Instantiate our RobotContainer. This will perform all our button bindings, and put our
// autonomous chooser on the dashboard.
m_robotContainer = new RobotContainer();
CameraServer.startAutomaticCapture();
}
/**
@@ -116,17 +116,17 @@ public class RobotContainer {
/* Operator Buttons */
new JoystickButton(getDeadbandedOperatorController(), XboxController.B_BUTTON)
new JoystickButton(getDeadbandedDriverController(), XboxController.B_BUTTON)
.onTrue(new InstantCommand(() -> m_robotShooter.spin(), m_robotShooter))
.onFalse(new InstantCommand(() -> m_robotShooter.stop(), m_robotShooter));
new JoystickButton(getDeadbandedOperatorController(), XboxController.A_BUTTON)
.onTrue(new InstantCommand(() -> new RotateIntakeToPosition(m_robotIntake, 360).execute(), m_robotIntake))
.onFalse(new InstantCommand(() -> new RotateIntakeToPosition(m_robotIntake, 0).execute(), m_robotShooter));
// new JoystickButton(getDeadbandedOperatorController(), XboxController.A_BUTTON)
// .onTrue(new InstantCommand(() -> new RotateIntakeToPosition(m_robotIntake, 360).execute(), m_robotIntake))
// .onFalse(new InstantCommand(() -> new RotateIntakeToPosition(m_robotIntake, 0).execute(), m_robotShooter));
new JoystickButton(getDeadbandedOperatorController(), XboxController.Y_BUTTON)
.onTrue(new InstantCommand(() -> m_robotIntake.spinIntakeMotor()))
.onFalse(new InstantCommand(() -> m_robotIntake.stopIntakeMotors()));
// new JoystickButton(getDeadbandedOperatorController(), XboxController.Y_BUTTON)
// .onTrue(new InstantCommand(() -> m_robotIntake.spinIntakeMotor()))
// .onFalse(new InstantCommand(() -> m_robotIntake.stopIntakeMotors()));
}