Skip to content

Conversation

haslinghuis
Copy link
Member

@haslinghuis haslinghuis commented Sep 28, 2025

  • range starts from 0 in firmware.
  • rename smoothingMode to smoothing

Summary by CodeRabbit

  • New Features

    • RC Smoothing: Setpoint Hz numeric field now accepts 0 (was min 1), allowing a zero-frequency setpoint.
  • Chores

    • UI text updated: RC smoothing label changed from "Smoothing Mode" to "RC Smoothing".
    • Configuration/setting name streamlined in the UI: references to the RC smoothing option updated for consistency.

@haslinghuis haslinghuis added this to the 2025.12 milestone Sep 28, 2025
@haslinghuis haslinghuis self-assigned this Sep 28, 2025
Copy link
Contributor

coderabbitai bot commented Sep 28, 2025

Walkthrough

Renames RC smoothing config key from rcSmoothingMode to rcSmoothing across UI, JS, and MSP; updates receiver.html label i18n key and removes label class; lowers manual setpoint input min from 1 to 0; removes receiverRcSmoothingMode from en locales.

Changes

Cohort / File(s) Change Summary
Receiver Tab HTML
src/tabs/receiver.html
Label i18n key changed receiverRcSmoothingModereceiverRcSmoothing; removed class="rcSmoothingMode" from the label; <input name="rcSmoothingSetpointHz-number"> min changed 10.
Front-end config
src/js/fc.js
In FC.RX_CONFIG, property renamed rcSmoothingModercSmoothing.
MSP serialization / parsing
src/js/msp/MSPHelper.js
MSP read/write mapping updated from RC_SMOOTHING_MODE / rcSmoothingModeRC_SMOOTHING / rcSmoothing; MSP_SET_RX_CONFIG now pushes FC.RX_CONFIG.rcSmoothing.
Receiver tab logic
src/js/tabs/receiver.js
All usages switched from rcSmoothingModercSmoothing; select parsing changed to Number.parseInt; view update/default logic adjusted (treat 0 as off).
Localization (en)
locales/en/messages.json
Removed localization entry receiverRcSmoothingMode ("Smoothing Mode"); no new receiverRcSmoothing entry added in this diff.

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
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Suggested labels

Needs coordination with firmware

Suggested reviewers

  • nerdCopter
  • VitroidFPV
  • blckmn

Pre-merge checks and finishing touches

❌ Failed checks (2 warnings, 1 inconclusive)
Check name Status Explanation Resolution
Description Check ⚠️ Warning The pull request description does not follow the repository’s required template and only includes two brief bullet points, omitting critical sections such as branch usage guidelines, coding style requirements, continuous integration instructions, and issue references. As a result, it is largely incomplete and fails to provide the necessary context and procedural details for reviewers. Please update the description to adhere to the hosted template by removing the boilerplate placeholder text and adding detailed information on branch conventions, coding style adherence, CI test instructions, and any related issue or commit links.
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. You can run @coderabbitai generate docstrings to improve docstring coverage.
Title Check ❓ Inconclusive The title “Fix RC smoothing” is related to the pull request’s focus on RC smoothing but is too generic to convey the specific modifications made, such as renaming the smoothing mode property and updating the setpoint range. This lack of detail means a teammate reviewing history cannot immediately understand what aspect of RC smoothing was fixed. A more descriptive title would improve clarity and context. Please revise the title to clearly indicate the primary changes, for example by referencing the rename of smoothingMode to smoothing and the adjustment of the setpoint range.
✨ Finishing touches
  • 📝 Generate Docstrings
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Contributor

@coderabbitai coderabbitai bot left a 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

📥 Commits

Reviewing files that changed from the base of the PR and between fda6e0e and 193ca6b.

📒 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

Copy link

Copy link
Contributor

Preview URL: https://pr4637.betaflight-app.pages.dev

@haslinghuis haslinghuis changed the title Fix rc smoothing setpointhz range Fix rc smoothing Sep 29, 2025
@haslinghuis haslinghuis changed the title Fix rc smoothing Fix RC smoothing Sep 29, 2025
Copy link
Contributor

@coderabbitai coderabbitai bot left a 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

📥 Commits

Reviewing files that changed from the base of the PR and between f9b2f8a and 31fddd6.

📒 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

@haslinghuis haslinghuis merged commit 105aa26 into betaflight:master Sep 29, 2025
8 checks passed
@github-project-automation github-project-automation bot moved this from App to Done in 2025.12.0 Sep 29, 2025
@haslinghuis haslinghuis deleted the rc-smoothing branch September 29, 2025 18:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

3 participants