-
Notifications
You must be signed in to change notification settings - Fork 204
Description
🚀 Fix GUI AI BCI broken communication
🎯 Summary
During the initial drone + BCI deployment test, a critical bug was found in GUI5.py related to an uninitialized variable. This issue has been fixed by initializing current_data_mode in the BrainwavesBackend's init function.
This ticket serves to formally merge that fix and introduce a major Quality of Life (QoL) enhancement: a comprehensive launch.json configuration for Code Debugging.
🐞 Bug Details: `current_data_mode` Read Error
Description
When the system attempted to read the state of the `current_data_mode` variable in GUI5.py, the program failed because the variable did not exist yet (it was not initialized).
Resolution Implemented
The fix ensures that the system is stable from the start:
- ✅ We explicitly initialize the `current_data_mode` variable within the
__init__function of theBrainwavesBackendclass.
Files Affected
[Path to BrainwavesBackend class file, e.g., brainwaves_backend.py]GUI5.py(Error origin)
🛠️ Enhancement: Code Debugging Setup
Goal
To dramatically improve developer workflow and diagnosis speed by enabling immediate, line-by-line debugging of any Python file in the repository using Visual Studio Code.
Implementation
- ⚙️ A
.vscode/launch.jsonconfiguration file has been added to the repository. - This setup allows developers to hit F5 in Code and start the debugger directly on any selected Python file.
Testing/Verification Steps
- Clone the updated branch/PR.
- Open the project in Code.
- Set a breakpoint in a Python file (e.g.,
GUI5.pyor a backend script). - Switch to the Run and Debug panel (
Ctrl+Shift+D). - Select the new configuration (e.g., "Python: Current File (Debug)").
- The debugger should successfully launch and pause at the breakpoint.
Labels
bug, qol, fix, enhancement