Skip to content

[1.4 backport] Frontend: fix SERVOn_TRIM parameter editor being grayed out#3959

Merged
joaoantoniocardoso merged 1 commit into
bluerobotics:1.4-devfrom
Williangalvani:fix_trim_1.4
Jun 18, 2026
Merged

[1.4 backport] Frontend: fix SERVOn_TRIM parameter editor being grayed out#3959
joaoantoniocardoso merged 1 commit into
bluerobotics:1.4-devfrom
Williangalvani:fix_trim_1.4

Conversation

@Williangalvani

@Williangalvani Williangalvani commented Jun 18, 2026

Copy link
Copy Markdown
Member

Backport of #3954

Summary by Sourcery

Bug Fixes:

  • Correct the disabled state of the servo trim parameter editor card to depend on the resolved trim parameter name instead of the raw trim parameter reference.

@sourcery-ai sourcery-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Hey - I've reviewed your changes and they look great!


Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

@joaoantoniocardoso joaoantoniocardoso self-requested a review June 18, 2026 19:46
@github-actions

Copy link
Copy Markdown

Automated PR Review

0. Summary

  • Verdict: MINOR SUGGESTIONS ✏️

Two-line fix in core/frontend/src/components/parameter-editor/ServoFunctionRangeEditor.vue: gates the trim parameter card's disabled/disabled-card state on resolvedTrimParam?.name instead of the raw trimParam prop. Since resolvedTrimParam falls back to autopilot.parameter(<name>_TRIM) when the trimParam prop isn't passed, the card was previously grayed out whenever the parent didn't explicitly forward the trim parameter — exactly the SERVOn_TRIM scenario the PR title describes. The change matches the surrounding code (label/param on lines 86-87 already use resolvedTrimParam), so this is a coherent fix.

1. Correctness & Implementation Bugs

  • 1.1 [minor] core/frontend/src/components/parameter-editor/ServoFunctionRangeEditor.vue:40 — the slider's trim thumb is still gated on the raw trimParam prop (v-show="thumbType !== 'trim' || trimParam"), while the rest of the component (findClosestThumb, updateValueBasedOnThumb, updateMin/updateMax constraint logic) now uses resolvedTrimParam. By the same logic as this PR, the trim thumb will be hidden in the SERVOn_TRIM case where trimParam isn't forwarded but resolvedTrimParam resolves successfully — leaving the card editable but the slider thumb missing. Worth switching this to resolvedTrimParam in the same backport for consistency.

Generated by PR Review Bot. This is advisory, a human reviewer must still approve.

@joaoantoniocardoso joaoantoniocardoso left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

tested 🥇

@joaoantoniocardoso joaoantoniocardoso merged commit c21de7e into bluerobotics:1.4-dev Jun 18, 2026
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants