894 add a servo config page#1018
Merged
1Blademaster merged 10 commits intomainfrom Feb 28, 2026
Merged
Conversation
Closed
Contributor
There was a problem hiding this comment.
Pull request overview
Adds a new “Servo Output” configuration page to the GCS and the corresponding radio-side Socket.IO endpoints/controller support to fetch/update servo params and send test PWM commands.
Changes:
- Introduces a new
config.servostate and Socket.IO endpoints for getting/setting servo config and testing servo PWM. - Adds a
ServoControllerto the radio app’s drone controllers and wires the new endpoint module into the endpoints package. - Adds GCS UI + Redux plumbing to display live
SERVO_OUTPUT_RAWPWM outputs and editSERVOx_*parameters.
Reviewed changes
Copilot reviewed 12 out of 12 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| radio/app/endpoints/states.py | Adds config.servo state listeners and stream request. |
| radio/app/endpoints/servo.py | New Socket.IO handlers for servo config + test PWM. |
| radio/app/endpoints/params.py | Minor formatting change to params error emit payload. |
| radio/app/endpoints/init.py | Registers the new servo endpoints module. |
| radio/app/drone.py | Adds ServoController, adjusts connection phases, enhances setServo error response. |
| radio/app/controllers/servoController.py | New controller to fetch cached servo params and set them on the drone. |
| gcs/src/redux/slices/configSlice.js | Adds servo config + PWM output state, reducers, emitters, selectors. |
| gcs/src/redux/middleware/socketMiddleware.js | Handles SERVO_OUTPUT_RAW and servo config/test result socket events. |
| gcs/src/redux/middleware/emitters.js | Adds emitters for servo config operations and test PWM. |
| gcs/src/config.jsx | Adds a new “Servo Output” tab/panel. |
| gcs/src/components/config/servoOutput.jsx | New UI for servo PWM visualization, param editing, and test PWM modal. |
| gcs/package.json | Bumps @tabler/icons-react version. |
Comments suppressed due to low confidence (2)
radio/app/drone.py:128
connection_phasesnow includes an extra step (Servo Controller), which shifts the indices for subsequent phases. There is still asendConnectionStatusUpdate(13)call aftersetupControllers()(outside this hunk) that will no longer emit the final "Connection complete" phase. Consider updating the post-setupControllers()call to use the new final index (or compute it vialen(self.connection_phases) - 1) so progress messages stay correct.
)
return
try:
self.sendConnectionStatusUpdate(0)
radio/app/drone.py:306
ServoControlleris instantiated during connection setup and its constructor immediately callsfetchParams(), which issues 80 synchronousgetSingleParamrequests. This can noticeably slow down (or potentially stall on timeouts) the initial connection even when the Servo page is never opened. Consider deferringfetchParams()until the Servo config state/page is entered, or lazy-initializing the controller on first use.
self.logger.error(f"Invalid connection status index {msg_index}")
return
msg = self.connection_phases[msg_index]
if self.droneConnectStatusCb:
self.droneConnectStatusCb(
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
1Blademaster
requested changes
Feb 27, 2026
Member
1Blademaster
left a comment
There was a problem hiding this comment.
Looks good and works for me. Just a few comments on the code.
1Blademaster
approved these changes
Feb 28, 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.