-
-
Notifications
You must be signed in to change notification settings - Fork 999
Fix RC smoothing #4637
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix RC smoothing #4637
Conversation
WalkthroughRenames RC smoothing config key from Changes
Sequence Diagram(s)sequenceDiagram
participant UI as Receiver UI
participant FC as FC.RX_CONFIG
participant MSP as MSPHelper / Flight Controller
rect rgba(135,206,250,0.12)
UI->>FC: read/write `rcSmoothing` (was `rcSmoothingMode`)
note right of FC: UI binds to FC.RX_CONFIG.rcSmoothing
end
rect rgba(144,238,144,0.12)
FC->>MSP: MSP_SET_RX_CONFIG pushes `rcSmoothing`
MSP->>FC: MSP_RX_CONFIG parses into `rcSmoothing`
note right of MSP: MSP field renamed RC_SMOOTHING_MODE → RC_SMOOTHING
end
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Suggested labels
Suggested reviewers
Pre-merge checks and finishing touches❌ Failed checks (2 warnings, 1 inconclusive)
✨ Finishing touches
🧪 Generate unit tests
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
679c038
to
193ca6b
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
📜 Review details
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (2)
locales/en/messages.json
(1 hunks)src/tabs/receiver.html
(2 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
- src/tabs/receiver.html
|
Preview URL: https://pr4637.betaflight-app.pages.dev |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
🧹 Nitpick comments (1)
src/js/tabs/receiver.js (1)
623-627
: Rename looks correct; tighten parsing for robustness.Setting FC.RX_CONFIG.rcSmoothing from the select is right. For consistency with the rest of the file and to avoid NaN on unexpected values, prefer explicit radix and a sane default.
- FC.RX_CONFIG.rcSmoothing = Number.parseInt($(this).val()); + FC.RX_CONFIG.rcSmoothing = parseInt($(this).val(), 10) || 0;Also consider standardizing on either Number.parseInt or parseInt across this file.
📜 Review details
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
src/js/tabs/receiver.js
(2 hunks)
🧰 Additional context used
🧠 Learnings (4)
📓 Common learnings
Learnt from: haslinghuis
PR: betaflight/betaflight-configurator#4569
File: src/js/tabs/receiver.js:957-960
Timestamp: 2025-08-13T15:13:10.214Z
Learning: In src/js/tabs/receiver.js, the updateInterpolationView() function already contains logic to hide ".rcSmoothing-feedforward-cutoff" when FC.RX_CONFIG.rcSmoothingFeedforwardCutoff === 0, which handles the API ≥ 1.47 case since feedforward cutoff isn't initialized from DOM for newer APIs.
📚 Learning: 2025-08-13T15:13:10.214Z
Learnt from: haslinghuis
PR: betaflight/betaflight-configurator#4569
File: src/js/tabs/receiver.js:957-960
Timestamp: 2025-08-13T15:13:10.214Z
Learning: In src/js/tabs/receiver.js, the updateInterpolationView() function already contains logic to hide ".rcSmoothing-feedforward-cutoff" when FC.RX_CONFIG.rcSmoothingFeedforwardCutoff === 0, which handles the API ≥ 1.47 case since feedforward cutoff isn't initialized from DOM for newer APIs.
Applied to files:
src/js/tabs/receiver.js
📚 Learning: 2025-08-13T15:12:48.509Z
Learnt from: haslinghuis
PR: betaflight/betaflight-configurator#4569
File: src/js/tabs/receiver.js:650-674
Timestamp: 2025-08-13T15:12:48.509Z
Learning: In src/js/tabs/receiver.js, the rcSmoothing-feedforward-cutoff element is contained within table rows that have the class rcSmoothing-feedforward-manual, so hiding elements with class rcSmoothing-feedforward-manual automatically hides both the dropdown and the cutoff input field.
Applied to files:
src/js/tabs/receiver.js
📚 Learning: 2025-08-13T15:12:48.509Z
Learnt from: haslinghuis
PR: betaflight/betaflight-configurator#4569
File: src/js/tabs/receiver.js:650-674
Timestamp: 2025-08-13T15:12:48.509Z
Learning: In src/js/tabs/receiver.js, the rcSmoothing-feedforward-cutoff element is a child of rcSmoothing-feedforward-manual in the DOM structure, so hiding the parent automatically hides the child.
Applied to files:
src/js/tabs/receiver.js
🔇 Additional comments (2)
src/js/tabs/receiver.js (2)
970-976
: Correct gating when smoothing is off.Checking FC.RX_CONFIG.rcSmoothing === 0 to hide all related controls matches the firmware semantics and prevents mixed UI states. LGTM. Based on learnings.
623-627
: rcSmoothing rename and integration verified — no further changes needed
smoothingMode
tosmoothing
Summary by CodeRabbit
New Features
Chores