-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
35 additions
and
41 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
38 changes: 17 additions & 21 deletions
38
src/main/java/org/robolancers321/subsystems/intake/commands/RunIntake.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,31 +1,27 @@ | ||
package frc.robot.commands; | ||
/* (C) Robolancers 2024 */ | ||
package org.robolancers321.intake.commands; | ||
|
||
import edu.wpi.first.wpilibj2.command.CommandBase; | ||
import edu.wpi.first.wpilibj2.command.SequentialCommandGroup; | ||
import frc.robot.Constants.IntakePID; | ||
import frc.robot.subsystems.Intake; | ||
|
||
public class RunIntake extends CommandBase { | ||
public double velocity; | ||
public double velocity; | ||
|
||
Intake intake; | ||
Intake intake; | ||
|
||
public RunIntake(Intake intake, double velocity) { | ||
this.intake = intake; | ||
this.velocity = velocity; | ||
addRequirements(intake); | ||
} | ||
public RunIntake(Intake intake, double velocity) { | ||
this.intake = intake; | ||
this.velocity = velocity; | ||
addRequirements(intake); | ||
} | ||
|
||
@Override | ||
public void initialize() { | ||
intake.setIntakeVelocity(velocity); | ||
} | ||
|
||
@Override | ||
public void end(boolean interrupted) { | ||
intake.setIntakeVelocity(0); | ||
} | ||
@Override | ||
public void initialize() { | ||
intake.setIntakeVelocity(velocity); | ||
} | ||
|
||
@Override | ||
public void end(boolean interrupted) { | ||
intake.setIntakeVelocity(0); | ||
} | ||
} | ||
|
||
|
35 changes: 17 additions & 18 deletions
35
src/main/java/org/robolancers321/subsystems/intake/commands/RunOuttake.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,28 +1,27 @@ | ||
package frc.robot.commands; | ||
/* (C) Robolancers 2024 */ | ||
package org.robolancers321.intake.commands; | ||
|
||
import edu.wpi.first.wpilibj2.command.CommandBase; | ||
import edu.wpi.first.wpilibj2.command.SequentialCommandGroup; | ||
import frc.robot.Constants.IntakePID; | ||
import frc.robot.subsystems.Intake; | ||
|
||
public class RunOuttake extends CommandBase { | ||
public double velocity; | ||
public double velocity; | ||
|
||
Intake intake; | ||
Intake intake; | ||
|
||
public RunOuttake(Intake intake, double velocity) { | ||
this.intake = intake; | ||
this.velocity = velocity; | ||
addRequirements(intake); | ||
} | ||
public RunOuttake(Intake intake, double velocity) { | ||
this.intake = intake; | ||
this.velocity = velocity; | ||
addRequirements(intake); | ||
} | ||
|
||
@Override | ||
public void initialize() { | ||
intake.setIntakeVelocity(-velocity); | ||
} | ||
@Override | ||
public void initialize() { | ||
intake.setIntakeVelocity(-velocity); | ||
} | ||
|
||
@Override | ||
public void end(boolean interrupted) { | ||
intake.setIntakeVelocity(0); | ||
} | ||
@Override | ||
public void end(boolean interrupted) { | ||
intake.setIntakeVelocity(0); | ||
} | ||
} |