Skip to content

896 add flight mode channel update on flight modes page#983

Merged
1Blademaster merged 3 commits intomainfrom
896-add-flight-mode-channel-update-on-flight-modes-page
Feb 18, 2026
Merged

896 add flight mode channel update on flight modes page#983
1Blademaster merged 3 commits intomainfrom
896-add-flight-mode-channel-update-on-flight-modes-page

Conversation

@1Blademaster
Copy link
Copy Markdown
Member

No description provided.

Copilot AI review requested due to automatic review settings February 13, 2026 19:34
@1Blademaster 1Blademaster linked an issue Feb 13, 2026 that may be closed by this pull request
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment thread gcs/src/components/config/flightModes.jsx
Comment thread radio/tests/test_FlightModesController.py
Comment thread radio/app/endpoints/flightMode.py Outdated
@1Blademaster 1Blademaster requested a review from a team February 13, 2026 19:57
@1Blademaster 1Blademaster merged commit 2ebb896 into main Feb 18, 2026
8 checks passed
@1Blademaster 1Blademaster deleted the 896-add-flight-mode-channel-update-on-flight-modes-page branch February 18, 2026 16:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add flight mode channel update on flight modes page

3 participants