896 add flight mode channel update on flight modes page#983
Merged
1Blademaster merged 3 commits intomainfrom Feb 18, 2026
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR adds functionality to allow users to update the flight mode channel from the flight modes configuration page in the UI. Previously, users could only view the flight mode channel but not change it. The implementation includes a new backend endpoint, controller method, frontend UI changes with a Select dropdown, and comprehensive test coverage.
Changes:
- Added backend endpoint and controller method to set flight mode channel with validation (1-16 range)
- Added frontend Select component to allow flight mode channel selection
- Added comprehensive test coverage for the new functionality
- Fixed unrelated bug in params.jsx where wrong callback was being called
Reviewed changes
Copilot reviewed 9 out of 9 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| radio/app/endpoints/flightMode.py | Added new socketio endpoint to handle flight mode channel updates with state and type validation |
| radio/app/controllers/flightModesController.py | Added setFlightModeChannel method with range validation and parameter setting |
| radio/tests/test_flightMode.py | Added comprehensive endpoint tests covering wrong state, missing data, invalid type, no drone connection, and success cases; also fixed comment typo |
| radio/tests/test_FlightModesController.py | Added controller-level tests for invalid channel ranges (0, -1, 17, 100) |
| gcs/src/redux/slices/configSlice.js | Added emitSetFlightModeChannel action to Redux slice |
| gcs/src/redux/middleware/socketMiddleware.js | Added socket event handler for set_flight_mode_channel_result with success/error notifications |
| gcs/src/redux/middleware/emitters.js | Added emitter mapping for flight mode channel updates |
| gcs/src/components/config/flightModes.jsx | Added Select dropdown for flight mode channel, moved display from read-only to editable component |
| gcs/src/params.jsx | Fixed bug where refreshParams called rebootCallback instead of refreshCallback |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Kwash67
approved these changes
Feb 18, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.