Skip to content

Fix APIUI sensor queries after remapping or disabling - #1397

Open
Ramji-Purwar wants to merge 1 commit into
grame-cncm:master-devfrom
Ramji-Purwar:fix/apiui-active-sensor-mappings
Open

Ramji-Purwar wants to merge 1 commit into
grame-cncm:master-devfrom
Ramji-Purwar:fix/apiui-active-sensor-mappings

Conversation

@Ramji-Purwar

Copy link
Copy Markdown
Contributor

After an APIUI parameter is remapped from accelerometer X to Y, getAccConverter() still reports the old X axis, curve, and bounds. Disabling the mapping with axis -1 also leaves getParamType() reporting an accelerometer. Gyroscope mappings behave the same way, and a disabled accelerometer can hide an active gyroscope in type queries.

Keep inactive mappings available for reuse by setters, but filter them from converter and type queries. Implement CurveZoneControl::getActive() using the selected curve's state so those queries agree with the mappings that actually receive sensor updates.

Validation with GCC 16.2.1 on Linux x86_64:

  • The regression program fails on the original headers with 19 failed checks.
  • make -C tests/apiui-tests check passes all 80 checks. It covers both sensor kinds, metadata initialization, axis changes, disabling, reactivation across all four curves, and sensor propagation.
  • The same program passes with FAUSTFLOAT=double and with libstdc++ debug containers.
  • make -C tests/mapui-tests check passes for all seven controls.

Compatibility was also checked by applying the change to current master-dev (f06f2697): all 80 checks pass in float and double precision, and the seven-control MapUI regression passes.

AddressSanitizer/UndefinedBehaviorSanitizer validation could not run because the installed compiler's sanitizer runtime libraries are missing. No Faust compiler source or generated DSP code is changed.

Exclude inactive sensor mappings from converter and parameter-type queries while retaining them for reuse by setters. Expose the selected CurveZoneControl activation state through its existing virtual getter. Cover both sensor types, all four curves, remapping, disabling, reactivation, and propagation with a standalone regression test.
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.

1 participant