Files
2026-01-17 09:53:08 +02:00

26 lines
1.1 KiB
Markdown
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# Py Qt configurator for RX/TX firmware
Desktop GUI (PyQt6) that talks to the device over USB CDC (virtual COM). It sends line-delimited JSON commands and applies changes immediately when you edit controls.
## Setup
```
cd py_app
python3 -m venv .venv
source .venv/bin/activate # or .venv\Scripts\activate on Windows
pip install -r requirements.txt
python main.py
```
## Protocol expected on the device side
The firmware should read UTF-8 lines from the USB CDC serial port and handle JSON commands:
- `{"cmd": "set_params", "params": {freq_mhz, band, bw_khz, sf, cr, tx_power_dbm, period_ms, tx_enabled, payload}}` — apply and persist as needed.
- `{"cmd": "get_status"}` — respond with JSON status (e.g. metrics, current params).
- `{"cmd": "reboot_bootloader"}` — reboot into ROM bootloader for flashing.
The GUI logs any text received, so returning JSON or human-readable lines works.
## Notes
- Bands offered: 430/868/915/L/S/2.4G; frequency control is in MHz (1502500).
- Payload length is limited to 31 chars to match the firmware UI constraint.
- Changes are debounced by 150 ms; dragging a spinbox will send the last value when you stop.