Skip to content

feat(rc_smoothing): update filter dropdown for 1EURO; add beta spinner (semver 0.5.0) #597

Description

@nerdCopter

AI Generated issue-ticket

Companion to emuflight/EmuFlight#1247 (1€ adaptive RC smoothing filter).

Gate all changes on firmware semver 0.5.0 (exact version TBD at firmware PR merge — update when confirmed).


Firmware-only testing (CLI, no configurator changes required)

No configurator changes are needed to flight-test the firmware PR. Enable 1EURO with two commands:

set rc_smoothing_type = FILTER
set rc_smoothing_input_type = 1EURO
set debug_mode = RC_SMOOTHING
set rc_smoothing_debug_axis = ROLL
save

Optional — only tune beta if needed (default works for most pilots):

set rc_smoothing_1euro_beta = 5   # default; increase to 8-10 for 50 Hz links only

fc_min, fc_max, and deriv_hz are CLI-only developer parameters — not MSP-exposed, no configurator UI required.


One new MSP byte

N+2 is repurposed from a dead/reserved byte (was rc_smoothing_derivative_cutoff in master, unused) to carry rc_smoothing_1euro_beta. All other bytes in the RC smoothing block are unchanged from master.

N+4 remains a dead/reserved byte — fc_min is CLI-only by design.


Problem with current configurator UI

The configurator currently shows controls that are wrong or misleading when 1EURO is selected:

  • N+1 → "input cutoff (Hz)" spinner — correct for PT1/PT2; ignored by firmware when 1EURO is active
  • N+2 → "derivative cutoff (Hz)" spinner — mislabels beta as a cutoff Hz value for 1EURO users
  • N+4 → "derivative type" dropdown — dead byte; this control should be removed entirely
  • Filter dropdown — shows BIQUAD (index 1) and PT4 (index 4); both are gone from firmware

Without fixes a pilot selecting 1EURO will see their beta value displayed as "derivative cutoff Hz" with no way to understand what it means.


Required changes (semver ≥ 0.5.0)

1. RC smoothing filter dropdown

Index Old label New label Action
0 PT1 PT1 no change
1 BIQUAD 1EURO rename
2 PT2 PT2 no change
3 PT3 PT3 no change (was removed in an earlier edit, now restored)
4 PT4 remove

Show the legacy list on firmware older than 0.5.0 to avoid breaking existing configs.

2. Remove N+4 "derivative type" control

The N+4 derivative type dropdown is a dead byte. Remove it from the UI entirely.

3. Show/hide controls by filter type (firmware ≥ 0.5.0)

When filter = 1EURO:

  • Hide N+1 "input cutoff" spinner (ignored by firmware)
  • Hide N+2 "derivative cutoff" spinner
  • Show 1€ Beta spinner (reads/writes N+2):
Label Byte Range Default
1€ Beta (×0.001) N+2 1–20 5

When filter = PT1, PT2, or PT3:

  • Show N+1 "input cutoff" spinner as normal
  • Hide the 1€ Beta spinner (N+2 must not be shown as "derivative Hz" for these types)

4. Beta spinner detail

Beta is stored as a uint8 (1–20). Displayed value is the raw integer; firmware divides by 1000 on read. A spinner labeled "1€ Beta (×0.001)" with range 1–20 and default 5 is sufficient.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions