From 4de436e479f1ac7a0696ab250ce37ecb36f7b99e Mon Sep 17 00:00:00 2001 From: Laurens Valk Date: Fri, 24 Apr 2020 12:00:26 +0200 Subject: [PATCH] doc/motors: hide extra sections until ready Avoid references to non-existing explanations. --- doc/api/motors.rst | 34 +++++++++++++++++----------------- pybricks/_common.py | 6 ++---- pybricks/pupdevices.py | 2 +- 3 files changed, 20 insertions(+), 22 deletions(-) diff --git a/doc/api/motors.rst b/doc/api/motors.rst index 3cb4625..cdd62ee 100644 --- a/doc/api/motors.rst +++ b/doc/api/motors.rst @@ -1,31 +1,31 @@ More about Motors =========================================== -Motor Tips & Tricks -^^^^^^^^^^^^^^^^^^^ +.. Motor Tips & Tricks +.. ^^^^^^^^^^^^^^^^^^^ .. The difference between ``run_angle`` and ``run_target`` .. ------------------------------------------------------- .. *TODO* -.. _absangles: +.. .. _absangles: -Absolute angles ----------------------------- +.. Absolute angles +.. ---------------------------- -.. todo:: +.. .. todo:: - This section will be included in a future release. +.. This section will be included in a future release. -.. _stalled: +.. .. _stalled: -Using stall detection ---------------------- +.. Using stall detection +.. --------------------- -.. todo:: +.. .. todo:: - This section will be included in a future release. +.. This section will be included in a future release. .. When a motor cannot move any further despite using the maximally allowed .. torque we say that the motor is stalled. Something could be blocking the @@ -49,14 +49,14 @@ Using stall detection .. TODO -.. _gears: +.. .. _gears: -Using gears ------------------ +.. Using gears +.. ----------------- -.. todo:: +.. .. todo:: - This section will be included in a future release. +.. This section will be included in a future release. .. Many LEGO robots use mechanisms with gears to change the speed and torque .. output of a motor. Let's consider the following dial mechanism. diff --git a/pybricks/_common.py b/pybricks/_common.py index d8c5089..9ea671f 100644 --- a/pybricks/_common.py +++ b/pybricks/_common.py @@ -168,8 +168,7 @@ class Motor(DCMotor): When you specify a gear train, all motor commands and settings are automatically adjusted to account for the resulting gear - ratio. The motor direction remains unchanged by this. See - :ref:`gears` for more information. + ratio. The motor direction remains unchanged by this. """ pass @@ -262,8 +261,7 @@ class Motor(DCMotor): pass def run_until_stalled(self, speed, then=Stop.COAST, duty_limit=None): - """Runs the motor at a constant speed until it - :ref:`stalls `. + """Runs the motor at a constant speed until it stalls. Arguments: speed (:ref:`speed`): Speed of the motor. diff --git a/pybricks/pupdevices.py b/pybricks/pupdevices.py index 697b95f..6a48387 100644 --- a/pybricks/pupdevices.py +++ b/pybricks/pupdevices.py @@ -13,7 +13,7 @@ class Motor(_Motor): def reset_angle(self, angle=None): """Sets the accumulated rotation angle of the motor to a desired value. - If you don't specify an angle, the :ref:`absolute angle ` + If you don't specify an angle, the absolute angle will be used if your motor supports it. Arguments: