Commit Graph
615 Commits
Author SHA1 Message Date
Laurens Valk bcf610a29e doc/index: regroup hubs by platform
Make it easier to pick the right installation guide.
2020-10-25 19:51:40 +01:00
Laurens Valk 55001644d2 doc/start_inventor: add placeholder quick start
This adds an empty page so we can link to it from the main page.
2020-10-25 19:49:18 +01:00
Laurens Valk eef4e9f672 api/hubs: add InventorHub
This is just the SPIKE Prime Hub with a different name and color.
2020-10-25 10:25:16 +01:00
Laurens Valk 3de7f92e8a pybricks-projects: update set examples 2020-10-23 19:32:32 +02:00
Laurens Valk d4c44a292c api: add PrimeHub 2020-10-09 22:50:49 +02:00
Laurens Valk 90bea73c11 doc/hubs: Add light examples 2020-10-09 22:46:35 +02:00
Laurens Valk a603c19d0e doc/hubs: expose color light functionality
This enables the blink and animate methods.

The examples are not yet included.
2020-10-09 19:58:35 +02:00
Laurens Valk c3eb31d348 doc/common: fix cross references 2020-10-09 19:58:35 +02:00
Laurens Valk 1b730836e4 api/pupdevices/Light: drop blink, animate
External single-color lights won't have this for now.
2020-10-09 19:58:35 +02:00
Laurens Valk 4c65e994a3 config: create funding file 2020-10-09 19:58:23 +02:00
Laurens Valk ede503f6fe config: rename CPlusHub to TechnicHub
This replaces the name in internal files.
2020-10-09 19:16:33 +02:00
Laurens Valk 24d35993e9 api: rename CPlusHub to TechnicHub
This reflects the newly adopted naming convention.

See https://github.com/pybricks/support/issues/119
2020-10-09 19:16:33 +02:00
Laurens Valk d6651fc3c5 api/pupdevices: replace color_map
This reclects the implementation update that changes how
color sensing is performed and interfaced with by the user.
2020-10-08 20:19:33 +02:00
Laurens Valk 6671e3def0 pybricks-projects: update color sensing examples 2020-10-08 19:25:04 +02:00
Laurens Valk 6662862b43 api/parameters: Color divide value
This is the inverse of scaling by a constant through multiplication.
2020-10-07 09:17:02 +02:00
Laurens Valk 500bac9929 api/parameters/Color: allow scaling to alter hue
This makes it easy for users to vary brightness of the default colors without having to create a whole new object.
2020-08-26 21:12:48 +02:00
Laurens Valk 5e6a8c8334 api/parameters/Color: name is None by default
This is more consistent with the rest of our API.
2020-08-26 21:12:38 +02:00
Laurens Valk 4f27a465c4 api/common/LightGrid: drop on() method
This method is inconsistent with the on methods for other light related classes so it is better to delete it.
2020-08-25 16:27:19 +02:00
Laurens Valk f490a3b2c2 api/common/LightArray: add blink and animate 2020-08-25 16:27:19 +02:00
Laurens Valk 9ae4955344 api/parameters/Color: no name by default
When no name is given, the color remains untitled
2020-08-25 16:27:19 +02:00
Laurens Valk b89da4b061 api/common/ColorLight: add blink and animate
These are the generalizations of the corresponding methods for single color lights.
2020-08-25 13:38:09 +02:00
Laurens Valk b974ead0dc api/common/ColorLight: drop hsv function
The on() method takes a color type, which is an HSV color, so a separate hsv method is not needed.

hub.light.on(Color.GREEN)
hub.light.on(Color(120))
hub.light.on(Color(h=120, s=100, 50))
2020-08-25 13:38:09 +02:00
Laurens Valk 0427436df6 doc/common/LightGrid: clarify how blink and pattern relate
blink is just a simpler animation
2020-08-25 13:38:09 +02:00
Laurens Valk 4319b2fad8 api/common/Light: add blink and animate 2020-08-25 13:38:09 +02:00
Laurens Valk 0fb150be19 api/common/LightGrid: add animate method 2020-08-25 13:37:54 +02:00
Laurens Valk 6d0984f5fc api/common/LightGrid: simplify image method
Now it just displays a Matrix/2D list. We can omit manipulations like clear=False. Composing can be done by simply adding two matrices instead.

