800 refactor drone checkformessages#802
Conversation
…eset dashboard statustext messages when connecting to an aircraft
|
Because logic has changed, most tests are broken. The FakeTCP helper raising a serial exception causes the aircraft to assume there is an issue with the serial connection, and disconnects. |
…, move telemetry messages to separate namespace
There was a problem hiding this comment.
Pull Request Overview
This PR refactors the MAVLink message handling system by introducing a message reservation mechanism to prevent race conditions between controllers. Key changes include:
- Replaced the global
is_listeningflag with a message reservation system using queues - Added
wait_for_message(),reserve_message_type(), andrelease_message_type()methods - Created a separate
/telemetrynamespace for telemetry socket messages - Updated all controllers to use the new message reservation pattern
- Added a test timeout decorator and consolidated test helper classes
Reviewed Changes
Copilot reviewed 20 out of 21 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| radio/app/drone.py | Introduced message reservation system with queues, removed is_listening flag, added new wait/reserve/release methods |
| radio/app/controllers/*.py | Updated all controllers to use message reservation pattern with try/finally blocks |
| radio/app/utils.py | Added namespace parameter to sendMessage() socketio emission |
| radio/app/endpoints/telemetry_namespace.py | New telemetry namespace handler for WebSocket connections |
| radio/app/init.py | Registered the telemetry namespace |
| radio/tests/helpers.py | Consolidated test helper classes into WaitForMessageReturnsNone |
| radio/tests/*.py | Updated test files to use renamed helper classes and added timeout decorator |
| gcs/src/redux/middleware/socketMiddleware.js | Moved incoming message handler to telemetry socket, removed status text reset |
| gcs/src/redux/middleware/emitters.js | Moved status text reset to connect action |
| gcs/src/helpers/socket.js | Added telemetry socket connection |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
5d47ed9 to
1cfe277
Compare
There was a problem hiding this comment.
Pull Request Overview
Copilot reviewed 21 out of 22 changed files in this pull request and generated 8 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
@1Blademaster I've opened a new pull request, #803, to work on those changes. Once the pull request is ready, I'll request review from you. |
No description provided.