# ubcaerodesign/thrust-stand-v2 architecture

> Architecture diagram of the GitHub repository ubcaerodesign/thrust-stand-v2, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-09-25). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/ubcaerodesign/thrust-stand-v2
- Repository: https://github.com/ubcaerodesign/thrust-stand-v2

## Overview

AeroThrust is a desktop application for connecting to a test board, monitoring and calibrating thrust/torque and electrical readings, sending commands, and running scripted tests that can produce data points. The main flow is user → desktop UI → serial board → readings/commands, with a separate script-execution branch. The README is a startup guide rather than a feature specification; script-to-UI data handling and several UI details are not shown in the sampled source, so those links are omitted where wiring is uncertain.

Main entry points: [`ui/window.py`](https://github.com/ubcaerodesign/thrust-stand-v2/blob/master/ui/window.py) (Main window), [`board/__init__.py`](https://github.com/ubcaerodesign/thrust-stand-v2/blob/master/board/__init__.py) (Board API), [`ui/connect.py`](https://github.com/ubcaerodesign/thrust-stand-v2/blob/master/ui/connect.py) (Connection console), [`autoTest/reader.py`](https://github.com/ubcaerodesign/thrust-stand-v2/blob/master/autoTest/reader.py) (Script parser and runner)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_application["Desktop application"]
  node_app["Application entry<br/>[main.py]"]
  node_window["Main window<br/>[window.py]"]
  node_navigation["Navigation<br/>[navbar.py]"]
  node_connection_ui["Connection console<br/>[connect.py]"]
  node_board_ui["Board calibration<br/>[board.py]"]
  node_test_ui["Test interface<br/>[test.py]"]
  node_settings_ui["Settings<br/>[settings.py]"]
  node_status_ui["Connection status<br/>[infobar.py]"]
  node_themes["Theme manager<br/>[themeManager.py]"]
end

subgraph group_board["Board communication"]
  node_serial_api["Board API<br/>[__init__.py]"]
  node_serial_reader["Telemetry decoder<br/>[read.py]"]
  node_serial_commands["Command worker<br/>[command.py]"]
end

subgraph group_testing["Scripted testing"]
  node_script_api["Script controls<br/>[__init__.py]"]
  node_script_reader["Script parser and runner<br/>[reader.py]"]
  node_script_grammar["Script grammar<br/>[grammar.lark]"]
end

subgraph group_data["Test data"]
  node_datasheet[("Data table<br/>[__init__.py]")]
  node_data_ui["Data interface<br/>[data.py]"]
end

node_user(("Operator"))
node_firmware["Board firmware<br/>[ardSketch.ino]"]

node_user -->|"launches"| node_app
node_app -->|"starts UI"| node_window
node_window -->|"constructs"| node_navigation
node_window -->|"constructs"| node_connection_ui
node_window -->|"constructs"| node_board_ui
node_window -->|"constructs"| node_test_ui
node_window -->|"constructs"| node_settings_ui
node_window -->|"constructs"| node_status_ui
node_connection_ui -->|"updates status"| node_status_ui
node_connection_ui -->|"connects and polls"| node_serial_api
node_board_ui -->|"calibrates readings"| node_serial_api
node_serial_api -->|"decodes lines"| node_serial_reader
node_serial_api -->|"dispatches commands"| node_serial_commands
node_firmware -->|"sends telemetry"| node_serial_api
node_serial_api -->|"sends commands"| node_firmware
node_script_api -->|"runs scripts"| node_script_reader
node_script_reader -->|"parses with"| node_script_grammar
node_script_reader -->|"reads and controls"| node_serial_api
node_datasheet -->|"provides data"| node_data_ui
node_themes -->|"supplies theme"| node_connection_ui
node_themes -->|"supplies theme"| node_board_ui

click node_app "https://github.com/ubcaerodesign/thrust-stand-v2/blob/master/main.py"
click node_window "https://github.com/ubcaerodesign/thrust-stand-v2/blob/master/ui/window.py"
click node_navigation "https://github.com/ubcaerodesign/thrust-stand-v2/blob/master/ui/navbar.py"
click node_connection_ui "https://github.com/ubcaerodesign/thrust-stand-v2/blob/master/ui/connect.py"
click node_board_ui "https://github.com/ubcaerodesign/thrust-stand-v2/blob/master/ui/board.py"
click node_test_ui "https://github.com/ubcaerodesign/thrust-stand-v2/blob/master/ui/test.py"
click node_settings_ui "https://github.com/ubcaerodesign/thrust-stand-v2/blob/master/ui/settings.py"
click node_status_ui "https://github.com/ubcaerodesign/thrust-stand-v2/blob/master/ui/infobar.py"
click node_themes "https://github.com/ubcaerodesign/thrust-stand-v2/blob/master/ui/themeManager.py"
click node_serial_api "https://github.com/ubcaerodesign/thrust-stand-v2/blob/master/board/__init__.py"
click node_serial_reader "https://github.com/ubcaerodesign/thrust-stand-v2/blob/master/board/read.py"
click node_serial_commands "https://github.com/ubcaerodesign/thrust-stand-v2/blob/master/board/command.py"
click node_firmware "https://github.com/ubcaerodesign/thrust-stand-v2/blob/master/boardCode/ardSketch/ardSketch.ino"
click node_script_api "https://github.com/ubcaerodesign/thrust-stand-v2/blob/master/autoTest/__init__.py"
click node_script_reader "https://github.com/ubcaerodesign/thrust-stand-v2/blob/master/autoTest/reader.py"
click node_script_grammar "https://github.com/ubcaerodesign/thrust-stand-v2/blob/master/autoTest/grammar.lark"
click node_datasheet "https://github.com/ubcaerodesign/thrust-stand-v2/blob/master/nums/__init__.py"
click node_data_ui "https://github.com/ubcaerodesign/thrust-stand-v2/blob/master/ui/data.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_app,node_window,node_navigation,node_connection_ui,node_board_ui,node_test_ui,node_settings_ui,node_status_ui,node_themes toneBlue
class node_serial_api,node_serial_reader,node_serial_commands toneAmber
class node_script_api,node_script_reader,node_script_grammar toneMint
class node_datasheet,node_data_ui toneRose
class node_user toneIndigo
class node_firmware toneTeal
```

## Components

### Desktop application

- [Application entry](https://github.com/ubcaerodesign/thrust-stand-v2/blob/master/main.py): `main.py`
- [Main window](https://github.com/ubcaerodesign/thrust-stand-v2/blob/master/ui/window.py): `ui/window.py`
- [Navigation](https://github.com/ubcaerodesign/thrust-stand-v2/blob/master/ui/navbar.py): `ui/navbar.py`
- [Connection console](https://github.com/ubcaerodesign/thrust-stand-v2/blob/master/ui/connect.py): `ui/connect.py`
- [Board calibration](https://github.com/ubcaerodesign/thrust-stand-v2/blob/master/ui/board.py): `ui/board.py`
- [Test interface](https://github.com/ubcaerodesign/thrust-stand-v2/blob/master/ui/test.py): `ui/test.py`
- [Settings](https://github.com/ubcaerodesign/thrust-stand-v2/blob/master/ui/settings.py): `ui/settings.py`
- [Connection status](https://github.com/ubcaerodesign/thrust-stand-v2/blob/master/ui/infobar.py): `ui/infobar.py`
- [Theme manager](https://github.com/ubcaerodesign/thrust-stand-v2/blob/master/ui/themeManager.py): `ui/themeManager.py`

### Board communication

- [Board API](https://github.com/ubcaerodesign/thrust-stand-v2/blob/master/board/__init__.py): `board/__init__.py`
- [Telemetry decoder](https://github.com/ubcaerodesign/thrust-stand-v2/blob/master/board/read.py): `board/read.py`
- [Command worker](https://github.com/ubcaerodesign/thrust-stand-v2/blob/master/board/command.py): `board/command.py`

### Scripted testing

- [Script controls](https://github.com/ubcaerodesign/thrust-stand-v2/blob/master/autoTest/__init__.py): `autoTest/__init__.py`
- [Script parser and runner](https://github.com/ubcaerodesign/thrust-stand-v2/blob/master/autoTest/reader.py): `autoTest/reader.py`
- [Script grammar](https://github.com/ubcaerodesign/thrust-stand-v2/blob/master/autoTest/grammar.lark): `autoTest/grammar.lark`

### Test data

- [Data table](https://github.com/ubcaerodesign/thrust-stand-v2/blob/master/nums/__init__.py): `nums/__init__.py`
- [Data interface](https://github.com/ubcaerodesign/thrust-stand-v2/blob/master/ui/data.py): `ui/data.py`

### Other components

- **Operator**
- [Board firmware](https://github.com/ubcaerodesign/thrust-stand-v2/blob/master/boardCode/ardSketch/ardSketch.ino): `boardCode/ardSketch/ardSketch.ino`

## Connections

- Operator → Application entry: launches
- Application entry → Main window: starts UI
- Main window → Navigation: constructs
- Main window → Connection console: constructs
- Main window → Board calibration: constructs
- Main window → Test interface: constructs
- Main window → Settings: constructs
- Main window → Connection status: constructs
- Connection console → Connection status: updates status
- Connection console → Board API: connects and polls
- Board calibration → Board API: calibrates readings
- Board API → Telemetry decoder: decodes lines
- Board API → Command worker: dispatches commands
- Board firmware → Board API: sends telemetry
- Board API → Board firmware: sends commands
- Script controls → Script parser and runner: runs scripts
- Script parser and runner → Script grammar: parses with
- Script parser and runner → Board API: reads and controls
- Data table → Data interface: provides data
- Theme manager → Connection console: supplies theme
- Theme manager → Board calibration: supplies theme
