Skip to content

Additional prework: split out driver controls, clean things up, pathfinding during tele, auto aim#10

Merged
dracco1993 merged 10 commits intomasterfrom
big-cook
Jan 9, 2026
Merged

Additional prework: split out driver controls, clean things up, pathfinding during tele, auto aim#10
dracco1993 merged 10 commits intomasterfrom
big-cook

Conversation

@dracco1993
Copy link
Member

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 RobotContainer by delegating control configuration. Some simulation-specific and testing code has also been relocated or removed.

Controller Input Refactoring:

  • Introduced new classes DriverControls, OperatorControls, and PoseControls to encapsulate and modularize all controller input logic, moving this responsibility out of RobotContainer. 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]
  • Updated RobotContainer to call configure methods on these new control classes, removing the previous inline configuration and command setup for controllers. (src/main/java/frc/robot/RobotContainer.java [1] [2]
  • Removed simulation/test-specific command bindings and the fireAlgae command from RobotContainer; these are now handled by the new control classes. (src/main/java/frc/robot/RobotContainer.java [1] [2]

Constants and Naming:

  • Renamed OperatorConstants to ControllerConstants in Constants.java and 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.java src/main/java/frc/robot/Constants.javaL14-L21)

Simulation and Miscellaneous:

  • Added extra joystick entries to simgui-ds.json to support the new modularized control scheme. (simgui-ds.json simgui-ds.jsonR93-R100)
  • Cleaned up unused imports in several files, including Robot.java and RobotContainer.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.

@dracco1993 dracco1993 self-assigned this Jan 9, 2026
@dracco1993 dracco1993 added the enhancement New feature or request label Jan 9, 2026
Copilot AI review requested due to automatic review settings January 9, 2026 18:20
@dracco1993 dracco1993 moved this to In progress in Ri3D 2026 Jan 9, 2026
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 OperatorConstants to ControllerConstants and added port constants for all three controllers
  • Removed inline controller configuration from RobotContainer in 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.

Copilot AI review requested due to automatic review settings January 9, 2026 18:28
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@dracco1993 dracco1993 merged commit 1783bc2 into master Jan 9, 2026
1 check passed
@github-project-automation github-project-automation bot moved this from In progress to Done in Ri3D 2026 Jan 9, 2026
@dracco1993 dracco1993 deleted the big-cook branch January 9, 2026 18:39
@dracco1993 dracco1993 restored the big-cook branch January 9, 2026 18:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

1 participant