File tree Expand file tree Collapse file tree
src/main/java/frc/robot/subsystems/claw Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ package frc .robot .subsystems .claw ;
2+ import edu .wpi .firstwpilibj2 .command .SubsystemBase ;
3+
4+ public class claw extends SubsystemBase {
5+ private final ClawIO io ;
6+ private ClawIOInputsAutoLogged inputs = new ClawIOInputsAutoLogged ();
7+
8+ public Claw (ClawIO io ) {
9+ this .io = io ;
10+ }
11+ @ Overide
12+ public void period () {
13+ io .updateInputs (inputs );
14+ Logger .processInputs (key :“Claw ”, inputs );
15+ }
16+ public Command openClaw () {
17+ return runEnd (
18+ () -> io .open ()
19+ )
20+ }
21+ public Command closeClaw () {
22+ return runEnd (
23+ () -> io .close ()
24+ )
25+ }
26+ public Command stopCommand () {
27+ return runOnce (
28+ () -> io .stop ()
29+ )
30+ }
31+ }
Original file line number Diff line number Diff line change 1- public interface clawIO {
1+ package frc .robot .subsystem .claw ;
2+ import org .littletonrobotics .junction .Autolog ;
3+
4+ public interface ClawIO {
25 @ AutoLog
3- public class clawIOInputs {
6+ public class ClawIOInputs {
47 }
5- public default void updateInputs (clawIOInputs inputs ) {}
8+ public default void updateInputs (ClawIOInputs inputs ) {}
69 public default void setVoltage (double volts ) {}
7- public default void setPosition (double angle ) {}
10+ public default void open (double volts ) {}
11+ public default void close (double volts ) {}
12+ public default void stop () {}
813}
You can’t perform that action at this time.
0 commit comments