# jath-alison/art architecture

> Architecture diagram of the GitHub repository jath-alison/art, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2024-12-29). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/jath-alison/art
- Repository: https://github.com/jath-alison/art

## Overview

##### Main Components

a. Core Components:
- Motor Control System
- Drive System
- Control Systems
- Utility Components

b. Supporting Components:
- Documentation System
- Build System
- Testing Infrastructure

##### Component Breakdown

a. Motor Control Layer:
- SimpleMotor -> SimpleMotorGroup -> TankDrive/SmartDrive

b. Control Systems:
- PID Controller <-> Motor Systems

c. Utility Components:
- Vec2 (Vector Operations)
- Units (Measurement Utilities)

**[Hardware Layer]**

- ▼
**[Motor Abstraction Layer]**
- SimpleMotor
- SimpleMotorGroup
- ▼
**[Drive Systems Layer]**
- TankDrive
- SmartDrive
- ▼
**[Control Systems Layer]**
- PID Controller
- ▼
**[Utility Layer]**
- Vector Operations (Vec2)
- Unit Conversions (Units)

##### Important Details

a. Class Relationships:
- SimpleMotor ──► SimpleMotorGroup ──► TankDrive
- ► SmartDrive

b. Control Flow:
- PID Controller ←──► Drive Systems
- ▲

- Sensor Feedback

c. Utility Integration:
- Vec2 ───► TankDrive (Position/Movement)
- Units ──► All Components (Measurement)

##### Implementation Notes
- Use standardized UML notation where appropriate
- Brief descriptions for each major component
- Interface boundaries between layers
- Extension points for future features

## Diagram (Mermaid)

```mermaid
graph TB
    subgraph Legend
        L1[Component]
        L2[(Hardware)]
        L3[/Interface/]
        style L1 fill:#f9f,stroke:#333
        style L2 fill:#ddd,stroke:#333
        style L3 fill:#aef,stroke:#333
    end

    subgraph Hardware
        HW[(VEX Hardware)]:::hardware
        Sensors[(Sensors)]:::hardware
    end

    subgraph "Motor Abstraction"
        SM[SimpleMotor]:::motor
        SMG[SimpleMotorGroup]:::motor
        click SM "https://github.com/Jath-Alison/ART/blob/main/include/ART/SimpleMotor.h"
        click SMG "https://github.com/Jath-Alison/ART/blob/main/include/ART/SimpleMotorGroup.h"
    end

    subgraph "Drive Systems"
        TD[TankDrive]:::drive
        SD[SmartDrive]:::drive
        click TD "https://github.com/Jath-Alison/ART/blob/main/include/ART/TankDrive.h"
        click SD "https://github.com/Jath-Alison/ART/blob/main/include/ART/SmartDrive.h"
    end

    subgraph "Control Systems"
        PID[PID Controller]:::control
        click PID "https://github.com/Jath-Alison/ART/blob/main/include/ART/PID.h"
    end

    subgraph "Utilities"
        Vec[Vector Operations]:::utility
        Units[Unit Conversions]:::utility
        click Vec "https://github.com/Jath-Alison/ART/blob/main/include/ART/Vec2.h"
        click Units "https://github.com/Jath-Alison/ART/blob/main/include/ART/Units.h"
    end

    subgraph "Core Interface"
        ART[/ART Library Interface/]:::interface
        click ART "https://github.com/Jath-Alison/ART/blob/main/include/ART/ART.h"
    end

    %% Connections
    HW --> SM
    Sensors --> PID
    SM --> SMG
    SMG --> TD
    SMG --> SD
    PID --> TD
    PID --> SD
    Vec --> TD
    Vec --> SD
    Units --> SM
    Units --> SMG
    Units --> TD
    Units --> SD
    TD --> ART
    SD --> ART
    PID --> ART
    Vec --> ART
    Units --> ART

    %% Styles
    classDef hardware fill:#ddd,stroke:#333
    classDef motor fill:#b3d9ff,stroke:#333
    classDef drive fill:#90EE90,stroke:#333
    classDef control fill:#ffb366,stroke:#333
    classDef utility fill:#e6b3ff,stroke:#333
    classDef interface fill:#aef,stroke:#333
```
