Skip to content

Add detailed inline documentation to all team code files#13

Draft
Copilot wants to merge 3 commits into
Andrew-Statesfrom
copilot/add-detailed-code-documentation
Draft

Add detailed inline documentation to all team code files#13
Copilot wants to merge 3 commits into
Andrew-Statesfrom
copilot/add-detailed-code-documentation

Conversation

Copilot AI commented Mar 15, 2026

Copy link
Copy Markdown

Every source file in the team codebase lacked documentation, making it difficult for new members to understand subsystem behavior, autonomous sequencing, and control flow.

Changes

Subsystems

  • Core (Actuator, Intake, Outtake, Indexer, Movement, Turret, AntiDefense): class-level JavaDoc explaining hardware wiring, state machines, and tuning knobs; inline comments on every significant line
  • indexerUtil/ (BetterCRControl, CRServoPositionControl, ColorSensorSystem, SlotObservation, SlotState): documented PD control loops, color sensor thresholds, and slot-state transitions
  • limelight/ (Aimer, AprilTag, InertiaAutoAim): documented PIDF bearing controller, anti-windup, derivative smoothing, AprilTag pipeline selection, and field-coordinate conventions
  • outtakeUtil/RpmController: documented closed-loop RPM control and encoder math

Teleop

  • Bot: documented FSM states (MotifSelection → Intake → QuickOuttake / SortOuttake / Endgame), all gamepad bindings per state, and every Road Runner Action sequence builder
  • BotPeriodics, ActionHost, TeleopConstants: documented periodic subsystem update loop, action runner lifecycle, and all tuning constants
  • MainTeleop, OneDriverTeleop: documented OpMode lifecycle phases

Autonomous

  • auto/utils/ (Action, BotActions, Hardware, Paths): documented action factory methods, sensor-feedback vs. time-based intake strategies, obelisk tag → motif color mapping, and trajectory builder logic
  • auto/opmodes/ (FasterRedCloseMotif, FasterRedCloseMotif15, FasterRedCloseMotifLinear, FasterRedClose, FasterBlueClose, FasterBlueCloseMotif, FarLeave): documented full autonomous sequence per OpMode, all @Config tuning fields, and parallelism strategy

Example — documented FSM state handler

/**
 * Handles driver inputs while in the {@link FSM#QuickOuttake} state.
 * Key bindings (gamepad 2):
 *   Right bumper (hold) – continue pre-spinning the shooter
 *   X – execute the full non-indexed dump; return to Intake
 *   BACK – abort any running action
 *   A – cancel quick outtake; return to Intake
 */
private void handleQuickOuttakeState() { ... }

Not yet documented: auto/opmodes/TestingOpmode.java (developer scratch OpMode).


📱 Kick off Copilot coding agent tasks wherever you are with GitHub Mobile, available on iOS and Android.

Copilot AI and others added 2 commits March 15, 2026 16:50
… and indexerUtil classes

Co-authored-by: ngerow2025 <44300132+ngerow2025@users.noreply.github.com>
Co-authored-by: ngerow2025 <44300132+ngerow2025@users.noreply.github.com>
Copilot AI changed the title [WIP] Add detailed documentation to every line of code Add detailed inline documentation to all team code files Mar 15, 2026
Copilot AI requested a review from ngerow2025 March 15, 2026 17:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants