Package frc.robot.services.control
Class GenericControlProfile
java.lang.Object
frc.robot.services.control.GenericControlProfile
- All Implemented Interfaces:
ControlProfile
- Direct Known Subclasses:
DefaultDriverProfile,DefaultOperatorProfile,SetpointDriverProfile
Abstract base class for control profiles using a CommandXboxController.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final XboxControllerThe Xbox controller used for input. -
Constructor Summary
ConstructorsConstructorDescriptionGenericControlProfile(XboxController controller) Constructs a GenericControlProfile. -
Method Summary
Modifier and TypeMethodDescriptiongetHID()Returns the physical HID device.doubleReturns the left rumble value for the controller.doubleReturns the right rumble value for the controller.booleanReturns whether or not the controller is connected.
-
Field Details
-
controller
The Xbox controller used for input.
-
-
Constructor Details
-
GenericControlProfile
Constructs a GenericControlProfile.- Parameters:
controller- The Xbox controller used for input.
-
-
Method Details
-
getHID
Description copied from interface:ControlProfileReturns the physical HID device.- Specified by:
getHIDin interfaceControlProfile- Returns:
- The GenericHID device.
-
getLeftRumble
public double getLeftRumble()Description copied from interface:ControlProfileReturns the left rumble value for the controller.- Specified by:
getLeftRumblein interfaceControlProfile- Returns:
- The left rumble intensity (0.0-1.0).
-
getRightRumble
public double getRightRumble()Description copied from interface:ControlProfileReturns the right rumble value for the controller.- Specified by:
getRightRumblein interfaceControlProfile- Returns:
- The right rumble intensity (0.0-1.0).
-
isConnected
public boolean isConnected()Description copied from interface:ControlProfileReturns whether or not the controller is connected.- Specified by:
isConnectedin interfaceControlProfile- Returns:
- True if the controller is connected, false otherwise.
-