Skip to content
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

Scale manual control setpoint up/down stick -1 to 1 #15949

Merged
merged 4 commits into from Nov 28, 2022

Commits on Nov 28, 2022

  1. Configuration menu
    Copy the full SHA
    8073a70 View commit details
    Browse the repository at this point in the history
  2. Switch manual_control_setpoint.z scaling from [0,1] to [-1,1]

    To be consistent with all other axes of stick input and avoid future
    rescaling confusion.
    
    Note: for the MAVLink message 69 MANUAL_CONTROL it's using the full range
    according to the message specs now [-1000,1000].
    MaEtUgR committed Nov 28, 2022
    Configuration menu
    Copy the full SHA
    34729cf View commit details
    Browse the repository at this point in the history
  3. manual_control_setpoint: change stick axes naming

    In review it was requested to have a different name for
    manual_control_setpoint.z because of the adjusted range.
    
    I started to investigate what naming is most intuitive and found
    that most people recognize the stick axes as roll, pitch, yaw, throttle.
    It comes at no surprise because other autopilots
    and APIs seem to share this convention.
    
    While changing the code I realized that even within the code base
    the axes are usually assigned to a variable with that name or
    have comments next to the assignment clarifying the axes
    using these names.
    MaEtUgR committed Nov 28, 2022
    Configuration menu
    Copy the full SHA
    03f8842 View commit details
    Browse the repository at this point in the history
  4. rc_update: adapt throttle trim calibration for [-1,1]

    This is fully backwards compatible: If the throttle trim is set to
    the minimum then it's the legacy calibration and gets
    interpreted such that there is no trim and behavior remains as before.
    If the trim is set to a different value than the minimum then it gets
    used like with all other channels which was unsupported before.
    MaEtUgR committed Nov 28, 2022
    Configuration menu
    Copy the full SHA
    3835c51 View commit details
    Browse the repository at this point in the history