# bitcraze/crazyflie-clients-python architecture

> Architecture diagram of the GitHub repository bitcraze/crazyflie-clients-python, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-11-17). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/bitcraze/crazyflie-clients-python
- Repository: https://github.com/bitcraze/crazyflie-clients-python

## Overview

This repository provides four host applications: the graphical and headless Crazyflie clients, a firmware loader, and a ZeroMQ interface. In the main GUI workflow, the client initializes the radio drivers and Crazyflie link, then exposes connection management and flight, parameter, logging, and visualization features. Input-device discovery, mapping, and multiplexing provide a separate control-input branch; Lighthouse positioning provides a specialized configuration and estimation branch. Edges are limited to relationships visible in the supplied excerpts, source index, or README; several capabilities are documented but their detailed wiring was not sampled.

Main entry points: [`src/cfclient/ui/main.py`](https://github.com/bitcraze/crazyflie-clients-python/blob/master/src/cfclient/ui/main.py) (GUI runtime), [`src/cfclient/utils/input/__init__.py`](https://github.com/bitcraze/crazyflie-clients-python/blob/master/src/cfclient/utils/input/__init__.py) (Input manager), [`src/cfclient/ui/tabs/lighthouse_tab.py`](https://github.com/bitcraze/crazyflie-clients-python/blob/master/src/cfclient/ui/tabs/lighthouse_tab.py) (Lighthouse positioning), [`src/cfclient/gui.py`](https://github.com/bitcraze/crazyflie-clients-python/blob/master/src/cfclient/gui.py) (Desktop client)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_client["Client applications"]
  node_gui["Desktop client<br/>[gui.py]"]
  node_main["GUI runtime<br/>[main.py]"]
  node_headless["Headless client<br/>[headless.py]"]
  node_loader["Firmware loader<br/>[__init__.py]"]
end

subgraph group_control["Control and connection"]
  node_link(("Crazyflie link"))
  node_connect["Connection controls"]
  node_input["Input manager<br/>[__init__.py]"]
  node_readers["Input readers"]
  node_mux["Input multiplexers"]
  node_inputconfig[("Input mappings<br/>[config_manager.py]")]
end

subgraph group_features["Flight and configuration"]
  node_tabs["Flight and data tabs"]
  node_toolbox["Tab framework<br/>[tab_toolbox.py]"]
  node_boot["Firmware service UI<br/>[bootloader.py]"]
  node_lighthouse["Lighthouse positioning<br/>[lighthouse_tab.py]"]
  node_estimator["Geometry estimator"]
  node_config[("App configuration<br/>[config.py]")]
end

subgraph group_services["Host interfaces"]
  node_zmq["ZeroMQ interface<br/>[__init__.py]"]
  node_external["cflib"]
end

node_user(("Operator"))

node_user -->|"launches"| node_gui
node_gui -->|"starts"| node_main
node_main -->|"initializes drivers"| node_external
node_main -->|"uses"| node_connect
node_main -->|"uses"| node_input
node_main -->|"reads"| node_config
node_main -->|"hosts"| node_tabs
node_main -->|"uses"| node_toolbox
node_main -->|"opens"| node_boot
node_main -->|"creates Crazyflie"| node_external
node_input -->|"discovers"| node_readers
node_input -->|"dispatches through"| node_mux
node_input -.->|"loads mappings"| node_inputconfig
node_lighthouse -->|"embeds"| node_estimator
node_lighthouse -->|"extends"| node_toolbox
node_user -->|"launches"| node_headless
node_headless -->|"uses"| node_input
node_user -->|"invokes"| node_loader
node_loader -->|"flashes firmware"| node_external
node_user -->|"connects via"| node_zmq
node_zmq -->|"controls and queries"| node_external

click node_gui "https://github.com/bitcraze/crazyflie-clients-python/blob/master/src/cfclient/gui.py"
click node_main "https://github.com/bitcraze/crazyflie-clients-python/blob/master/src/cfclient/ui/main.py"
click node_headless "https://github.com/bitcraze/crazyflie-clients-python/blob/master/src/cfclient/headless.py"
click node_loader "https://github.com/bitcraze/crazyflie-clients-python/blob/master/src/cfloader/__init__.py"
click node_connect "https://github.com/bitcraze/crazyflie-clients-python/blob/master/src/cfclient/ui/connectivity_manager.py"
click node_input "https://github.com/bitcraze/crazyflie-clients-python/blob/master/src/cfclient/utils/input/__init__.py"
click node_readers "https://github.com/bitcraze/crazyflie-clients-python/tree/master/src/cfclient/utils/input/inputreaders"
click node_mux "https://github.com/bitcraze/crazyflie-clients-python/tree/master/src/cfclient/utils/input/mux"
click node_inputconfig "https://github.com/bitcraze/crazyflie-clients-python/blob/master/src/cfclient/utils/config_manager.py"
click node_tabs "https://github.com/bitcraze/crazyflie-clients-python/tree/master/src/cfclient/ui/tabs"
click node_toolbox "https://github.com/bitcraze/crazyflie-clients-python/blob/master/src/cfclient/ui/tab_toolbox.py"
click node_boot "https://github.com/bitcraze/crazyflie-clients-python/blob/master/src/cfclient/ui/dialogs/bootloader.py"
click node_lighthouse "https://github.com/bitcraze/crazyflie-clients-python/blob/master/src/cfclient/ui/tabs/lighthouse_tab.py"
click node_estimator "https://github.com/bitcraze/crazyflie-clients-python/blob/master/src/cfclient/ui/widgets/geo_estimator_widget.py"
click node_config "https://github.com/bitcraze/crazyflie-clients-python/blob/master/src/cfclient/utils/config.py"
click node_zmq "https://github.com/bitcraze/crazyflie-clients-python/blob/master/src/cfzmq/__init__.py"

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_gui,node_main,node_headless,node_loader toneBlue
class node_link,node_connect,node_input,node_readers,node_mux,node_inputconfig toneAmber
class node_tabs,node_toolbox,node_boot,node_lighthouse,node_estimator,node_config toneMint
class node_zmq,node_external toneRose
class node_user toneIndigo
```

## Components

### Client applications

- [Desktop client](https://github.com/bitcraze/crazyflie-clients-python/blob/master/src/cfclient/gui.py): `src/cfclient/gui.py`
- [GUI runtime](https://github.com/bitcraze/crazyflie-clients-python/blob/master/src/cfclient/ui/main.py): `src/cfclient/ui/main.py`
- [Headless client](https://github.com/bitcraze/crazyflie-clients-python/blob/master/src/cfclient/headless.py): `src/cfclient/headless.py`
- [Firmware loader](https://github.com/bitcraze/crazyflie-clients-python/blob/master/src/cfloader/__init__.py): `src/cfloader/__init__.py`

### Control and connection

- **Crazyflie link**
- [Connection controls](https://github.com/bitcraze/crazyflie-clients-python/blob/master/src/cfclient/ui/connectivity_manager.py): `src/cfclient/ui/connectivity_manager.py`
- [Input manager](https://github.com/bitcraze/crazyflie-clients-python/blob/master/src/cfclient/utils/input/__init__.py): `src/cfclient/utils/input/__init__.py`
- [Input readers](https://github.com/bitcraze/crazyflie-clients-python/tree/master/src/cfclient/utils/input/inputreaders): `src/cfclient/utils/input/inputreaders`
- [Input multiplexers](https://github.com/bitcraze/crazyflie-clients-python/tree/master/src/cfclient/utils/input/mux): `src/cfclient/utils/input/mux`
- [Input mappings](https://github.com/bitcraze/crazyflie-clients-python/blob/master/src/cfclient/utils/config_manager.py): `src/cfclient/utils/config_manager.py`

### Flight and configuration

- [Flight and data tabs](https://github.com/bitcraze/crazyflie-clients-python/tree/master/src/cfclient/ui/tabs): `src/cfclient/ui/tabs`
- [Tab framework](https://github.com/bitcraze/crazyflie-clients-python/blob/master/src/cfclient/ui/tab_toolbox.py): `src/cfclient/ui/tab_toolbox.py`
- [Firmware service UI](https://github.com/bitcraze/crazyflie-clients-python/blob/master/src/cfclient/ui/dialogs/bootloader.py): `src/cfclient/ui/dialogs/bootloader.py`
- [Lighthouse positioning](https://github.com/bitcraze/crazyflie-clients-python/blob/master/src/cfclient/ui/tabs/lighthouse_tab.py): `src/cfclient/ui/tabs/lighthouse_tab.py`
- [Geometry estimator](https://github.com/bitcraze/crazyflie-clients-python/blob/master/src/cfclient/ui/widgets/geo_estimator_widget.py): `src/cfclient/ui/widgets/geo_estimator_widget.py`
- [App configuration](https://github.com/bitcraze/crazyflie-clients-python/blob/master/src/cfclient/utils/config.py): `src/cfclient/utils/config.py`

### Host interfaces

- [ZeroMQ interface](https://github.com/bitcraze/crazyflie-clients-python/blob/master/src/cfzmq/__init__.py): `src/cfzmq/__init__.py`
- **cflib**

### Other components

- **Operator**

## Connections

- Operator → Desktop client: launches
- Desktop client → GUI runtime: starts (evidence: `src/cfclient/gui.py`)
- GUI runtime → cflib: initializes drivers (evidence: `src/cfclient/ui/main.py`)
- GUI runtime → Connection controls: uses (evidence: `src/cfclient/ui/main.py`)
- GUI runtime → Input manager: uses (evidence: `src/cfclient/ui/main.py`)
- GUI runtime → App configuration: reads (evidence: `src/cfclient/ui/main.py`)
- GUI runtime → Flight and data tabs: hosts (evidence: `src/cfclient/ui/main.py`)
- GUI runtime → Tab framework: uses (evidence: `src/cfclient/ui/main.py`)
- GUI runtime → Firmware service UI: opens (evidence: `src/cfclient/ui/main.py`)
- GUI runtime → cflib: creates Crazyflie (evidence: `src/cfclient/ui/main.py`)
- Input manager → Input readers: discovers (evidence: `src/cfclient/utils/input/__init__.py`)
- Input manager → Input multiplexers: dispatches through (evidence: `src/cfclient/utils/input/__init__.py`)
- Input manager → Input mappings: loads mappings (evidence: `src/cfclient/utils/input/__init__.py`)
- Lighthouse positioning → Geometry estimator: embeds (evidence: `src/cfclient/ui/tabs/lighthouse_tab.py`)
- Lighthouse positioning → Tab framework: extends (evidence: `src/cfclient/ui/tabs/lighthouse_tab.py`)
- Operator → Headless client: launches
- Headless client → Input manager: uses (evidence: `src/cfclient/headless.py`)
- Operator → Firmware loader: invokes
- Firmware loader → cflib: flashes firmware (evidence: `src/cfloader/__init__.py`)
- Operator → ZeroMQ interface: connects via
- ZeroMQ interface → cflib: controls and queries (evidence: `src/cfzmq/__init__.py`)
