Skip to content
This repository has been archived by the owner on Dec 14, 2022. It is now read-only.

added static method to create SciSolenoid<DoubleSolenoid.Value> #35

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions src/main/java/frc/robot/sciSensorsActuators/SciSolenoid.java
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,14 @@ public SciSolenoid(int pdpPort, int[] ports, ValueType forwardValue, ValueType r
automateStateUpdating();
}

public static SciSolenoid<DoubleSolenoid.Value> defaultSolenoid(int pdpPort, int[] ports) {
return new SciSolenoid<DoubleSolenoid.Value>(pdpPort, ports, Value.kForward, Value.kReverse, Value.kOff);
}

public static SciSolenoid<DoubleSolenoid.Value> defauSolenoid(int[] ports) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
public static SciSolenoid<DoubleSolenoid.Value> defauSolenoid(int[] ports) {
public static SciSolenoid<DoubleSolenoid.Value> defaultSolenoid(int[] ports) {

Typo

return defaultSolenoid(1, ports);
}

public void setIgnore(boolean ignore){this.ignore = ignore;}

private Value toDoubleSolenoidValue(ValueType e) {return valueMap.getForward(e);}
Expand Down