generated from Frc5572/Java-Template
-
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.
- Loading branch information
1 parent
317b98d
commit 6c1f5f1
Showing
5 changed files
with
75 additions
and
37 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
29 changes: 29 additions & 0 deletions
29
src/main/java/frc/robot/subsystems/indexer/IndexerIOSim.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 |
---|---|---|
@@ -0,0 +1,29 @@ | ||
package frc.robot.subsystems.indexer; | ||
|
||
import edu.wpi.first.wpilibj.DigitalInput; | ||
import frc.robot.Constants; | ||
|
||
/** | ||
* Intake IO Layer with real motors and sensors | ||
*/ | ||
public class IndexerIOSim implements IndexerIO { | ||
|
||
private final DigitalInput indexerBeamBrake = | ||
new DigitalInput(Constants.IntakeConstants.INDEXER_BEAM_BRAKE_DIO_PORT); | ||
|
||
/** | ||
* Intake IO Layer with real motors and sensors | ||
*/ | ||
public IndexerIOSim() { | ||
|
||
} | ||
|
||
@Override | ||
public void updateInputs(IndexerInputs inputs) { | ||
inputs.indexerBeamBrake = !indexerBeamBrake.get(); // true == game piece | ||
inputs.indexerRPM = 0; | ||
} | ||
|
||
@Override | ||
public void setIndexerMotorPercentage(double percent) {} | ||
} |
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
26 changes: 26 additions & 0 deletions
26
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
package frc.robot.subsystems.intake; | ||
|
||
import edu.wpi.first.wpilibj.DigitalInput; | ||
import frc.robot.Constants; | ||
|
||
/** | ||
* Intake IO Layer with real motors and sensors | ||
*/ | ||
public class IntakeIOSim implements IntakeIO { | ||
|
||
private final DigitalInput intakeBeamBrake = | ||
new DigitalInput(Constants.IntakeConstants.INTAKE_BEAM_BRAKE_DIO_PORT); | ||
|
||
/** | ||
* Intake IO Layer with real motors and sensors | ||
*/ | ||
public IntakeIOSim() {} | ||
|
||
@Override | ||
public void updateInputs(IntakeInputs inputs) { | ||
inputs.intakeBeamBrake = !intakeBeamBrake.get(); // true == game piece | ||
} | ||
|
||
@Override | ||
public void setIntakeMotorPercentage(double percent) {} | ||
} |