Package com.pocolifo.robobase.control
Class GamepadCarWheels
java.lang.Object
com.pocolifo.robobase.control.GamepadCarWheels
- All Implemented Interfaces:
AutoCloseable
Utility class which implements Omni-Drive.
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionGamepadCarWheels(CarWheels wheels, com.qualcomm.robotcore.hardware.Gamepad gamepad, BoolSupplier microMovementCondition) Create aGamepadCarWheels. -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()Cleans up thisGamepadCarWheelsinstance.voidupdate()Must be called every loop iteration to update the movement of the wheels.voidBasically just a copy of , but with added d-pad driving capability
-
Field Details
-
isMicroMovement
-
-
Constructor Details
-
GamepadCarWheels
public GamepadCarWheels(CarWheels wheels, com.qualcomm.robotcore.hardware.Gamepad gamepad, BoolSupplier microMovementCondition) Create aGamepadCarWheels.- Parameters:
wheels- TheCarWheelsthat theGamepadCarWheelsshould use.gamepad- TheGamepadthat theGamepadCarWheelsshould use.
-
-
Method Details
-
update
public void update()Must be called every loop iteration to update the movement of the wheels. Movement is based upon gamepad input.
Controls Left stick - movement: forward, backward, left and right without turning Right tick - rotation: clockwise and counterclockwise
-
updateWithDpadDrive
public void updateWithDpadDrive()Basically just a copy of , but with added d-pad driving capability -
close
public void close()Cleans up thisGamepadCarWheelsinstance. This should be called when this instance is no longer in use!- Specified by:
closein interfaceAutoCloseable
-