Skip to content

Commit

Permalink
pybricks.common.Control: Add deceleration setter.
Browse files Browse the repository at this point in the history
Fixes #97
  • Loading branch information
laurensvalk committed Mar 21, 2022
1 parent d8bd890 commit 0a31bc7
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@
- Fixed missing `DCMotor` type in `ev3devices`.
- Fixed type hint for `Motor.reset_angle()` in `pupdevices`.

### Changed
- Setter for acceleration can now also be used to set acceleration and
deceleration to different values, using a two-valued tuple.

## 3.1.0 - 2021-12-16

### Added
Expand Down
4 changes: 3 additions & 1 deletion src/pybricks/_common.py
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,9 @@ def limits(self, speed, acceleration, torque):
speed (:ref:`speed` or :ref:`linspeed`):
Maximum speed. All speed commands will be capped to this value.
acceleration (:ref:`acceleration` or :ref:`linacceleration`):
Maximum acceleration.
Slope of the speed curve when accelerating or decelerating.
Use a tuple to set acceleration and deceleration separately.
If one value is given, it is used for both.
torque (:ref:`torque`):
Maximum feedback torque during control.
"""
Expand Down

0 comments on commit 0a31bc7

Please sign in to comment.