# jakka351/fg-falcon architecture

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

## Overview

This is a community collection of Ford FG Falcon CAN-bus and ECU diagnostic tools, rather than one packaged application. A principal workflow is a tester sending diagnostic requests to an ECU, parsing replies and reporting service or trouble-code information; separate utilities observe or transmit vehicle CAN frames for OBD-II, HVAC, cluster, and steering-wheel-control tasks. The README also describes broader vehicle-network, powertrain, and ICC capabilities, but the supplied tree and sampled source do not establish their runtime wiring. Diagnostic excerpts are partial, so uncertain module-to-module links are omitted.

Main entry points: [`Diagnostic/parser.py`](https://github.com/jakka351/fg-falcon/blob/master/Diagnostic/parser.py) (Diagnostic parser), [`FG1.py`](https://github.com/jakka351/fg-falcon/blob/master/FG1.py) (FG1 ECU tools), [`resources/software/pythoncan/simple_obdii_coolant_temp_request.py`](https://github.com/jakka351/fg-falcon/blob/master/resources/software/pythoncan/simple_obdii_coolant_temp_request.py) (OBD-II request), [`Diagnostic/diagnosticCommand.cs`](https://github.com/jakka351/fg-falcon/blob/master/Diagnostic/diagnosticCommand.cs) (Diagnostic commands)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_diag["ECU diagnostics"]
  node_parser["Diagnostic parser<br/>[parser.py]"]
  node_fg1["FG1 ECU tools<br/>[FG1.py]"]
  node_diagcmd["Diagnostic commands"]
  node_session["Session control"]
  node_dtc["Trouble codes"]
end

subgraph group_canutils["CAN utilities"]
  node_obdrequest["OBD-II request"]
  node_canlog["CAN logging and capture"]
  node_hvac["HVAC monitor<br/>[hvac.py]"]
  node_cluster["Cluster display hack<br/>[0x330.py]"]
  node_swc["Steering controls"]
  node_canexamples["CAN examples"]
end

subgraph group_vehicle["Vehicle interfaces"]
  node_canbus(("Vehicle CAN network"))
  node_mcp["MCP2515 CAN driver<br/>[mcp_can.cpp]"]
end

subgraph group_protocol["Protocol references"]
  node_dtclookup["DTC descriptions<br/>[DTC.py]"]
  node_arb["CAN message definitions<br/>[ARB.py]"]
  node_diagdefs["Diagnostic protocol tables"]
end

node_tester(("Diagnostic tester"))
node_ecu(("Vehicle ECUs"))

node_tester -->|"initiates"| node_parser
node_parser -->|"loads definitions"| node_arb
node_parser -->|"sends and receives"| node_canbus
node_canbus -->|"delivers frames"| node_parser
node_ecu -->|"exchanges frames"| node_canbus
node_fg1 -->|"sends and receives"| node_canbus
node_fg1 -->|"uses protocol data"| node_diagdefs
node_parser -->|"uses descriptions"| node_dtclookup
node_diagcmd -->|"requests services"| node_ecu
node_session -->|"requests session"| node_ecu
node_dtc -->|"requests trouble codes"| node_ecu
node_obdrequest -->|"sends OBD request"| node_canbus
node_canbus -->|"returns frames"| node_obdrequest
node_canlog -->|"captures frames"| node_canbus
node_canexamples -->|"demonstrate traffic"| node_canbus
node_hvac -->|"reads frames"| node_canbus
node_cluster -->|"reads and transmits"| node_canbus
node_swc -->|"reads frames"| node_canbus
node_mcp -.->|"interfaces with"| node_canbus

click node_parser "https://github.com/jakka351/fg-falcon/blob/master/Diagnostic/parser.py"
click node_fg1 "https://github.com/jakka351/fg-falcon/blob/master/FG1.py"
click node_diagcmd "https://github.com/jakka351/fg-falcon/blob/master/Diagnostic/diagnosticCommand.cs"
click node_session "https://github.com/jakka351/fg-falcon/blob/master/Diagnostic/diagnosticSessionControl.cs"
click node_dtc "https://github.com/jakka351/fg-falcon/blob/master/Diagnostic/diagnosticTroubleCodes.cs"
click node_dtclookup "https://github.com/jakka351/fg-falcon/blob/master/Diagnostic/lib/DTC.py"
click node_arb "https://github.com/jakka351/fg-falcon/blob/master/Diagnostic/lib/ARB.py"
click node_diagdefs "https://github.com/jakka351/fg-falcon/tree/master/Diagnostic/lib"
click node_obdrequest "https://github.com/jakka351/fg-falcon/blob/master/resources/software/pythoncan/simple_obdii_coolant_temp_request.py"
click node_canlog "https://github.com/jakka351/fg-falcon/tree/master/resources/software/pythoncan"
click node_hvac "https://github.com/jakka351/fg-falcon/blob/master/resources/software/fg/hvac.py"
click node_cluster "https://github.com/jakka351/fg-falcon/blob/master/resources/0x330.py"
click node_swc "https://github.com/jakka351/fg-falcon/blob/master/resources/software/jakka351/fdim_text/VolClusterLights2.py"
click node_mcp "https://github.com/jakka351/fg-falcon/blob/master/resources/software/arduino/MCP2515/mcp_can.cpp"
click node_canexamples "https://github.com/jakka351/fg-falcon/tree/master/resources/software/pythoncan"

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_parser,node_fg1,node_diagcmd,node_session,node_dtc toneBlue
class node_obdrequest,node_canlog,node_hvac,node_cluster,node_swc,node_canexamples toneAmber
class node_canbus,node_mcp toneMint
class node_dtclookup,node_arb,node_diagdefs toneRose
class node_tester,node_ecu toneIndigo
```

## Components

### ECU diagnostics

- [Diagnostic parser](https://github.com/jakka351/fg-falcon/blob/master/Diagnostic/parser.py): `Diagnostic/parser.py`
- [FG1 ECU tools](https://github.com/jakka351/fg-falcon/blob/master/FG1.py): `FG1.py`
- [Diagnostic commands](https://github.com/jakka351/fg-falcon/blob/master/Diagnostic/diagnosticCommand.cs): `Diagnostic/diagnosticCommand.cs`
- [Session control](https://github.com/jakka351/fg-falcon/blob/master/Diagnostic/diagnosticSessionControl.cs): `Diagnostic/diagnosticSessionControl.cs`
- [Trouble codes](https://github.com/jakka351/fg-falcon/blob/master/Diagnostic/diagnosticTroubleCodes.cs): `Diagnostic/diagnosticTroubleCodes.cs`

### CAN utilities

- [OBD-II request](https://github.com/jakka351/fg-falcon/blob/master/resources/software/pythoncan/simple_obdii_coolant_temp_request.py): `resources/software/pythoncan/simple_obdii_coolant_temp_request.py`
- [CAN logging and capture](https://github.com/jakka351/fg-falcon/tree/master/resources/software/pythoncan): `resources/software/pythoncan`
- [HVAC monitor](https://github.com/jakka351/fg-falcon/blob/master/resources/software/fg/hvac.py): `resources/software/fg/hvac.py`
- [Cluster display hack](https://github.com/jakka351/fg-falcon/blob/master/resources/0x330.py): `resources/0x330.py`
- [Steering controls](https://github.com/jakka351/fg-falcon/blob/master/resources/software/jakka351/fdim_text/VolClusterLights2.py): `resources/software/jakka351/fdim_text/VolClusterLights2.py`
- [CAN examples](https://github.com/jakka351/fg-falcon/tree/master/resources/software/pythoncan): `resources/software/pythoncan`

### Vehicle interfaces

- **Vehicle CAN network**
- [MCP2515 CAN driver](https://github.com/jakka351/fg-falcon/blob/master/resources/software/arduino/MCP2515/mcp_can.cpp): `resources/software/arduino/MCP2515/mcp_can.cpp`

### Protocol references

- [DTC descriptions](https://github.com/jakka351/fg-falcon/blob/master/Diagnostic/lib/DTC.py): `Diagnostic/lib/DTC.py`
- [CAN message definitions](https://github.com/jakka351/fg-falcon/blob/master/Diagnostic/lib/ARB.py): `Diagnostic/lib/ARB.py`
- [Diagnostic protocol tables](https://github.com/jakka351/fg-falcon/tree/master/Diagnostic/lib): `Diagnostic/lib`

### Other components

- **Diagnostic tester**
- **Vehicle ECUs**

## Connections

- Diagnostic tester → Diagnostic parser: initiates
- Diagnostic parser → CAN message definitions: loads definitions
- Diagnostic parser → Vehicle CAN network: sends and receives
- Vehicle CAN network → Diagnostic parser: delivers frames
- Vehicle ECUs → Vehicle CAN network: exchanges frames
- FG1 ECU tools → Vehicle CAN network: sends and receives
- FG1 ECU tools → Diagnostic protocol tables: uses protocol data
- Diagnostic parser → DTC descriptions: uses descriptions
- Diagnostic commands → Vehicle ECUs: requests services
- Session control → Vehicle ECUs: requests session
- Trouble codes → Vehicle ECUs: requests trouble codes
- OBD-II request → Vehicle CAN network: sends OBD request
- Vehicle CAN network → OBD-II request: returns frames
- CAN logging and capture → Vehicle CAN network: captures frames
- CAN examples → Vehicle CAN network: demonstrate traffic
- HVAC monitor → Vehicle CAN network: reads frames
- Cluster display hack → Vehicle CAN network: reads and transmits
- Steering controls → Vehicle CAN network: reads frames
- MCP2515 CAN driver → Vehicle CAN network: interfaces with
