From 432f246996381885ed434414a532830e04d6cae9 Mon Sep 17 00:00:00 2001 From: redpossibl Date: Tue, 25 Feb 2020 15:50:00 -0500 Subject: [PATCH] added static method to create SciSolenoid --- .../java/frc/robot/sciSensorsActuators/SciSolenoid.java | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/main/java/frc/robot/sciSensorsActuators/SciSolenoid.java b/src/main/java/frc/robot/sciSensorsActuators/SciSolenoid.java index 6038013..266d207 100644 --- a/src/main/java/frc/robot/sciSensorsActuators/SciSolenoid.java +++ b/src/main/java/frc/robot/sciSensorsActuators/SciSolenoid.java @@ -46,6 +46,14 @@ public SciSolenoid(int pdpPort, int[] ports, ValueType forwardValue, ValueType r automateStateUpdating(); } + public static SciSolenoid defaultSolenoid(int pdpPort, int[] ports) { + return new SciSolenoid(pdpPort, ports, Value.kForward, Value.kReverse, Value.kOff); + } + + public static SciSolenoid defauSolenoid(int[] ports) { + return defaultSolenoid(1, ports); + } + public void setIgnore(boolean ignore){this.ignore = ignore;} private Value toDoubleSolenoidValue(ValueType e) {return valueMap.getForward(e);}