From 37de307ef0a35249bbfec105da2411c666a5c9a3 Mon Sep 17 00:00:00 2001 From: Laurens Valk Date: Sun, 9 Feb 2020 23:47:35 +0100 Subject: [PATCH] doc/motors: add note about controller inactivity --- doc/api/motors.rst | 8 ++++++-- pybricks/builtins.py | 2 -- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/doc/api/motors.rst b/doc/api/motors.rst index 6d8506f..b78f1df 100644 --- a/doc/api/motors.rst +++ b/doc/api/motors.rst @@ -96,13 +96,17 @@ The ``Motor`` class uses PID control to accurately track your commanded target angles. Similarly, the ``DriveBase`` class uses two of such controllers: one to control the heading and one to control the traveled distance. -You can change the control settings through the following attributes: +You can change the control settings through the following attributes, which are +instances of the ``Control`` class given below.: - ``Motor.control`` - ``DriveBase.heading_control`` - ``DriveBase.distance_control`` -These are all instances of the ``Control`` class given below. +You can only change the settings while the controller is stopped. For example, +you can set the settings at the beginning of your program. Alternatively, first +call ``stop()`` to make your ``Motor`` or ``DriveBase`` stop, and then change +the settings. .. autoclass:: pybricks.builtins.Control :no-members: diff --git a/pybricks/builtins.py b/pybricks/builtins.py index bd89a62..712d058 100644 --- a/pybricks/builtins.py +++ b/pybricks/builtins.py @@ -65,8 +65,6 @@ class Control(): kp (int): Proportional position (or integral speed) control constant. ki (int): Integral position control constant. - kd (int): Derivative position (or proportional speed) control - constant. kd (int): Derivative position (or proportional speed) control constant. integral_range (:ref:`angle` or :ref:`distance`): Region around