Skip to content

Commit

Permalink
Mostly done hardware io layer
Browse files Browse the repository at this point in the history
  • Loading branch information
AceiusRedshift committed Nov 20, 2024
1 parent d2bc1e7 commit 6fb0f6a
Showing 1 changed file with 27 additions and 1 deletion.
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();
}
}

0 comments on commit 6fb0f6a

Please sign in to comment.