We also drop the compressed format. Instead we could have a helper function that gives you a
matrix based on a list of integers in the now-deleted format.
2020-08-25 12:42:14 +02:00
Laurens Valk b708fe283c api/common/LightGrid: rename char argument
This follows a change in the unreleased implementation.
2020-08-25 12:42:14 +02:00
Laurens Valk 74d59b43ac api/common/LightGrid: revise text method
Specify on and off time for consistency with future blink method.

Adding some off time helps reading text with subsequent charachters that are the same. For example, now "Hello" reads H e l l o instead of Helo.

Also drop wait argument for now because it is not currently implemented and may never be.
2020-08-25 12:42:10 +02:00
Laurens Valk c6c14afca2 doc/parameters/Color: add colors to each class atribute
This makes it much easier to pick the right color.
2020-08-12 12:22:14 +02:00
Laurens Valk 282e34b9e0 config: add pybricks-color directive
This directive produces a small box with the color from the Pybricks API:

.. pybricks-color:: CYAN
2020-08-12 12:19:49 +02:00
Laurens Valk 1eb75e24e7 api/parameters/Color: generalize color type
First step towards making a color type with HSV representation.

Colors such as Color.RED or Color.BLUE continue to exist, but now you
can also define your own colors:

DARK_RED = Color(h=0, s=100, v=50)
2020-08-12 12:18:24 +02:00
Laurens Valk be8592f096 doc/pupdevices/PFMotor: Documentation and examples 2020-08-11 12:13:06 +02:00
Laurens Valk 4d88fbbbd2 api/pupdevices/PFMotor: DCMotor functionality
This replaces the on-off method in ColorDistanceSensor.remote()
with a PFMotor class that works just like the DCMotor class. This
provides much more functionality without having to invent a new API.
2020-08-11 12:05:53 +02:00
Laurens Valk 70ffbfa4f3 doc/parameters/Color: sort colors by hue/value 2020-08-10 11:39:56 +02:00
Laurens Valk c987bc2f80 api/parameters/Color: add CYAN, MAGENTA, GRAY 2020-08-10 11:34:58 +02:00
Laurens Valk 7b8a848c61 api/parameters/Color: remove BROWN
Brown has the same hue as orange, just with a lower value and/or
saturation,  so it does not need to have a separate Color instance.
It is also not supported by the color_map methods.

It was originally included in this list because the EV3 Color Sensor
can technically detect it. This is not reliable, however, as it is
also reports this value for orange objects at a slightly larger
distance. The implementation may be updated to return orange
in both cases. If the original values are required, the LUMPDevice
may be used to get the original color index.
2020-08-10 11:29:48 +02:00
Laurens Valk 0c5457a5f2 api/parameters/Color: rename PURPLE to VIOLET
The correct term for hue = 270 is violet.
Purple is just magenta with a lower brightness value.
2020-08-10 11:29:32 +02:00
Laurens Valk 6aa6059974 doc/pupdevices: add Motor action examples 2020-07-21 16:14:35 +02:00
Laurens Valk 98f247688e doc/pupdevices: add Motor measuring examples 2020-07-21 14:50:26 +02:00
Laurens Valk 51f9d916e0 doc/pupdevices: add Motor init examples 2020-07-21 14:50:26 +02:00
Laurens Valk 8a9386ffc5 doc/pupdevices: add DCMotor examples 2020-07-21 14:50:26 +02:00
Bert bcd44dad84 doc/start_pup: fix mixed http and https contents
Fixes #106.
2020-07-19 21:47:11 +02:00
Laurens Valk ac96985c71 doc/pupdevices/ForceSensor: add examples 2020-07-13 15:40:59 +02:00
Laurens Valk b98f487f3c doc/pupdevices/ColorSensor: add examples 2020-07-13 14:24:57 +02:00
Laurens Valk 42917f14ef doc/parameters: fix link to move hub
This is no longer a generic hub reference
2020-07-12 13:17:45 +02:00
Laurens Valk 938c62430f doc/hubs: remove content tabs
This caused links not to work to anything other than the default tab.
2020-07-12 13:11:38 +02:00
Laurens Valk 6132ae66da doc/pupdevices/ColorDistanceSensor: add examples 2020-07-11 19:40:00 +02:00
Laurens Valk a02c7023e5 doc/pupdevices/ColorDistanceSensor: group methods
We are already using a rubric for the lights, so add two more to better
group the many methods of this sensor.
2020-07-11 17:09:49 +02:00
Laurens Valk d15aa22131 doc/pupdevices/Light: and blink and fade examples 2020-07-11 13:00:28 +02:00
Laurens Valk 19009d1637 doc/pupdevices: InfraredSensor, TiltSensor example 2020-07-11 12:46:30 +02:00