# dope-eyesz/roboticsfall2026 architecture

> Architecture diagram of the GitHub repository dope-eyesz/roboticsfall2026, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-09-29). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/dope-eyesz/roboticsfall2026
- Repository: https://github.com/dope-eyesz/roboticsfall2026

## Overview

This is a VEX V5 competition robot program. Its main workflow registers autonomous and driver-control callbacks, runs pre-autonomous setup, then responds to competition dispatch: autonomous performs inertial-guided turns, while driver control reads the controller and commands the drivetrain and lift. A separate odometry routine uses a rotation sensor for timed linear movement and reports readings to the controller screen, though the sampled code does not show it being called. Hardware instances are defined in `src/setup.cpp`; `src/pre-auto.cpp` is present but its implementation was not sampled.

Main entry points: [`src/auto.cpp`](https://github.com/dope-eyesz/roboticsfall2026/blob/master/src/auto.cpp) (Autonomous routine), [`src/control.cpp`](https://github.com/dope-eyesz/roboticsfall2026/blob/master/src/control.cpp) (Driver control), [`src/main.cpp`](https://github.com/dope-eyesz/roboticsfall2026/blob/master/src/main.cpp) (Program entry), [`src/odometry.cpp`](https://github.com/dope-eyesz/roboticsfall2026/blob/master/src/odometry.cpp) (Odometry movement)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_entry["Competition entry"]
  node_main["Program entry<br/>[main.cpp]"]
  node_preauto["Pre-autonomous<br/>[pre-auto.cpp]"]
end

subgraph group_motion["Robot motion"]
  node_autonomous["Autonomous routine<br/>[auto.cpp]"]
  node_drivercontrol["Driver control<br/>[control.cpp]"]
  node_turns["Inertial turns<br/>[inertial.cpp]"]
  node_odometry["Odometry movement<br/>[odometry.cpp]"]
end

subgraph group_hardware["Hardware setup"]
  node_hardwareconfig["Hardware configuration<br/>[setup.cpp]"]
end

node_field(("Competition system"))
node_driver(("Robot driver"))
node_robot["VEX robot hardware"]
node_controller["VEX controller"]

node_main -->|"registers callbacks"| node_field
node_field -->|"dispatches autonomous"| node_autonomous
node_field -->|"dispatches driver control"| node_drivercontrol
node_main -->|"calls"| node_preauto
node_driver -->|"operates"| node_controller
node_hardwareconfig -->|"configures devices"| node_robot
node_hardwareconfig -->|"configures"| node_controller
node_autonomous -->|"calls turns"| node_turns
node_autonomous -->|"resets sensor; sets velocity"| node_robot
node_turns -->|"reads inertial; drives wheels"| node_robot
node_drivercontrol -->|"reads buttons and axes"| node_controller
node_drivercontrol -->|"drives wheels and lift"| node_robot
node_odometry -->|"reads rotation; drives motors"| node_robot
node_odometry -->|"prints readings"| node_controller

click node_main "https://github.com/dope-eyesz/roboticsfall2026/blob/master/src/main.cpp"
click node_preauto "https://github.com/dope-eyesz/roboticsfall2026/blob/master/src/pre-auto.cpp"
click node_autonomous "https://github.com/dope-eyesz/roboticsfall2026/blob/master/src/auto.cpp"
click node_drivercontrol "https://github.com/dope-eyesz/roboticsfall2026/blob/master/src/control.cpp"
click node_turns "https://github.com/dope-eyesz/roboticsfall2026/blob/master/src/inertial.cpp"
click node_odometry "https://github.com/dope-eyesz/roboticsfall2026/blob/master/src/odometry.cpp"
click node_hardwareconfig "https://github.com/dope-eyesz/roboticsfall2026/blob/master/src/setup.cpp"

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_preauto toneBlue
class node_autonomous,node_drivercontrol,node_turns,node_odometry toneAmber
class node_hardwareconfig toneMint
class node_field,node_driver,node_robot,node_controller toneIndigo
```

## Components

### Competition entry

- [Program entry](https://github.com/dope-eyesz/roboticsfall2026/blob/master/src/main.cpp): `src/main.cpp`
- [Pre-autonomous](https://github.com/dope-eyesz/roboticsfall2026/blob/master/src/pre-auto.cpp): `src/pre-auto.cpp`

### Robot motion

- [Autonomous routine](https://github.com/dope-eyesz/roboticsfall2026/blob/master/src/auto.cpp): `src/auto.cpp`
- [Driver control](https://github.com/dope-eyesz/roboticsfall2026/blob/master/src/control.cpp): `src/control.cpp`
- [Inertial turns](https://github.com/dope-eyesz/roboticsfall2026/blob/master/src/inertial.cpp): `src/inertial.cpp`
- [Odometry movement](https://github.com/dope-eyesz/roboticsfall2026/blob/master/src/odometry.cpp): `src/odometry.cpp`

### Hardware setup

- [Hardware configuration](https://github.com/dope-eyesz/roboticsfall2026/blob/master/src/setup.cpp): `src/setup.cpp`

### Other components

- **Competition system**
- **Robot driver**
- **VEX robot hardware**
- **VEX controller**

## Connections

- Program entry → Competition system: registers callbacks
- Competition system → Autonomous routine: dispatches autonomous
- Competition system → Driver control: dispatches driver control
- Program entry → Pre-autonomous: calls
- Robot driver → VEX controller: operates
- Hardware configuration → VEX robot hardware: configures devices
- Hardware configuration → VEX controller: configures
- Autonomous routine → Inertial turns: calls turns
- Autonomous routine → VEX robot hardware: resets sensor; sets velocity
- Inertial turns → VEX robot hardware: reads inertial; drives wheels
- Driver control → VEX controller: reads buttons and axes
- Driver control → VEX robot hardware: drives wheels and lift
- Odometry movement → VEX robot hardware: reads rotation; drives motors
- Odometry movement → VEX controller: prints readings
