FIRST-Tech-Challenge / FIRST-Tech-Challenge/FtcRobotController
Deprecating current DcMotor run mode naming
- Dominant language
- Java
- Stars
- 1.3k
- Forks
- 9.9k
- Avg merge
- 18m
- Merged PRs (30d)
- 1
Description
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.
Contributor guide
Assessment
This issue has not been assessed yet.