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

    Constructors
    Constructor
    Description
    SN_DoubleSolenoid(int a_module, edu.wpi.first.wpilibj.PneumaticsModuleType a_moduleType, int a_forwardChannel, int a_reverseChannel)
    Wrapper for the WPILib DoubleSolenoid
    SN_DoubleSolenoid(edu.wpi.first.wpilibj.PneumaticsModuleType a_moduleType, int a_forwardChannel, int a_reverseChannel)
    Wrapper for the WPILib DoubleSolenoid
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
     
    boolean
     
    void
    Deploys the solenoid
    void
    setInverted(boolean a_inverted)
    Inverts the forward and reverse direction of the solenoid
    void
    Retracts the solenoid
    void
    Deploys the solenoid if it's retracted

    Methods inherited from class edu.wpi.first.wpilibj.DoubleSolenoid

    close, get, getFwdChannel, getRevChannel, initSendable, isFwdSolenoidDisabled, isRevSolenoidDisabled, set

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • SN_DoubleSolenoid

      public SN_DoubleSolenoid(edu.wpi.first.wpilibj.PneumaticsModuleType a_moduleType, int a_forwardChannel, int a_reverseChannel)
      Wrapper for the WPILib DoubleSolenoid

      Adds custom methods like setDeployed()}

      Parameters:
      a_moduleType - CTRE Pneumatics Control Module or REV Pneumatics Hub
      a_forwardChannel - The forward channel of the solenoid on the Pneumatics Module
      a_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 DoubleSolenoid

      Adds custom methods like setDeployed()}

      Parameters:
      a_module - The CAN ID of the Pneumatics module to use. Leave blank to use default ID, 0
      a_moduleType - CTRE Pneumatics Control Module or REV Pneumatics Hub
      a_forwardChannel - The forward channel of the solenoid on the Pneumatics Module
      a_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 retracted

      Retracts the solenoid if it's deployed

      Overrides:
      toggle in class edu.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