Skip to content

Function getCurrentControlProfile defined in header but not implemented #11616

Open

Description

@y-decimal

control_profile.h defines a getCurrentControlProfile function, but it was never implemented in control_profile.c

The function should probably either be implemented or alternatively its declaration removed from the header

I previously made a PR implementing the function (#11528) because I briefly thought I'd need it in another PR but ultimately ended up not needing it and decided it would make more sense to discuss how to handle this in an issue first

Activity

  1. sensei-hacker commented on Sep 9, 2026

    @sensei-hacker
    Member

    Decision: implement, not remove. getCurrentControlProfile() has a real (if currently dormant) caller — rc_adjustments.c's applySelectAdjustment(), under USE_INFLIGHT_PROFILE_ADJUSTMENT (permanently commented out in rc_adjustments.h today, so it doesn't affect current builds). Removing the declaration would leave that call site referencing a nonexistent function the moment that flag is ever enabled.

    Implemented as a simple linear scan (adapted from the approach in #11528), returning 0 on no match to match setControlProfile()'s own clamp-to-0 behavior for an out-of-range index. PR: #11882

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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