Additional prework: split out driver controls, clean things up, pathfinding during tele, auto aim#10
Additional prework: split out driver controls, clean things up, pathfinding during tele, auto aim#10dracco1993 merged 10 commits intomasterfrom
Conversation
There was a problem hiding this comment.
Pull request overview
This PR refactors the robot control system by extracting controller input logic into dedicated control classes (DriverControls, OperatorControls, PoseControls), improving code organization and maintainability. The changes consolidate controller-related constants, simplify RobotContainer, and relocate simulation-specific functionality.
Changes:
- Introduced three new control classes to encapsulate driver, operator, and pose controller bindings
- Renamed
OperatorConstantstoControllerConstantsand added port constants for all three controllers - Removed inline controller configuration from
RobotContainerin favor of delegated configuration methods
Reviewed changes
Copilot reviewed 8 out of 8 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
src/main/java/frc/robot/controls/DriverControls.java |
New class containing driver controller bindings and simulation algae firing logic |
src/main/java/frc/robot/controls/OperatorControls.java |
New class stub for operator controller bindings |
src/main/java/frc/robot/controls/PoseControls.java |
New class for target pose adjustment controls with field visualization |
src/main/java/frc/robot/RobotContainer.java |
Simplified by delegating control configuration to new control classes |
src/main/java/frc/robot/subsystems/SwerveSubsystem.java |
Added driveToPoseCommand method and cleaned up imports |
src/main/java/frc/robot/Constants.java |
Renamed constants class and consolidated controller port definitions |
src/main/java/frc/robot/Robot.java |
Removed unused import |
simgui-ds.json |
Added joystick entries for new controllers |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 9 out of 9 changed files in this pull request and generated 4 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
This pull request refactors the robot control system to modularize controller bindings and input handling, making the codebase more maintainable and extensible. The main changes are the extraction of driver, operator, and pose controls into their own classes, the consolidation of controller port constants, and the simplification of
RobotContainerby delegating control configuration. Some simulation-specific and testing code has also been relocated or removed.Controller Input Refactoring:
DriverControls,OperatorControls, andPoseControlsto encapsulate and modularize all controller input logic, moving this responsibility out ofRobotContainer. This improves code organization and future maintainability. (src/main/java/frc/robot/controls/DriverControls.java[1]src/main/java/frc/robot/controls/OperatorControls.java[2]src/main/java/frc/robot/controls/PoseControls.java[3]RobotContainerto callconfiguremethods on these new control classes, removing the previous inline configuration and command setup for controllers. (src/main/java/frc/robot/RobotContainer.java[1] [2]fireAlgaecommand fromRobotContainer; these are now handled by the new control classes. (src/main/java/frc/robot/RobotContainer.java[1] [2]Constants and Naming:
OperatorConstantstoControllerConstantsinConstants.javaand added new controller port constants for driver, operator, and pose controllers, consolidating all controller-related constants in one place. (src/main/java/frc/robot/Constants.javasrc/main/java/frc/robot/Constants.javaL14-L21)Simulation and Miscellaneous:
simgui-ds.jsonto support the new modularized control scheme. (simgui-ds.jsonsimgui-ds.jsonR93-R100)Robot.javaandRobotContainer.java. (src/main/java/frc/robot/Robot.java[1]src/main/java/frc/robot/RobotContainer.java[2]These changes collectively make the codebase cleaner, easier to understand, and more adaptable for future controller or input scheme changes.