-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
made a little Mechanism2d thing for the intake and added the calibrat…
…ion for the intake
- Loading branch information
Showing
9 changed files
with
134 additions
and
31 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
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
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 |
---|---|---|
@@ -0,0 +1,34 @@ | ||
package frc.robot.commands; | ||
|
||
import edu.wpi.first.wpilibj.Timer; | ||
import edu.wpi.first.wpilibj2.command.CommandBase; | ||
import frc.robot.subsystems.intake.Intake; | ||
|
||
public class ZeroModeMotor extends CommandBase { | ||
|
||
Timer timer = new Timer(); | ||
Intake intake; | ||
|
||
public ZeroModeMotor(Intake intake) { | ||
addRequirements(intake); | ||
this.intake = intake; | ||
} | ||
|
||
public void initialize() { | ||
timer.restart(); | ||
intake.startModeMotorZeroing(); | ||
} | ||
|
||
public void execute() { | ||
intake.setZeroModeVoltage(-3.0); | ||
} | ||
|
||
public void end(boolean interrupted) { | ||
intake.endModeMotorZeroing(); | ||
} | ||
|
||
public boolean isFinished() { | ||
return timer.hasElapsed(1.0); | ||
} | ||
|
||
} |
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
23 changes: 17 additions & 6 deletions
23
src/main/java/frc/robot/subsystems/intake/IntakeIOSim.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
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