-
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
d2bc1e7
commit 6fb0f6a
Showing
1 changed file
with
27 additions
and
1 deletion.
There are no files selected for viewing
28 changes: 27 additions & 1 deletion
28
src/main/java/frc/robot/subsystems/gateway/GatewayIOHardware.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,5 +1,31 @@ | ||
package frc.robot.subsystems.gateway; | ||
|
||
import frc.robot.hardwareWrappers.RelaySolenoid; | ||
import frc.robot.hardwareWrappers.Transducer; | ||
|
||
public class GatewayIOHardware implements GatewayIO { | ||
// | ||
private GatewayIOInput input; | ||
private RelaySolenoid solenoid; | ||
private Transducer transducer; | ||
|
||
public GatewayIOHardware(RelaySolenoid solenoid) { | ||
this.solenoid = solenoid; | ||
} | ||
|
||
@Override | ||
public void updateInputs(GatewayIOInput inputs) { | ||
input.psi = (float) transducer.getTankPSI(); | ||
} | ||
|
||
@Override | ||
public void beginFilling() { | ||
input.filling = true; | ||
solenoid.open(); | ||
} | ||
|
||
@Override | ||
public void stopFilling() { | ||
input.filling = false; | ||
solenoid.close(); | ||
} | ||
} |