The UI is defined in serialUI.ui (assets folder) and designed with QT Designer 5. If you modify it with Designer 6 it will no longer work with Qt5.
The main program (SerialUI.py) loads the UI, adjusts its size, handles QT signal connections, and manages the serial, BLE, USB monitor threads. Plotting occurs in the main thread.
Includes two classes:
QSerial: Manages UI interaction, runs in the main thread.Serial: Runs on its own thread, communicates withQSerial.
Includes classes:
- Async scheduler for bleak commands. Since bleak utilized async framework its necessary to integrate a custom worker to run bleak in separate thread. Qt async interface utilizes the main thread.
QBLESerial: Manages UI interaction, runs in the main thread.BleakWorker: Runs bleak commands on its own loop, communicates withQBLESerial.BluetoothctlWorker: Interfaces Bluetoothctl helper for pairing and trusting.
Provides interface to bluetoothctl utility on Unix like systems.
Uses pyqtgraph or fastplotlib for plotting. Data is stored in a circular buffer, and plotting occurs in the main thread.
The figure is initialized once the user interface is established and the user selects the plotting tab the first time.
updatePlot was optimized for high data rate plotting.
The indicator helper provides an interface to display data in numeric text fields. It also provides ability to display vectors. This is not implemented yet.
Reoccurring functions are collected in this module. It also provides optimized environment variables to handle the operating system and user interface as well as handling signals in Qt.
- binary data transmission including ADPCM, zlib, tamp for compressed data reception.
- indicator