Commit Graph
29 Commits
Author SHA1 Message Date
Laurens Valk 4ca568079e doc/robotics: clarify wheel_diameter, axle_track
Add tips for practical experiments to validate the dimensions
2020-04-28 17:09:43 +02:00
Laurens Valk cdbe5b6fa3 doc/robotics: emphasize positive directions
- Move it to the class description, because it applies to all methods
- Use minimal and concise language, with only one definition per line, instead of having an elaborate paragraph.
2020-04-28 16:31:58 +02:00
David Lechner 87c2b6857f api: Use leading _ to hide internals in intellisense
Intellisense in VS Code (both jedi and ms python language server) picks
up all imported names and suggests them with equal priority for
code completion. By adding a leading underscore, intellisense lists
these with a lower priority, so they don't get in the way.

Also rename from builtins to _common while we are touching this to
better reflect the intention of the module (it contains types shared
by multiple modules, not builtin types like int).
2020-03-25 20:24:32 +01:00
David Lechner 166ce2109f doc: Use verbs ending in s for functions/methods
The documentation currently has a mix of with and without the `s`.
Adding an `s` is consistent with most API documentation in general,
especially more modern documentation.
2020-03-24 12:11:53 +01:00
Laurens Valk aa343d017f doc/robotics: add note for when to change settings 2020-03-17 15:47:54 +01:00
Laurens Valk 1158e4e45a api/builtins/Motor: separate methods for stop
stop(Stop.COAST)
stop(Stop.BRAKE)
stop(Stop.HOLD)

becomes

stop()
brake()
hold()

This is easier to type and remember.
2020-03-17 15:19:55 +01:00
Laurens Valk 65888a825d api/robotics: revert stop type for stop()
Partially reverts b25227ec5b

This stays coast by default. This way, stop() remains the best way to release all torque from a motor. Also, it ensures that stopping a running motor or drivebase is smooth by default.
2020-03-15 20:44:21 +01:00
Laurens Valk 9dd1f45ccd doc: drop default argument in docstring
This is visible in the function definition, so no need to repeat it.
2020-03-15 20:35:36 +01:00
David Lechner 6ed6ec0378 api: remove empty () on class declarations
Python allows this syntax and some even consider it good style.
2020-03-12 12:46:09 -05:00
David Lechner b25227ec5b api/Motor,DriveBase: change default stop to HOLD
This reflects a change in the implmentation
2020-03-07 16:24:42 -06:00
Laurens Valk 066983a5e1 LICENSE: Update year and authors
Also add SPDX-License-Identifier: MIT to API source files for clarity.
2020-03-05 10:33:48 +01:00
Laurens Valk 9db7e95959 api/robotics: DriveBase: rename settings args
Make it explicit that these arguments affect only the settings for the corresponding methods.

Also rephrase a few docstrings to make them easier to read or fix typos.
2020-02-17 13:43:48 +01:00
Laurens Valk 477c913ec2 api/robotics/DriveBase: drop stop_type setter
Point to point commands will always hold. The stop method can be used to enforce other stop types.
2020-02-09 23:31:18 +01:00
Laurens Valk f1f1ceaac9 api/robotics/DriveBase: add state getter 2020-02-06 14:05:14 +01:00
Laurens Valk 7423161615 api/robotics: simplify API
drop methods that will not be implemented for next release and simplify descriptions of methods that will be implemented.
2020-02-05 16:55:03 +01:00
Laurens Valk 1c801f1520 api/robotics: add tank method
Also, group similar methods together and explain what they do.
2020-01-27 11:20:07 +01:00
Laurens Valk dd39a2e00f api/robotics: update DriveBase API
Make arc a non-blocking function similar to drive. This allows users to drive the robot along an arc until a sensor (e.g. color) is triggered, instead of relying on the rotation sensors only.

This also lets us simplify the language of some other method docstrings.
2020-01-23 17:58:24 +01:00
Laurens Valk b6f75eca9c config: ignore literals by regexp and config files
No need to have all of them in the ignore list now.
2020-01-16 13:28:09 +01:00
David Lechner 31a639f55b doc/api/conf.py: enable nitpicky
This enables the sphinx doc nitpicky option to detect broken references.

Also fix all of the broken references.
2020-01-11 21:08:20 -06:00
Laurens Valk 09d453480b api/robotics: add DriveBase state getters 2020-01-02 16:51:50 +01:00
Laurens Valk 3d9a6f11cc api/robotics: add DriveBase draft
This is a concept for a DriveBase class for common robot tasks.
2020-01-02 16:36:37 +01:00
Laurens Valk 5c832498b6 doc: motors match module 2019-10-19 21:38:33 +02:00
Laurens Valk 2ec5b0aab9 doc: organize motors 2019-10-18 18:32:09 +02:00
Laurens Valk e453cecb2e api: accelerometer drafts 2019-07-02 11:57:00 +02:00
Laurens Valk 12834ffc73 api: fix relative links due to package 2019-06-11 20:13:38 +02:00
Laurens Valk 28a5329bb6 api/doc: pybricks is a package 2019-06-05 12:47:24 +02:00
Laurens Valk 8d37450fac api: flake8 2019-06-04 15:45:36 +02:00
Laurens Valk c43d296511 doc: move snippets to doc
Example snippets are platform specific.
2019-06-03 12:02:16 +02:00
Laurens Valk 3091489843 move API 2019-05-09 17:15:52 +02:00