Package com.thegongoliers.output.gears
Class PneumaticShifter
- java.lang.Object
-
- com.thegongoliers.output.gears.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)ConstructorPneumaticShifter(edu.wpi.first.wpilibj.Solenoid shifter, boolean inverted)Default constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voiddownshift()Shift to a lower gearintgetGear()intgetTotalGears()voidupshift()Shift to a higher gear
-
-
-
Constructor Detail
-
PneumaticShifter
public PneumaticShifter(edu.wpi.first.wpilibj.Solenoid shifter, boolean inverted)Default constructor- Parameters:
shifter- the shifterinverted- 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:GearShifterShift to a higher gear- Specified by:
upshiftin interfaceGearShifter
-
downshift
public void downshift()
Description copied from interface:GearShifterShift to a lower gear- Specified by:
downshiftin interfaceGearShifter
-
getGear
public int getGear()
- Specified by:
getGearin interfaceGearShifter- Returns:
- the current gear
-
getTotalGears
public int getTotalGears()
- Specified by:
getTotalGearsin interfaceGearShifter- Returns:
- the total number of gears
-
-