# poisedundead/custom-expresslrs architecture

> Architecture diagram of the GitHub repository poisedundead/custom-expresslrs, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-02). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/poisedundead/custom-expresslrs
- Repository: https://github.com/poisedundead/custom-expresslrs

## Overview

ExpressLRS is firmware for a low-latency radio-control link, with transmitter and receiver roles, configurable hardware targets, and a browser-based device UI. The main workflow sends control data from a handset through the transmitter’s over-the-air link to a receiver and its configured outputs; telemetry and device configuration complement that path. The graph also includes CRSF routing, device scheduling, and documented Wi-Fi/UI capabilities. Some subsystem links rely on README statements or SOURCE INDEX references; unsampled runtime wiring is not asserted.

Main entry points: [`src/src/tx_main.cpp`](https://github.com/poisedundead/custom-expresslrs/blob/master/src/src/tx_main.cpp) (Transmitter firmware), [`src/src/rx_main.cpp`](https://github.com/poisedundead/custom-expresslrs/blob/master/src/src/rx_main.cpp) (Receiver firmware), [`src/lib/CrsfProtocol/CRSFRouter.cpp`](https://github.com/poisedundead/custom-expresslrs/blob/master/src/lib/CrsfProtocol/CRSFRouter.cpp) (CRSF router), [`src/src/rx-serial/SerialIO.cpp`](https://github.com/poisedundead/custom-expresslrs/blob/master/src/src/rx-serial/SerialIO.cpp) (Serial protocols)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_link["Radio link"]
  node_handset["RC handset<br/>[CRSFHandset.cpp]"]
  node_tx["Transmitter firmware<br/>[tx_main.cpp]"]
  node_ota["OTA packet link<br/>[OTA.cpp]"]
  node_rx["Receiver firmware<br/>[rx_main.cpp]"]
  node_rf["Radio drivers<br/>[SX127x.cpp]"]
end

subgraph group_protocol["Protocols and routing"]
  node_crsf["CRSF protocol<br/>[crsf_protocol.h]"]
  node_router["CRSF router<br/>[CRSFRouter.cpp]"]
  node_parameters["CRSF parameters<br/>[CRSFParameters.h]"]
  node_msp["MSP messaging<br/>[msp.cpp]"]
  node_serial["Serial protocols<br/>[SerialIO.cpp]"]
  node_hott["HoTT telemetry<br/>[SerialHoTT_TLM.cpp]"]
end

subgraph group_runtime["Firmware runtime"]
  node_runtime["Shared link runtime<br/>[rxtx_common.h]"]
  node_deviceframework["Device scheduler<br/>[device.cpp]"]
  node_fifo["Packet FIFO<br/>[FIFO.h]"]
  node_stubborn["Reliable transfer<br/>[stubborn_sender.h]"]
end

subgraph group_device["Device capabilities"]
  node_outputs["Receiver outputs<br/>[devServoOutput.cpp]"]
  node_wifi["Wi-Fi services<br/>[devWIFI.cpp]"]
  node_screen["OLED and TFT<br/>[devScreen.cpp]"]
end

subgraph group_web["Device web UI"]
  node_webapp["Browser configuration UI<br/>[app.js]"]
  node_webstate["UI state and feedback<br/>[state.js]"]
  node_webpages["Configuration pages"]
end

node_pilot(("RC operator"))

node_pilot -->|"provides controls"| node_handset
node_handset -->|"sends controls"| node_tx
node_tx -->|"encodes link packets"| node_ota
node_tx -->|"transmits over"| node_rf
node_rf -->|"carries packets"| node_ota
node_ota -->|"delivers link packets"| node_rx
node_rx -->|"receives over"| node_rf
node_rx -->|"selects outputs"| node_serial
node_serial -.->|"drives outputs"| node_outputs
node_serial -->|"supports telemetry"| node_hott
node_rx -->|"routes CRSF"| node_router
node_tx -->|"uses CRSF routing"| node_router
node_router -->|"routes frames"| node_crsf
node_router -->|"uses MSP types"| node_msp
node_router -.->|"serves parameters"| node_parameters
node_tx -->|"transfers data"| node_stubborn
node_rx -->|"transfers data"| node_stubborn
node_serial -->|"buffers serial data"| node_fifo
node_tx -->|"uses shared runtime"| node_runtime
node_rx -->|"uses shared runtime"| node_runtime
node_tx -->|"initializes devices"| node_deviceframework
node_rx -->|"initializes devices"| node_deviceframework
node_deviceframework -.->|"schedules device"| node_wifi
node_deviceframework -.->|"schedules device"| node_screen
node_pilot -->|"configures hardware"| node_webapp
node_webapp -->|"uses UI state"| node_webstate
node_webapp -->|"loads page groups"| node_webpages
node_webapp -.->|"configures device"| node_wifi

click node_handset "https://github.com/poisedundead/custom-expresslrs/blob/master/src/lib/Handset/CRSFHandset.cpp"
click node_tx "https://github.com/poisedundead/custom-expresslrs/blob/master/src/src/tx_main.cpp"
click node_ota "https://github.com/poisedundead/custom-expresslrs/blob/master/src/lib/OTA/OTA.cpp"
click node_rx "https://github.com/poisedundead/custom-expresslrs/blob/master/src/src/rx_main.cpp"
click node_rf "https://github.com/poisedundead/custom-expresslrs/blob/master/src/lib/SX127xDriver/SX127x.cpp"
click node_crsf "https://github.com/poisedundead/custom-expresslrs/blob/master/src/include/crsf_protocol.h"
click node_router "https://github.com/poisedundead/custom-expresslrs/blob/master/src/lib/CrsfProtocol/CRSFRouter.cpp"
click node_parameters "https://github.com/poisedundead/custom-expresslrs/blob/master/src/lib/CrsfProtocol/CRSFParameters.h"
click node_msp "https://github.com/poisedundead/custom-expresslrs/blob/master/src/lib/MSP/msp.cpp"
click node_serial "https://github.com/poisedundead/custom-expresslrs/blob/master/src/src/rx-serial/SerialIO.cpp"
click node_hott "https://github.com/poisedundead/custom-expresslrs/blob/master/src/src/rx-serial/SerialHoTT_TLM.cpp"
click node_runtime "https://github.com/poisedundead/custom-expresslrs/blob/master/src/src/rxtx_common.h"
click node_deviceframework "https://github.com/poisedundead/custom-expresslrs/blob/master/src/lib/DEVICE/device.cpp"
click node_fifo "https://github.com/poisedundead/custom-expresslrs/blob/master/src/lib/FIFO/FIFO.h"
click node_stubborn "https://github.com/poisedundead/custom-expresslrs/blob/master/src/lib/StubbornSender/stubborn_sender.h"
click node_outputs "https://github.com/poisedundead/custom-expresslrs/blob/master/src/lib/ServoOutput/devServoOutput.cpp"
click node_wifi "https://github.com/poisedundead/custom-expresslrs/blob/master/src/lib/WIFI/devWIFI.cpp"
click node_screen "https://github.com/poisedundead/custom-expresslrs/blob/master/src/lib/SCREEN/devScreen.cpp"
click node_webapp "https://github.com/poisedundead/custom-expresslrs/blob/master/src/html/src/app.js"
click node_webstate "https://github.com/poisedundead/custom-expresslrs/blob/master/src/html/src/utils/state.js"
click node_webpages "https://github.com/poisedundead/custom-expresslrs/tree/master/src/html/src/pages"

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_handset,node_tx,node_ota,node_rx,node_rf toneBlue
class node_crsf,node_router,node_parameters,node_msp,node_serial,node_hott toneAmber
class node_runtime,node_deviceframework,node_fifo,node_stubborn toneMint
class node_outputs,node_wifi,node_screen toneRose
class node_webapp,node_webstate,node_webpages,node_pilot toneIndigo
```

## Components

### Radio link

- [RC handset](https://github.com/poisedundead/custom-expresslrs/blob/master/src/lib/Handset/CRSFHandset.cpp): `src/lib/Handset/CRSFHandset.cpp`
- [Transmitter firmware](https://github.com/poisedundead/custom-expresslrs/blob/master/src/src/tx_main.cpp): `src/src/tx_main.cpp`
- [OTA packet link](https://github.com/poisedundead/custom-expresslrs/blob/master/src/lib/OTA/OTA.cpp): `src/lib/OTA/OTA.cpp`
- [Receiver firmware](https://github.com/poisedundead/custom-expresslrs/blob/master/src/src/rx_main.cpp): `src/src/rx_main.cpp`
- [Radio drivers](https://github.com/poisedundead/custom-expresslrs/blob/master/src/lib/SX127xDriver/SX127x.cpp): `src/lib/SX127xDriver/SX127x.cpp`

### Protocols and routing

- [CRSF protocol](https://github.com/poisedundead/custom-expresslrs/blob/master/src/include/crsf_protocol.h): `src/include/crsf_protocol.h`
- [CRSF router](https://github.com/poisedundead/custom-expresslrs/blob/master/src/lib/CrsfProtocol/CRSFRouter.cpp): `src/lib/CrsfProtocol/CRSFRouter.cpp`
- [CRSF parameters](https://github.com/poisedundead/custom-expresslrs/blob/master/src/lib/CrsfProtocol/CRSFParameters.h): `src/lib/CrsfProtocol/CRSFParameters.h`
- [MSP messaging](https://github.com/poisedundead/custom-expresslrs/blob/master/src/lib/MSP/msp.cpp): `src/lib/MSP/msp.cpp`
- [Serial protocols](https://github.com/poisedundead/custom-expresslrs/blob/master/src/src/rx-serial/SerialIO.cpp): `src/src/rx-serial/SerialIO.cpp`
- [HoTT telemetry](https://github.com/poisedundead/custom-expresslrs/blob/master/src/src/rx-serial/SerialHoTT_TLM.cpp): `src/src/rx-serial/SerialHoTT_TLM.cpp`

### Firmware runtime

- [Shared link runtime](https://github.com/poisedundead/custom-expresslrs/blob/master/src/src/rxtx_common.h): `src/src/rxtx_common.h`
- [Device scheduler](https://github.com/poisedundead/custom-expresslrs/blob/master/src/lib/DEVICE/device.cpp): `src/lib/DEVICE/device.cpp`
- [Packet FIFO](https://github.com/poisedundead/custom-expresslrs/blob/master/src/lib/FIFO/FIFO.h): `src/lib/FIFO/FIFO.h`
- [Reliable transfer](https://github.com/poisedundead/custom-expresslrs/blob/master/src/lib/StubbornSender/stubborn_sender.h): `src/lib/StubbornSender/stubborn_sender.h`

### Device capabilities

- [Receiver outputs](https://github.com/poisedundead/custom-expresslrs/blob/master/src/lib/ServoOutput/devServoOutput.cpp): `src/lib/ServoOutput/devServoOutput.cpp`
- [Wi-Fi services](https://github.com/poisedundead/custom-expresslrs/blob/master/src/lib/WIFI/devWIFI.cpp): `src/lib/WIFI/devWIFI.cpp`
- [OLED and TFT](https://github.com/poisedundead/custom-expresslrs/blob/master/src/lib/SCREEN/devScreen.cpp): `src/lib/SCREEN/devScreen.cpp`

### Device web UI

- [Browser configuration UI](https://github.com/poisedundead/custom-expresslrs/blob/master/src/html/src/app.js): `src/html/src/app.js`
- [UI state and feedback](https://github.com/poisedundead/custom-expresslrs/blob/master/src/html/src/utils/state.js): `src/html/src/utils/state.js`
- [Configuration pages](https://github.com/poisedundead/custom-expresslrs/tree/master/src/html/src/pages): `src/html/src/pages`

### Other components

- **RC operator**

## Connections

- RC operator → RC handset: provides controls (evidence: `README.md`)
- RC handset → Transmitter firmware: sends controls (evidence: `README.md`)
- Transmitter firmware → OTA packet link: encodes link packets (evidence: `src/src/tx_main.cpp`)
- Transmitter firmware → Radio drivers: transmits over
- Radio drivers → OTA packet link: carries packets (evidence: `README.md`)
- OTA packet link → Receiver firmware: delivers link packets (evidence: `README.md`)
- Receiver firmware → Radio drivers: receives over
- Receiver firmware → Serial protocols: selects outputs (evidence: `src/src/rx_main.cpp`)
- Serial protocols → Receiver outputs: drives outputs
- Serial protocols → HoTT telemetry: supports telemetry (evidence: `src/src/rx-serial/SerialHoTT_TLM.cpp`)
- Receiver firmware → CRSF router: routes CRSF (evidence: `src/src/rx_main.cpp`)
- Transmitter firmware → CRSF router: uses CRSF routing (evidence: `src/src/tx_main.cpp`)
- CRSF router → CRSF protocol: routes frames (evidence: `src/lib/CrsfProtocol/CRSFRouter.cpp`)
- CRSF router → MSP messaging: uses MSP types
- CRSF router → CRSF parameters: serves parameters
- Transmitter firmware → Reliable transfer: transfers data (evidence: `src/src/tx_main.cpp`)
- Receiver firmware → Reliable transfer: transfers data (evidence: `src/src/rx_main.cpp`)
- Serial protocols → Packet FIFO: buffers serial data
- Transmitter firmware → Shared link runtime: uses shared runtime (evidence: `src/src/tx_main.cpp`)
- Receiver firmware → Shared link runtime: uses shared runtime (evidence: `src/src/rx_main.cpp`)
- Transmitter firmware → Device scheduler: initializes devices (evidence: `src/src/tx_main.cpp`)
- Receiver firmware → Device scheduler: initializes devices (evidence: `src/src/rx_main.cpp`)
- Device scheduler → Wi-Fi services: schedules device
- Device scheduler → OLED and TFT: schedules device
- RC operator → Browser configuration UI: configures hardware (evidence: `README.md`)
- Browser configuration UI → UI state and feedback: uses UI state (evidence: `src/html/src/app.js`)
- Browser configuration UI → Configuration pages: loads page groups (evidence: `src/html/src/app.js`)
- Browser configuration UI → Wi-Fi services: configures device (evidence: `README.md`)
