Class Driver
java.lang.Object
frc.lib.service.BaseService
frc.robot.services.control.ControlService<DriverProfile,DriverIO,frc.robot.services.control.driver.DriverIOInputsAutoLogged>
frc.robot.services.control.driver.Driver
- All Implemented Interfaces:
Monitored
public class Driver
extends ControlService<DriverProfile,DriverIO,frc.robot.services.control.driver.DriverIOInputsAutoLogged>
Subsystem for handling driver controls and input processing.
-
Field Summary
Fields inherited from class frc.robot.services.control.ControlService
chooser, inputs, ioFields inherited from class frc.lib.service.BaseService
name -
Constructor Summary
ConstructorsConstructorDescriptionDriver(DriverIO io, org.littletonrobotics.junction.networktables.LoggedDashboardChooser<DriverProfile> chooser) Constructs the Driver subsystem. -
Method Summary
Modifier and TypeMethodDescriptioncreateDriveCommand(Drive drive) Creates a command to drive the robot using the current driver profile inputs.protected voidupdateInputs(DriverIO io, frc.robot.services.control.driver.DriverIOInputsAutoLogged inputs, DriverProfile profile) Subclasses must map the profile methods to the inputs object.wantsAim()Returns a trigger that is active when the driver wants to aim.Returns a trigger that is active when the driver wants to reset the robot pose.Returns a trigger that is active when the driver wants to shoot.Methods inherited from class frc.robot.services.control.ControlService
clearFaults, isHealthy, updateMethods inherited from class frc.lib.service.BaseService
getName
-
Constructor Details
-
Driver
public Driver(DriverIO io, org.littletonrobotics.junction.networktables.LoggedDashboardChooser<DriverProfile> chooser) Constructs the Driver subsystem.- Parameters:
io- The DriverIO implementation.chooser- The dashboard chooser for driver profiles.
-
-
Method Details
-
updateInputs
protected void updateInputs(DriverIO io, frc.robot.services.control.driver.DriverIOInputsAutoLogged inputs, DriverProfile profile) Description copied from class:ControlServiceSubclasses must map the profile methods to the inputs object.- Specified by:
updateInputsin classControlService<DriverProfile,DriverIO, frc.robot.services.control.driver.DriverIOInputsAutoLogged> - Parameters:
io- The IO interface for hardware interaction.inputs- The inputs object for logging and state.profile- The control profile.
-
createDriveCommand
Creates a command to drive the robot using the current driver profile inputs.- Parameters:
drive- The drive subsystem.- Returns:
- The drive command.
-
wantsAim
Returns a trigger that is active when the driver wants to aim.- Returns:
- The aim trigger.
-
wantsShoot
Returns a trigger that is active when the driver wants to shoot.- Returns:
- The shoot trigger.
-
wantsReset
Returns a trigger that is active when the driver wants to reset the robot pose.- Returns:
- The reset trigger.
-