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 void
downshift()
Shift to a lower gearint
getGear()
int
getTotalGears()
void
upshift()
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:GearShifter
Shift to a higher gear- Specified by:
upshift
in interfaceGearShifter
-
downshift
public void downshift()
Description copied from interface:GearShifter
Shift to a lower gear- Specified by:
downshift
in interfaceGearShifter
-
getGear
public int getGear()
- Specified by:
getGear
in interfaceGearShifter
- Returns:
- the current gear
-
getTotalGears
public int getTotalGears()
- Specified by:
getTotalGears
in interfaceGearShifter
- Returns:
- the total number of gears
-
-