Skip to content

Commit db48563

Browse files
committed
added ctors to solenoid devices
1 parent f7ee783 commit db48563

2 files changed

Lines changed: 16 additions & 0 deletions

File tree

flashlib.frc.robot/src/main/java/com/flash3388/flashlib/frc/robot/io/devices/FrcDoubleSolenoid.java

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,14 @@ public FrcDoubleSolenoid(edu.wpi.first.wpilibj.DoubleSolenoid solenoid) {
1010
mSolenoid = solenoid;
1111
}
1212

13+
public FrcDoubleSolenoid(int forwardChannel, int reverseChannel) {
14+
this(new edu.wpi.first.wpilibj.DoubleSolenoid(forwardChannel, reverseChannel));
15+
}
16+
17+
public FrcDoubleSolenoid(int moduleNumber, int forwardChannel, int reverseChannel) {
18+
this(new edu.wpi.first.wpilibj.DoubleSolenoid(moduleNumber, forwardChannel, reverseChannel));
19+
}
20+
1321
@Override
1422
public void set(Value value) {
1523
switch (value) {

flashlib.frc.robot/src/main/java/com/flash3388/flashlib/frc/robot/io/devices/FrcSolenoid.java

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,14 @@ public FrcSolenoid(edu.wpi.first.wpilibj.Solenoid solenoid) {
1111
mSolenoid = solenoid;
1212
}
1313

14+
public FrcSolenoid(int channel) {
15+
this(new edu.wpi.first.wpilibj.Solenoid(channel));
16+
}
17+
18+
public FrcSolenoid(int moduleNumber, int channel) {
19+
this(new edu.wpi.first.wpilibj.Solenoid(moduleNumber, channel));
20+
}
21+
1422
@Override
1523
public void set(boolean on) {
1624
mSolenoid.set(on);

0 commit comments

Comments
 (0)