# noozabooz/210k-highstakes-2025 architecture

> Architecture diagram of the GitHub repository noozabooz/210k-highstakes-2025, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2025-01-11). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/noozabooz/210k-highstakes-2025
- Repository: https://github.com/noozabooz/210k-highstakes-2025

## Overview

##### Main System Components

- PROS Framework (central component)
- Main Robot Control System (src/main.cpp)
- Initialization System (src/init/)

b) Subsystems (Arrange in a circular pattern around core):
- Autonomous Control (src/auton/)
- Manual Control (src/subsystem/opcontrol.cpp)

c) Libraries (Group on the left side):
- LemLib (Motion Control/Path Planning)
- LibKS (Drivetrain Control)
- Odometry
- Angular PID
- Lateral PID
- Chassis Control
- LVGL (Graphics/UI)

d) Hardware Interface Layer (Bottom layer):
- Motor Controls
- Sensor Integration
- ADI Devices
- Vision Systems
- GPS
- IMU

##### Architectural Patterns to Highlight

- Hardware Abstraction Layer pattern
- Component-based architecture
- Event-driven control system
- Hierarchical control structure

**┌─────────────────────────────────────────────┐**
- User Interface                 │
- (RoboDash, LVGL, Screen Controls)       │
- ┤
- High-Level Control                │
- ┤
- Motion Control                    │
- (LemLib, LibKS, PID Controllers)        │
- ┤
- Hardware Abstraction               │
- (PROS API, Device Drivers, Sensors)     │
- ┤
- Physical Hardware                 │
- (Motors, Sensors, Communication)        │
- ┘

Important Elements to Include:
##### Error handling and safety systems

Remember to:
- Version/date information
- Document key interfaces between components
- Critical dependencies or constraints

## Diagram (Mermaid)

```mermaid
flowchart TB
    %% Styles
    classDef core fill:#3498db,stroke:#2980b9,color:white
    classDef lib fill:#2ecc71,stroke:#27ae60,color:white
    classDef hardware fill:#e67e22,stroke:#d35400,color:white
    classDef ui fill:#9b59b6,stroke:#8e44ad,color:white
    classDef control fill:#e74c3c,stroke:#c0392b,color:white

    %% Core Components
    subgraph SoftwareSystem
        PROS[PROS Framework]:::core
        Main["Main Control System"]:::core
        Init["Initialization System"]:::core

        %% Control Systems
        subgraph Control
            Auton["Autonomous Control"]:::control
            Manual["Manual Control"]:::control
            ColorSort["Color Sorting System"]:::control
        end

        %% Libraries
        subgraph Libraries
            direction TB
            LibKS["LibKS Drivetrain"]:::lib
            LVGL["LVGL Graphics"]:::lib
        end

        %% UI Components
        subgraph UserInterface
            direction TB
            RoboDash["RoboDash Interface"]:::ui
            Screen["Screen Controls"]:::ui
        end
    end

    %% Hardware System
    subgraph HardwareSystem
        %% Motion Control Components
        subgraph MotionControl
            direction TB
            Odom["Odometry"]:::lib
            AngularPID["Angular PID"]:::lib
            LateralPID["Lateral PID"]:::lib
            Chassis["Chassis Control"]:::lib
        end

        %% Hardware Interface Layer
        subgraph Hardware
            direction TB
            Motors["Motor Controls"]:::hardware
            Sensors["Sensor Integration"]:::hardware
            ADI["ADI Devices"]:::hardware
            IMU["IMU"]:::hardware
        end
    end

    %% Relationships
    PROS --> Main
    Main --> Init
    Main --> Control
    Init --> RoboDash
    
    Control --> MotionControl
    MotionControl --> Hardware
    
    LibKS --> MotionControl
    LVGL --> UserInterface
    
    UserInterface --> Main

    %% Click Events
    click Main "https://github.com/NoozAbooz/210K-HighStakes-2025/blob/V1/src/main.cpp"
    click Init "https://github.com/NoozAbooz/210K-HighStakes-2025/blob/V1/src/init/initialize.cpp"
    click Auton "https://github.com/NoozAbooz/210K-HighStakes-2025/blob/V1/src/auton/autonomous.cpp"
    click Manual "https://github.com/NoozAbooz/210K-HighStakes-2025/blob/V1/src/subsystem/opcontrol.cpp"
    click ColorSort "https://github.com/NoozAbooz/210K-HighStakes-2025/blob/V1/src/subsystem/colourSort.cpp"
    click LibKS "https://github.com/NoozAbooz/210K-HighStakes-2025/tree/V1/include/libKS/drivetrain/"
    click LVGL "https://github.com/NoozAbooz/210K-HighStakes-2025/tree/V1/include/liblvgl/"
    click Motors "https://github.com/NoozAbooz/210K-HighStakes-2025/blob/V1/include/pros/motors.hpp"
    click IMU "https://github.com/NoozAbooz/210K-HighStakes-2025/blob/V1/include/pros/imu.hpp"
    click ADI "https://github.com/NoozAbooz/210K-HighStakes-2025/blob/V1/include/pros/adi.hpp"
    click RoboDash "https://github.com/NoozAbooz/210K-HighStakes-2025/tree/V1/include/robodash/"
    click AngularPID "https://github.com/NoozAbooz/210K-HighStakes-2025/blob/V1/include/libKS/drivetrain/angularPID.hpp"
    click LateralPID "https://github.com/NoozAbooz/210K-HighStakes-2025/blob/V1/include/libKS/drivetrain/lateralPID.hpp"
    click Odom "https://github.com/NoozAbooz/210K-HighStakes-2025/blob/V1/include/libKS/drivetrain/odom.hpp"

    %% Legend
    classDef legend fill:#f1f1f1,stroke:#333,stroke-width:1px
    subgraph Legend
        direction TB
        L1[Core Components]:::core
        L2[Libraries]:::lib
        L3[Hardware Interface]:::hardware
        L4[User Interface]:::ui
        L5[Control Systems]:::control
    end
```
