Skip to content
This repository has been archived by the owner on Nov 10, 2024. It is now read-only.

Commit

Permalink
intake atıs
Browse files Browse the repository at this point in the history
  • Loading branch information
MorphaxTheDeveloper committed Mar 7, 2024
1 parent 9fab5a0 commit c92ec86
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 4 deletions.
5 changes: 5 additions & 0 deletions src/main/java/frc/robot/RobotContainer.java
Original file line number Diff line number Diff line change
Expand Up @@ -70,10 +70,13 @@ private void configureBindings() {
new JoystickButton(driverJoytick, 10).whileFalse(new InstantCommand(()->m_shooter.ShooterThrowAllMotorStop()));

new JoystickButton(driverJoytick, 1).whileTrue(new dalhacan(m_intake, m_shooter));
new JoystickButton(driverJoytick, 1).whileTrue(new InstantCommand(()->m_intake.degistirmee()));
new JoystickButton(driverJoytick, 3).whileTrue(new ShooterSetDegree(m_shooter, 160.0));
//new JoystickButton(driverJoytick, 4).whileTrue(new cinarcan(m_intake, m_feeder));
new JoystickButton(driverJoytick, 4).whileTrue(new PidIntakeCommand(m_intake, 1.2));
new JoystickButton(driverJoytick, 4).whileTrue(new InstantCommand(()-> m_intake.degistir()));
new JoystickButton(driverJoytick, 1).whileFalse(new InstantCommand(()->m_intake.StopAngleMotor()));

new JoystickButton(driverJoytick, 2).whileTrue(new InstantCommand(()->m_intake.reset()));
new JoystickButton(driverJoytick, 2).whileTrue(new InstantCommand(()->m_shooter.AngleEncoderReset()));

Expand All @@ -93,6 +96,8 @@ private void configureBindings() {
new JoystickButton(driverJoytick, 6).whileFalse(new InstantCommand(()-> m_feeder.stop()));
new JoystickButton(driverJoytick, 8).whileTrue(new InstantCommand(()-> m_intake.runpickupmotor(0.8)));
new JoystickButton(driverJoytick, 8).whileFalse(new InstantCommand(()-> m_intake.runpickupmotor(0)));
new JoystickButton(driverJoytick, 10).whileTrue(new InstantCommand(()-> m_feeder.backward()));
new JoystickButton(driverJoytick, 10).whileFalse(new InstantCommand(()-> m_feeder.stop()));
}


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ public PidIntakeCommand(IntakeSubsystem m_intake, double position) {
else if (position < -m_intake.getRawEncoderOutput()) {
m_intake.NewIntakeMotorOutput(-output * 0.8);
}

});
addRequirements(m_intake);
getController().setTolerance(Constants.values.intake.PidIntakeTolerance);
Expand Down
15 changes: 12 additions & 3 deletions src/main/java/frc/robot/subsystems/IntakeSubsystem.java
Original file line number Diff line number Diff line change
Expand Up @@ -57,22 +57,31 @@ public void getNote(){


public void degistir(){
tekcalisma = true;
tekcalisma = false;
}

public void degistirmee(){
tekcalisma = true;
}


public void runpickupmotorswitch(double a){



public void runpickupmotorswitch(double a){
if(tekcalisma){
while((intakedetector1.get() && intakedetector2.get())){
intakeMotor1.set(a);
}


intakeMotor1.set(0);
}


}






Expand Down

0 comments on commit c92ec86

Please sign in to comment.