Laurens Valk
ce993900d1
api/pupdevices: update illuminate argument
...
match the implementation and simplify description
2020-05-27 13:58:30 +02:00
Laurens Valk
f604dd321e
api/pupdevices/UltrasonicSensor: drop silent
...
Like its EV3 counterpart, this does not work reliably enough, so remove.
2020-05-27 13:58:30 +02:00
Laurens Valk
e0ac54ec0a
api/pupdevices/ForceSensor: add methods
2020-05-27 13:58:30 +02:00
Laurens Valk
8273c00881
api/pupdevices/UltrasonicSensor: add methods
...
This is identical to the EV3 Ultrasonic Sensor methods.
2020-05-27 13:58:30 +02:00
Laurens Valk
4da7b456bb
api/pupdevices: initial color sensor hsv api
...
Provide a simple yet powerful way to calibrate the color() method.
2020-05-27 13:58:30 +02:00
Laurens Valk
7498751ee3
doc/pupdevices: add diagrams with light indices
...
Make this clear once and for all.
This order comes from the sensor itself.
2020-05-27 13:58:30 +02:00
Laurens Valk
2dd133d5e5
api/pupdevices: add ForceSensor
...
Initial class without any methods for the SPIKE Force Sensor
2020-05-27 13:58:30 +02:00
Laurens Valk
e67c048b18
api/pupdevices: add UltrasonicSensor
...
Initial class without any methods for the SPIKE Ultrasonic Sensor
2020-05-27 13:58:30 +02:00
Laurens Valk
2d3e85f531
api/_common.LightArray: merge on and array method
...
Make it simpler with only one method to turn the lights on.
2020-05-27 13:58:30 +02:00
David Lechner
daeac6005e
api: media.ev3dev.Image.draw_circle: fix r arg
...
This removes the default value from the `r` parameter (this was probably copy/paste error from the `draw_box` method). The actual implementation does not have a default value.
2020-05-18 13:26:28 -05:00
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
Laurens Valk
350b90d967
doc/parameters: document stop types in table
...
Make more explicit how the stop types gradually add more resistance to motion.
2020-04-28 14:01:28 +02:00
Laurens Valk
c6f7b514ec
doc: remove ascii art for motor directions
...
We have actual graphics of motors with their default clockwise directions now, so refer to those instead.
2020-04-28 13:27:51 +02:00
Laurens Valk
9ff69a54fb
api/tools: add append option to DataLog class
2020-04-27 17:18:37 +02:00
Laurens Valk
4de436e479
doc/motors: hide extra sections until ready
...
Avoid references to non-existing explanations.
2020-04-24 12:00:26 +02:00
Laurens Valk
55c5790a48
doc/nxtdevices: fix typo
2020-04-24 10:50:34 +02:00
Laurens Valk
6f8e3ba0ff
doc/tools: improve datalog information
...
- Fix typo in example
- Explain how to upload a log file
- Show an example graph
2020-04-10 13:54:36 +02:00
David Lechner
b5159a850a
api: fix typo in Font parameter
...
script was missing a letter
2020-04-08 09:58:13 +02:00
Laurens Valk
32ab928aa8
doc/ev3devices/UltrasonicSensor: add freeze note
...
Simplify the text for silent mode, and add a note to say what to do if it stops working when the UART gets confused.
2020-04-07 13:41:04 +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
Laurens Valk
43c006d836
doc/builtins/Motor: return from run_until_stalled
...
The return argument was not documented.
2020-03-25 09:32:46 +01:00
Laurens Valk
ada50328bb
doc/pupdevices/Motor: fix reset_angle
...
The note about absolute angle support had accidentally ended up in the GyroSensor. It applies only to pupdevices.Motor.
2020-03-24 16:25:06 +01:00
Laurens Valk
0bee7ef984
doc: fix and clarify verbs
2020-03-24 12:12:49 +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
a827491b2b
doc/pupdevices: doc ColorDistanceSensor.remote()
2020-03-20 11:13:52 +01:00
Laurens Valk
661de5f0fe
doc/*devices: improve rgb() docstring
2020-03-20 10:42:52 +01:00
David Lechner
65deb297dd
api: remove Port subclass from hubs
...
This was removed in the pybricks-micropython implementation.
2020-03-18 18:10:18 -05:00
David Lechner
e3d0d51c9f
config: drop versioneer
...
This removes versioneer for versioning. The version depends on the
pybricks-micropython version targeted so it doesn't make sense to use
automatic versioning here.
2020-03-18 17:30:42 -05:00
David Lechner
21cef2f8c8
api: remove __init__.py
...
pybricks is a namespace, not a module, so it cannot have __init__.py. Otherwise there can be no other packages installed that use the pybricks namespace.
2020-03-18 17:19:48 -05: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
1c576d5b11
api/builtins/Motor: rename stop_type kwarg
...
All point-to-point maneuvers come to a controlled stop before the stop
mode kicks in. Therefore it is more accurate to rename stop_type to
then, as this argument controls what happens after stopping,
so it reads: then=Stop.HOLD.
2020-03-17 15:19:27 +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
d282d38836
doc/builtins/DCMotor: a DCMotor cannot hold
2020-03-15 20:36:38 +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
abe24cf289
api/builtin: add missing DCMotor.stop() method
...
This was missing. It also has a different default value
from the Motor class, so Motor overrides this method.
2020-03-12 12:52:27 -05: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
David Lechner
cab16f6af7
api/media/ev3dev: add Image/screen save method
...
This was overlooked previously.
2020-03-06 12:59: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
10731d019a
doc/parameters: remove Align
...
This was already hidden from the docs, but not deleted.
2020-03-03 17:43:53 +01:00
Laurens Valk
c02cc456f7
api/iodevices/Ev3devSensor: add device index
...
This makes it easy to find the sensor to access additional features through the ev3dev lego-sensor and lego-port classes.
2020-02-25 10:29:40 +01:00
David Lechner
df6cfa30f6
api/media.ev3dev.Image: Add default args for empty()
...
Implementation has been changed so that omitting args gives an empty
image the same size as the screen.
2020-02-21 11:01:44 -06:00
Laurens Valk
854760feb6
api/builtins/Control: add feed_forward gain
...
This can be useful for motors with high internal static friction.
2020-02-20 16:34:25 +01:00
Laurens Valk
0d068b17f2
api/iodevices/AnalogSensor: remove type check
...
This makes it consistent with the UARTDevice and I2CDevice class.
The `Ev3devSensor` class can be used instead if auto id is desired.
2020-02-20 16:23:26 +01:00
Laurens Valk
b81b28d338
api/builtins/Control: add scale property
2020-02-19 19:40:44 +01:00
Laurens Valk
16e8af0f4d
api/builtins/Control: add integral_rate setter
2020-02-17 14:04:50 +01:00
Laurens Valk
a0fba6c2d1
api/builtins/Control: Move stalled to control
...
This is a control status property, so move it to the control class. This way, it is hidden from the common motor methods, and DriveBases will be able to use it too.
2020-02-17 13:55:45 +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