Class LimitedElevator
- java.lang.Object
-
- com.thegongoliers.output.elevator.LimitedElevator
-
-
Constructor Summary
Constructors Constructor Description LimitedElevator(edu.wpi.first.wpilibj.SpeedController speedController, java.util.function.BooleanSupplier topLimit, java.util.function.BooleanSupplier bottomLimit)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
down(double speed)
Move the elevator down, stops at the bottom limitboolean
isAtBottom()
Determines if the elevator is at the bottomboolean
isAtTop()
Determines if the elevator is at the topvoid
stop()
Stop the mechanism from movingvoid
up(double speed)
Move the elevator up, stops at the top limit
-
-
-
Method Detail
-
isAtTop
public boolean isAtTop()
Determines if the elevator is at the top- Returns:
- True if it is at the top, false otherwise
-
isAtBottom
public boolean isAtBottom()
Determines if the elevator is at the bottom- Returns:
- True if it is at the bottom, false otherwise
-
up
public void up(double speed)
Move the elevator up, stops at the top limit- Parameters:
speed
- the speed to move up
-
down
public void down(double speed)
Move the elevator down, stops at the bottom limit- Parameters:
speed
- the speed to move down
-
-