# eevee12312/car_ecu architecture

> Architecture diagram of the GitHub repository eevee12312/car_ecu, 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/eevee12312/car_ecu
- Repository: https://github.com/eevee12312/car_ecu

## Overview

This repository is a Python VR38DETT vehicle simulator with a real-time joystick-driven run loop, engine audio, telemetry dashboards, and a separate dyno/tuning toolset. The principal workflow is driver input → engine and vehicle simulation → live telemetry, sound, and benchmark logging. The excerpts show the simulation and UI responsibilities, but not enough of the socket protocol or every runtime call site to map all connections confidently; the graph omits uncertain wiring.

Main entry points: [`dyno/dyno.py`](https://github.com/eevee12312/car_ecu/blob/main/dyno/dyno.py) (Dyno Simulator), [`throttle.py`](https://github.com/eevee12312/car_ecu/blob/main/throttle.py) (Vehicle Model), [`engine_sound_mine.py`](https://github.com/eevee12312/car_ecu/blob/main/engine_sound_mine.py) (Engine Audio), [`main.py`](https://github.com/eevee12312/car_ecu/blob/main/main.py) (ECU Dashboard)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_run["Driving Simulation"]
  node_input_loop["Joystick Loop<br/>[throttle.py]"]
  node_vehicle_model["Vehicle Model<br/>[throttle.py]"]
  node_benchmark["Run Benchmarks<br/>[throttle.py]"]
  node_run_log["Run Log<br/>[log.txt]"]
end

subgraph group_display["Telemetry and Audio"]
  node_engine_audio["Engine Audio"]
  node_audio_assets["Audio Samples"]
  node_ecu_dashboard["ECU Dashboard<br/>[main.py]"]
  node_gauge_widgets["Gauge Widgets<br/>[tachometer.py]"]
  node_dyno_dashboard["Live Dyno Dashboard<br/>[tuner.py]"]
  node_telemetry_link["Telemetry Receiver<br/>[tuner.py]"]
end

subgraph group_tuning["Dyno and Tuning"]
  node_dyno_simulator["Dyno Simulator<br/>[dyno.py]"]
  node_map_editor["Map Editors<br/>[tuner.py]"]
  node_dyno_graphs["Dyno Graphs<br/>[dyno_graph.py]"]
  node_tuning_assistant["Tuning Assistant<br/>[dyno_graph.py]"]
end

subgraph group_profiles["Tune Profiles"]
  node_tune_configs["Tune Configurations"]
  node_tune_profiles["Engine Profiles"]
end

node_driver(("Driver"))

node_driver -->|"controls"| node_input_loop
node_input_loop -->|"updates state"| node_vehicle_model
node_input_loop -->|"starts audio"| node_engine_audio
node_vehicle_model -->|"records run"| node_benchmark
node_benchmark -->|"logs results"| node_run_log
node_engine_audio -->|"loads samples"| node_audio_assets
node_vehicle_model -.->|"sends telemetry"| node_ecu_dashboard
node_ecu_dashboard -->|"updates gauges"| node_gauge_widgets
node_vehicle_model -.->|"streams telemetry"| node_telemetry_link
node_telemetry_link -->|"dispatches data"| node_dyno_dashboard
node_dyno_simulator -->|"loads tune"| node_tune_configs
node_dyno_simulator -->|"loads profile"| node_tune_profiles
node_dyno_simulator -->|"supplies results"| node_dyno_graphs
node_dyno_simulator -->|"supplies results"| node_tuning_assistant
node_map_editor -.->|"publishes map data"| node_dyno_dashboard

click node_input_loop "https://github.com/eevee12312/car_ecu/blob/main/throttle.py"
click node_vehicle_model "https://github.com/eevee12312/car_ecu/blob/main/throttle.py"
click node_benchmark "https://github.com/eevee12312/car_ecu/blob/main/throttle.py"
click node_run_log "https://github.com/eevee12312/car_ecu/blob/main/log.txt"
click node_engine_audio "https://github.com/eevee12312/car_ecu/blob/main/engine_sound_mine.py"
click node_audio_assets "https://github.com/eevee12312/car_ecu/tree/main/sounds"
click node_ecu_dashboard "https://github.com/eevee12312/car_ecu/blob/main/main.py"
click node_gauge_widgets "https://github.com/eevee12312/car_ecu/blob/main/tachometer.py"
click node_dyno_dashboard "https://github.com/eevee12312/car_ecu/blob/main/dyno/tuner.py"
click node_telemetry_link "https://github.com/eevee12312/car_ecu/blob/main/dyno/tuner.py"
click node_dyno_simulator "https://github.com/eevee12312/car_ecu/blob/main/dyno/dyno.py"
click node_map_editor "https://github.com/eevee12312/car_ecu/blob/main/dyno/tuner.py"
click node_dyno_graphs "https://github.com/eevee12312/car_ecu/blob/main/dyno/dyno_graph.py"
click node_tuning_assistant "https://github.com/eevee12312/car_ecu/blob/main/dyno/dyno_graph.py"
click node_tune_configs "https://github.com/eevee12312/car_ecu/tree/main/dyno"
click node_tune_profiles "https://github.com/eevee12312/car_ecu/blob/main/dyno/engine_profiles.json"

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_input_loop,node_vehicle_model,node_benchmark,node_run_log toneBlue
class node_engine_audio,node_audio_assets,node_ecu_dashboard,node_gauge_widgets,node_dyno_dashboard,node_telemetry_link toneAmber
class node_dyno_simulator,node_map_editor,node_dyno_graphs,node_tuning_assistant toneMint
class node_tune_configs,node_tune_profiles toneRose
class node_driver toneIndigo
```

## Components

### Driving Simulation

- [Joystick Loop](https://github.com/eevee12312/car_ecu/blob/main/throttle.py): `throttle.py`
- [Vehicle Model](https://github.com/eevee12312/car_ecu/blob/main/throttle.py): `throttle.py`
- [Run Benchmarks](https://github.com/eevee12312/car_ecu/blob/main/throttle.py): `throttle.py`
- [Run Log](https://github.com/eevee12312/car_ecu/blob/main/log.txt): `log.txt`

### Telemetry and Audio

- [Engine Audio](https://github.com/eevee12312/car_ecu/blob/main/engine_sound_mine.py): `engine_sound_mine.py`
- [Audio Samples](https://github.com/eevee12312/car_ecu/tree/main/sounds): `sounds`
- [ECU Dashboard](https://github.com/eevee12312/car_ecu/blob/main/main.py): `main.py`
- [Gauge Widgets](https://github.com/eevee12312/car_ecu/blob/main/tachometer.py): `tachometer.py`
- [Live Dyno Dashboard](https://github.com/eevee12312/car_ecu/blob/main/dyno/tuner.py): `dyno/tuner.py`
- [Telemetry Receiver](https://github.com/eevee12312/car_ecu/blob/main/dyno/tuner.py): `dyno/tuner.py`

### Dyno and Tuning

- [Dyno Simulator](https://github.com/eevee12312/car_ecu/blob/main/dyno/dyno.py): `dyno/dyno.py`
- [Map Editors](https://github.com/eevee12312/car_ecu/blob/main/dyno/tuner.py): `dyno/tuner.py`
- [Dyno Graphs](https://github.com/eevee12312/car_ecu/blob/main/dyno/dyno_graph.py): `dyno/dyno_graph.py`
- [Tuning Assistant](https://github.com/eevee12312/car_ecu/blob/main/dyno/dyno_graph.py): `dyno/dyno_graph.py`

### Tune Profiles

- [Tune Configurations](https://github.com/eevee12312/car_ecu/tree/main/dyno): `dyno`
- [Engine Profiles](https://github.com/eevee12312/car_ecu/blob/main/dyno/engine_profiles.json): `dyno/engine_profiles.json`

### Other components

- **Driver**

## Connections

- Driver → Joystick Loop: controls
- Joystick Loop → Vehicle Model: updates state
- Joystick Loop → Engine Audio: starts audio
- Vehicle Model → Run Benchmarks: records run
- Run Benchmarks → Run Log: logs results
- Engine Audio → Audio Samples: loads samples
- Vehicle Model → ECU Dashboard: sends telemetry
- ECU Dashboard → Gauge Widgets: updates gauges
- Vehicle Model → Telemetry Receiver: streams telemetry
- Telemetry Receiver → Live Dyno Dashboard: dispatches data
- Dyno Simulator → Tune Configurations: loads tune
- Dyno Simulator → Engine Profiles: loads profile
- Dyno Simulator → Dyno Graphs: supplies results
- Dyno Simulator → Tuning Assistant: supplies results
- Map Editors → Live Dyno Dashboard: publishes map data
