Package com.pocolifo.robobase.control
Class GamepadCarWheels
- java.lang.Object
-
- com.pocolifo.robobase.control.GamepadCarWheels
-
- All Implemented Interfaces:
java.lang.AutoCloseable
public class GamepadCarWheels extends java.lang.Object implements java.lang.AutoCloseable
Utility class which implements Omni-Drive.
-
-
Constructor Summary
Constructors Constructor Description GamepadCarWheels(CarWheels wheels, com.qualcomm.robotcore.hardware.Gamepad gamepad)
Create aGamepadCarWheels
.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
close()
Cleans up thisGamepadCarWheels
instance.void
update(boolean useMicroMovement)
Must be called every loop iteration to update the movement of the wheels.
-
-
-
Constructor Detail
-
GamepadCarWheels
public GamepadCarWheels(CarWheels wheels, com.qualcomm.robotcore.hardware.Gamepad gamepad)
Create aGamepadCarWheels
.- Parameters:
wheels
- TheCarWheels
that theGamepadCarWheels
should use.gamepad
- TheGamepad
that theGamepadCarWheels
should use.
-
-
Method Detail
-
update
public void update(boolean useMicroMovement)
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
-
close
public void close()
Cleans up thisGamepadCarWheels
instance. This should be called when this instance is no longer in use!- Specified by:
close
in interfacejava.lang.AutoCloseable
-
-