Skip to content

Deprecating current DcMotor run mode naming #1344

@Iris-TheRainbow

Description

@Iris-TheRainbow

Currently, the SDK has three run modes to expose the Lynx firmware functionality for motors, those being RUN_WITHOUT_ENCODER, RUN_USING_ENCODER, and RUN_TO_POSITION for the standard set power mode, the velocity PID, and the positional PID.

As someone who spends a lot of time helping inexperienced programmers learn, I can pretty confidentially say that few new programmers properly interpret what the run modes actually do from their names. Many, many people assume (in my opinion, quite reasonably) that you must set the motor mode to RUN_USING_ENCODER to use .getPosition(). In reality, RUN_USING_ENCODER is a velocity control mode, which can lead to very confusing behavior when used without understanding what that mode actually does.

I propose that in a future SDK release, RUN_USING_ENCODER and RUN_WITHOUT_ENCODER should be deprecated and replaced by RUN_TO_VELOCITY and SET_POWER (or similar, like RUN_SET_POWER for consistency) to clear up the actual function of the run mode.

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