Package com.frcteam3255.components
Class SN_DoubleSolenoid
java.lang.Object
edu.wpi.first.wpilibj.DoubleSolenoid
com.frcteam3255.components.SN_DoubleSolenoid
- All Implemented Interfaces:
edu.wpi.first.util.sendable.Sendable,AutoCloseable
public class SN_DoubleSolenoid
extends edu.wpi.first.wpilibj.DoubleSolenoid
-
Nested Class Summary
Nested classes/interfaces inherited from class edu.wpi.first.wpilibj.DoubleSolenoid
edu.wpi.first.wpilibj.DoubleSolenoid.Value -
Constructor Summary
ConstructorsConstructorDescriptionSN_DoubleSolenoid(int a_module, edu.wpi.first.wpilibj.PneumaticsModuleType a_moduleType, int a_forwardChannel, int a_reverseChannel) Wrapper for the WPILib DoubleSolenoidSN_DoubleSolenoid(edu.wpi.first.wpilibj.PneumaticsModuleType a_moduleType, int a_forwardChannel, int a_reverseChannel) Wrapper for the WPILib DoubleSolenoid -
Method Summary
Modifier and TypeMethodDescriptionbooleanbooleanvoidDeploys the solenoidvoidsetInverted(boolean a_inverted) Inverts the forward and reverse direction of the solenoidvoidRetracts the solenoidvoidtoggle()Deploys the solenoid if it's retractedMethods inherited from class edu.wpi.first.wpilibj.DoubleSolenoid
close, get, getFwdChannel, getRevChannel, initSendable, isFwdSolenoidDisabled, isRevSolenoidDisabled, set
-
Constructor Details
-
SN_DoubleSolenoid
public SN_DoubleSolenoid(edu.wpi.first.wpilibj.PneumaticsModuleType a_moduleType, int a_forwardChannel, int a_reverseChannel) Wrapper for the WPILib DoubleSolenoidAdds custom methods like
setDeployed()}- Parameters:
a_moduleType- CTRE Pneumatics Control Module or REV Pneumatics Huba_forwardChannel- The forward channel of the solenoid on the Pneumatics Modulea_reverseChannel- The reverse channel of the solenoid on the Pneumatics Module
-
SN_DoubleSolenoid
public SN_DoubleSolenoid(int a_module, edu.wpi.first.wpilibj.PneumaticsModuleType a_moduleType, int a_forwardChannel, int a_reverseChannel) Wrapper for the WPILib DoubleSolenoidAdds custom methods like
setDeployed()}- Parameters:
a_module- The CAN ID of the Pneumatics module to use. Leave blank to use default ID, 0a_moduleType- CTRE Pneumatics Control Module or REV Pneumatics Huba_forwardChannel- The forward channel of the solenoid on the Pneumatics Modulea_reverseChannel- The reverse channel of the solenoid on the Pneumatics Module
-
-
Method Details
-
isDeployed
public boolean isDeployed()- Returns:
- true if the solenoid is deployed, false if the solenoid is retracted
-
isRetracted
public boolean isRetracted()- Returns:
- true if the solenoid is retracted, false if the solenoid is deployed
-
setDeployed
public void setDeployed()Deploys the solenoid -
setRetracted
public void setRetracted()Retracts the solenoid -
toggle
public void toggle()Deploys the solenoid if it's retractedRetracts the solenoid if it's deployed
- Overrides:
togglein classedu.wpi.first.wpilibj.DoubleSolenoid
-
setInverted
public void setInverted(boolean a_inverted) Inverts the forward and reverse direction of the solenoid- Parameters:
a_inverted- The state of inversion, true is inverted
-