Skip to content

894 add a servo config page#1018

Merged
1Blademaster merged 10 commits intomainfrom
894-add-a-servo-config-page
Feb 28, 2026
Merged

894 add a servo config page#1018
1Blademaster merged 10 commits intomainfrom
894-add-a-servo-config-page

Conversation

@Kwash67
Copy link
Copy Markdown
Contributor

@Kwash67 Kwash67 commented Feb 26, 2026

No description provided.

@Kwash67 Kwash67 requested review from a team and Copilot February 26, 2026 22:01
@Kwash67 Kwash67 linked an issue Feb 26, 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

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.servo state and Socket.IO endpoints for getting/setting servo config and testing servo PWM.
  • Adds a ServoController to 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_RAW PWM outputs and edit SERVOx_* 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_phases now includes an extra step (Servo Controller), which shifts the indices for subsequent phases. There is still a sendConnectionStatusUpdate(13) call after setupControllers() (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 via len(self.connection_phases) - 1) so progress messages stay correct.
            )
            return

        try:
            self.sendConnectionStatusUpdate(0)

radio/app/drone.py:306

  • ServoController is instantiated during connection setup and its constructor immediately calls fetchParams(), which issues 80 synchronous getSingleParam requests. This can noticeably slow down (or potentially stall on timeouts) the initial connection even when the Servo page is never opened. Consider deferring fetchParams() 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.

Comment thread gcs/src/components/config/servoOutput.jsx Outdated
Comment thread gcs/src/components/config/servoOutput.jsx
Copy link
Copy Markdown
Member

@1Blademaster 1Blademaster left a comment

Choose a reason for hiding this comment

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

Looks good and works for me. Just a few comments on the code.

Comment thread gcs/src/components/config/servoOutput.jsx
Comment thread gcs/src/components/config/servoOutput.jsx Outdated
Comment thread gcs/src/components/config/servoOutput.jsx Outdated
Comment thread gcs/src/components/config/servoOutput.jsx Outdated
Comment thread gcs/src/components/config/servoOutput.jsx Outdated
Comment thread radio/app/endpoints/servo.py Outdated
Comment thread radio/app/endpoints/states.py Outdated
Comment thread radio/app/drone.py Outdated
@Kwash67 Kwash67 requested a review from 1Blademaster February 27, 2026 21:56
@1Blademaster 1Blademaster merged commit 8948322 into main Feb 28, 2026
8 checks passed
@1Blademaster 1Blademaster deleted the 894-add-a-servo-config-page branch February 28, 2026 13:50
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 a servo config page

3 participants