# team-10072/rebuilt-robot-code architecture

> Architecture diagram of the GitHub repository team-10072/rebuilt-robot-code, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-20). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/team-10072/rebuilt-robot-code
- Repository: https://github.com/team-10072/rebuilt-robot-code

## Overview

This is an FRC robot application built around a four-module REV MAXSwerve drivetrain, with operator-controlled fuel intake, launch, and eject actions. The principal workflow is robot startup into RobotContainer bindings, then controller input through commands and subsystems to motor hardware; autonomous path following is also constructed there. The graph includes the Limelight code present in the tree, but the README does not describe its role and the sampled sources do not establish its runtime wiring.

Main entry points: [`src/main/java/frc/robot/RobotContainer.java`](https://github.com/team-10072/rebuilt-robot-code/blob/main/src/main/java/frc/robot/RobotContainer.java) (Bindings and auto), [`src/main/java/frc/robot/subsystems/CANFuelSubsystem.java`](https://github.com/team-10072/rebuilt-robot-code/blob/main/src/main/java/frc/robot/subsystems/CANFuelSubsystem.java) (Fuel subsystem), [`src/main/java/frc/robot/subsystems/DriveSubsystem.java`](https://github.com/team-10072/rebuilt-robot-code/blob/main/src/main/java/frc/robot/subsystems/DriveSubsystem.java) (Drive subsystem), [`src/main/java/frc/robot/Robot.java`](https://github.com/team-10072/rebuilt-robot-code/blob/main/src/main/java/frc/robot/Robot.java) (Mode lifecycle)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_runtime["Robot runtime"]
  node_main["Robot entry<br/>[Main.java]"]
  node_robot["Mode lifecycle<br/>[Robot.java]"]
  node_container["Bindings and auto"]
  node_constants["Robot constants<br/>[Constants.java]"]
end

subgraph group_drive["Swerve drivetrain"]
  node_drive["Drive subsystem"]
  node_module["MAXSwerve module"]
  node_configs["Motor configurations<br/>[Configs.java]"]
  node_limelight["Limelight interface<br/>[Limelight.java]"]
  node_limelight_helpers["Limelight helpers"]
end

subgraph group_fuel["Fuel handling"]
  node_fuel["Fuel subsystem"]
  node_intake["Intake command<br/>[Intake.java]"]
  node_eject["Eject command<br/>[Eject.java]"]
  node_launch["Launch command<br/>[Launch.java]"]
  node_spinup["Spin-up command<br/>[SpinUp.java]"]
  node_launch_sequence["Launch sequence"]
end

node_driver(("Driver controller"))
node_operator(("Operator controller"))
node_scheduler["Command scheduler"]

node_main -->|"starts"| node_robot
node_robot -->|"constructs"| node_container
node_robot -->|"runs"| node_scheduler
node_container -->|"schedules auto"| node_scheduler
node_driver -->|"provides input"| node_container
node_operator -->|"provides input"| node_container
node_container -->|"binds drive"| node_drive
node_container -->|"creates subsystem"| node_fuel
node_container -->|"binds command"| node_intake
node_container -->|"binds command"| node_eject
node_container -->|"binds command"| node_launch
node_container -->|"binds sequence"| node_launch_sequence
node_container -->|"builds auto path"| node_drive
node_drive -->|"sets module states"| node_module
node_module -->|"applies config"| node_configs
node_intake -->|"sets rollers"| node_fuel
node_eject -->|"sets rollers"| node_fuel
node_launch -->|"sets rollers"| node_fuel
node_launch_sequence -->|"runs first"| node_spinup
node_launch_sequence -->|"runs next"| node_launch
node_spinup -->|"sets rollers"| node_fuel
node_drive -->|"uses settings"| node_constants
node_configs -->|"uses settings"| node_constants
node_limelight_helpers -->|"references"| node_limelight

click node_main "https://github.com/team-10072/rebuilt-robot-code/blob/main/src/main/java/frc/robot/Main.java"
click node_robot "https://github.com/team-10072/rebuilt-robot-code/blob/main/src/main/java/frc/robot/Robot.java"
click node_container "https://github.com/team-10072/rebuilt-robot-code/blob/main/src/main/java/frc/robot/RobotContainer.java"
click node_constants "https://github.com/team-10072/rebuilt-robot-code/blob/main/src/main/java/frc/robot/Constants.java"
click node_drive "https://github.com/team-10072/rebuilt-robot-code/blob/main/src/main/java/frc/robot/subsystems/DriveSubsystem.java"
click node_module "https://github.com/team-10072/rebuilt-robot-code/blob/main/src/main/java/frc/robot/subsystems/MAXSwerveModule.java"
click node_configs "https://github.com/team-10072/rebuilt-robot-code/blob/main/src/main/java/frc/robot/Configs.java"
click node_limelight "https://github.com/team-10072/rebuilt-robot-code/blob/main/src/main/java/frc/robot/subsystems/Limelight/Limelight.java"
click node_limelight_helpers "https://github.com/team-10072/rebuilt-robot-code/blob/main/src/main/java/frc/robot/subsystems/Limelight/LimelightHelpers.java"
click node_fuel "https://github.com/team-10072/rebuilt-robot-code/blob/main/src/main/java/frc/robot/subsystems/CANFuelSubsystem.java"
click node_intake "https://github.com/team-10072/rebuilt-robot-code/blob/main/src/main/java/frc/robot/commands/Intake.java"
click node_eject "https://github.com/team-10072/rebuilt-robot-code/blob/main/src/main/java/frc/robot/commands/Eject.java"
click node_launch "https://github.com/team-10072/rebuilt-robot-code/blob/main/src/main/java/frc/robot/commands/Launch.java"
click node_spinup "https://github.com/team-10072/rebuilt-robot-code/blob/main/src/main/java/frc/robot/commands/SpinUp.java"
click node_launch_sequence "https://github.com/team-10072/rebuilt-robot-code/blob/main/src/main/java/frc/robot/commands/LaunchSequence.java"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_main,node_robot,node_container,node_constants toneBlue
class node_drive,node_module,node_configs,node_limelight,node_limelight_helpers toneAmber
class node_fuel,node_intake,node_eject,node_launch,node_spinup,node_launch_sequence toneMint
class node_driver,node_operator toneIndigo
class node_scheduler toneRose
```

## Components

### Robot runtime

- [Robot entry](https://github.com/team-10072/rebuilt-robot-code/blob/main/src/main/java/frc/robot/Main.java): `src/main/java/frc/robot/Main.java`
- [Mode lifecycle](https://github.com/team-10072/rebuilt-robot-code/blob/main/src/main/java/frc/robot/Robot.java): `src/main/java/frc/robot/Robot.java`
- [Bindings and auto](https://github.com/team-10072/rebuilt-robot-code/blob/main/src/main/java/frc/robot/RobotContainer.java): `src/main/java/frc/robot/RobotContainer.java`
- [Robot constants](https://github.com/team-10072/rebuilt-robot-code/blob/main/src/main/java/frc/robot/Constants.java): `src/main/java/frc/robot/Constants.java`

### Swerve drivetrain

- [Drive subsystem](https://github.com/team-10072/rebuilt-robot-code/blob/main/src/main/java/frc/robot/subsystems/DriveSubsystem.java): `src/main/java/frc/robot/subsystems/DriveSubsystem.java`
- [MAXSwerve module](https://github.com/team-10072/rebuilt-robot-code/blob/main/src/main/java/frc/robot/subsystems/MAXSwerveModule.java): `src/main/java/frc/robot/subsystems/MAXSwerveModule.java`
- [Motor configurations](https://github.com/team-10072/rebuilt-robot-code/blob/main/src/main/java/frc/robot/Configs.java): `src/main/java/frc/robot/Configs.java`
- [Limelight interface](https://github.com/team-10072/rebuilt-robot-code/blob/main/src/main/java/frc/robot/subsystems/Limelight/Limelight.java): `src/main/java/frc/robot/subsystems/Limelight/Limelight.java`
- [Limelight helpers](https://github.com/team-10072/rebuilt-robot-code/blob/main/src/main/java/frc/robot/subsystems/Limelight/LimelightHelpers.java): `src/main/java/frc/robot/subsystems/Limelight/LimelightHelpers.java`

### Fuel handling

- [Fuel subsystem](https://github.com/team-10072/rebuilt-robot-code/blob/main/src/main/java/frc/robot/subsystems/CANFuelSubsystem.java): `src/main/java/frc/robot/subsystems/CANFuelSubsystem.java`
- [Intake command](https://github.com/team-10072/rebuilt-robot-code/blob/main/src/main/java/frc/robot/commands/Intake.java): `src/main/java/frc/robot/commands/Intake.java`
- [Eject command](https://github.com/team-10072/rebuilt-robot-code/blob/main/src/main/java/frc/robot/commands/Eject.java): `src/main/java/frc/robot/commands/Eject.java`
- [Launch command](https://github.com/team-10072/rebuilt-robot-code/blob/main/src/main/java/frc/robot/commands/Launch.java): `src/main/java/frc/robot/commands/Launch.java`
- [Spin-up command](https://github.com/team-10072/rebuilt-robot-code/blob/main/src/main/java/frc/robot/commands/SpinUp.java): `src/main/java/frc/robot/commands/SpinUp.java`
- [Launch sequence](https://github.com/team-10072/rebuilt-robot-code/blob/main/src/main/java/frc/robot/commands/LaunchSequence.java): `src/main/java/frc/robot/commands/LaunchSequence.java`

### Other components

- **Driver controller**
- **Operator controller**
- **Command scheduler**

## Connections

- Robot entry → Mode lifecycle: starts (evidence: `src/main/java/frc/robot/Main.java`)
- Mode lifecycle → Bindings and auto: constructs (evidence: `src/main/java/frc/robot/Robot.java`)
- Mode lifecycle → Command scheduler: runs (evidence: `src/main/java/frc/robot/Robot.java`)
- Bindings and auto → Command scheduler: schedules auto
- Driver controller → Bindings and auto: provides input (evidence: `src/main/java/frc/robot/RobotContainer.java`)
- Operator controller → Bindings and auto: provides input (evidence: `src/main/java/frc/robot/RobotContainer.java`)
- Bindings and auto → Drive subsystem: binds drive (evidence: `src/main/java/frc/robot/RobotContainer.java`)
- Bindings and auto → Fuel subsystem: creates subsystem (evidence: `src/main/java/frc/robot/RobotContainer.java`)
- Bindings and auto → Intake command: binds command (evidence: `src/main/java/frc/robot/RobotContainer.java`)
- Bindings and auto → Eject command: binds command (evidence: `src/main/java/frc/robot/RobotContainer.java`)
- Bindings and auto → Launch command: binds command (evidence: `src/main/java/frc/robot/RobotContainer.java`)
- Bindings and auto → Launch sequence: binds sequence (evidence: `src/main/java/frc/robot/RobotContainer.java`)
- Bindings and auto → Drive subsystem: builds auto path (evidence: `src/main/java/frc/robot/RobotContainer.java`)
- Drive subsystem → MAXSwerve module: sets module states (evidence: `src/main/java/frc/robot/subsystems/DriveSubsystem.java`)
- MAXSwerve module → Motor configurations: applies config (evidence: `src/main/java/frc/robot/subsystems/MAXSwerveModule.java`)
- Intake command → Fuel subsystem: sets rollers (evidence: `src/main/java/frc/robot/commands/Intake.java`)
- Eject command → Fuel subsystem: sets rollers (evidence: `src/main/java/frc/robot/commands/Eject.java`)
- Launch command → Fuel subsystem: sets rollers (evidence: `src/main/java/frc/robot/commands/Launch.java`)
- Launch sequence → Spin-up command: runs first (evidence: `src/main/java/frc/robot/commands/LaunchSequence.java`)
- Launch sequence → Launch command: runs next (evidence: `src/main/java/frc/robot/commands/LaunchSequence.java`)
- Spin-up command → Fuel subsystem: sets rollers (evidence: `src/main/java/frc/robot/commands/SpinUp.java`)
- Drive subsystem → Robot constants: uses settings (evidence: `src/main/java/frc/robot/subsystems/DriveSubsystem.java`)
- Motor configurations → Robot constants: uses settings (evidence: `src/main/java/frc/robot/Configs.java`)
- Limelight helpers → Limelight interface: references (evidence: `src/main/java/frc/robot/subsystems/Limelight/LimelightHelpers.java`)
