Class PneumaticShifter

  • All Implemented Interfaces:
    GearShifter

    public class PneumaticShifter
    extends java.lang.Object
    implements GearShifter
    A pneumatic shifter which has a single low and high gear
    • Constructor Summary

      Constructors 
      Constructor Description
      PneumaticShifter​(edu.wpi.first.wpilibj.Solenoid shifter)
      Constructor
      PneumaticShifter​(edu.wpi.first.wpilibj.Solenoid shifter, boolean inverted)
      Default constructor
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void downshift()
      Shift to a lower gear
      int getGear()  
      int getTotalGears()  
      void upshift()
      Shift to a higher gear
      • Methods inherited from class java.lang.Object

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

      • PneumaticShifter

        public PneumaticShifter​(edu.wpi.first.wpilibj.Solenoid shifter,
                                boolean inverted)
        Default constructor
        Parameters:
        shifter - the shifter
        inverted - true if the solenoid is inverted
      • PneumaticShifter

        public PneumaticShifter​(edu.wpi.first.wpilibj.Solenoid shifter)
        Constructor
        Parameters:
        shifter - the shifter
    • Method Detail

      • upshift

        public void upshift()
        Description copied from interface: GearShifter
        Shift to a higher gear
        Specified by:
        upshift in interface GearShifter
      • downshift

        public void downshift()
        Description copied from interface: GearShifter
        Shift to a lower gear
        Specified by:
        downshift in interface GearShifter
      • getGear

        public int getGear()
        Specified by:
        getGear in interface GearShifter
        Returns:
        the current gear
      • getTotalGears

        public int getTotalGears()
        Specified by:
        getTotalGears in interface GearShifter
        Returns:
        the total number of gears