diff --git a/src/main/java/frc/robot/RobotContainer.java b/src/main/java/frc/robot/RobotContainer.java index 7fab087..8ee28f8 100644 --- a/src/main/java/frc/robot/RobotContainer.java +++ b/src/main/java/frc/robot/RobotContainer.java @@ -161,10 +161,8 @@ private void configureBindings() { //buton 3 Shooter Manuel subbuffer new JoystickButton(subJoytick, 3).whileTrue(new VisionShooter(m_shooter, m_network)); new JoystickButton(subJoytick, 3).whileTrue(new TurnForShooter(m_network, swerveSubsystem)); - //new JoystickButton(subJoytick, 3).whileTrue(new InstantCommand(() -> m_joystick.shooterdegistiraktif())); //new JoystickButton(subJoytick, 3).whileTrue(new InstantCommand(() -> m_joystick.shooterkayma(m_shooter.getMappedOutput()))); - //new JoystickButton(subJoytick, 7).whileTrue(new ShooterSetDegree(m_shooter, () -> m_joystick.returnshooterdegeri())); new JoystickButton(subJoytick, 7).whileTrue(new InstantCommand(()-> m_shooter.ShooterThrowMotorOutput(-1))); new JoystickButton(subJoytick, 7).whileFalse(new InstantCommand(()-> m_shooter.ShooterThrow1MotorStop())); diff --git a/src/main/java/frc/robot/subsystems/NetworkSubsystem.java b/src/main/java/frc/robot/subsystems/NetworkSubsystem.java index 4fe3827..39de7ae 100644 --- a/src/main/java/frc/robot/subsystems/NetworkSubsystem.java +++ b/src/main/java/frc/robot/subsystems/NetworkSubsystem.java @@ -14,7 +14,7 @@ public class NetworkSubsystem extends SubsystemBase { double apriltag_x_value; double apriltag_y_value; double apriltag_target_value; - + ShooterSubsystem m_shooter; public NetworkTableInstance inst = NetworkTableInstance.getDefault(); //table @@ -28,6 +28,9 @@ public class NetworkSubsystem extends SubsystemBase { public NetworkTableEntry apriltag_y = networkTable.getEntry("apriltag_y"); public NetworkTableEntry apriltag_target = networkTable.getEntry("apriltag_target"); + public NetworkTableEntry apriltag_reverse = networkTable.getEntry("apriltag_reverse"); + + public NetworkSubsystem() { // inst.setServerTeam(7672); //inst.startServer("10.76.72.2"); @@ -57,6 +60,8 @@ public void periodic() { SmartDashboard.putNumber("apriltag x value", apriltag_x_value); SmartDashboard.putNumber("apriltag y value", apriltag_y_value); SmartDashboard.putBoolean("connection",inst.isConnected()); + + apriltag_reverse.setBoolean(m_shooter.whichSide()); }