Skip to content

Commit bb215e8

Browse files
committed
Rebranding alternative control mode as effects control flow
1 parent c879397 commit bb215e8

File tree

4 files changed

+26
-9
lines changed

4 files changed

+26
-9
lines changed

docs/index.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ Welcome to OpenRGB-Python's documentation!
1212

1313
pages/intro
1414
pages/usage
15-
pages/alternate
15+
pages/effects
1616
pages/advanced
1717
pages/api
1818

docs/pages/advanced.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ For creating custom effects, you often want to have your lights refreshing
5555
quickly. Optimizing openrgb-python for speed isn't very hard if you know what
5656
you are doing. The best way to maximize speed is to minimize OpenRGB SDK calls.
5757
The most user-friendly way to do this is to use the
58-
:doc:`alternative control</pages/alternate>` method, but it is possible to do
58+
:doc:`effects control flow</pages/effects>`, but it is possible to do
5959
accomplish the same things with the other functions. One common argument that
6060
will help is the :code:`fast` argument. In any of the color-changing functions
6161
(:code:`set_color`, :code:`set_colors`, :code:`show`), if you pass in
Lines changed: 22 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,29 @@
1-
Alternative Usage
2-
=================
1+
Writing Custom Effects
2+
======================
33
This method of setting colors was made to be similar (on the front end) to other
44
LED control libraries like FastLED or adafruit's Neopixel library. It was also
55
optimized better for speed, making it more suitable to creating custom effects
66
that require a fast refresh rate.
77

88
Basics
99
------
10+
OpenRGB devices with a "direct" mode are the best to use with effects, because
11+
in that mode they don't save colors to flash storage or have any flickering
12+
problems at higher refresh rates. You can control only these devices by using
13+
the :any:`OpenRGBClient.ee_devices` property instead of the
14+
:any:`OpenRGBClient.devices` list.
15+
16+
.. code-block:: python
17+
18+
from openrgb import OpenRGBClient
19+
20+
cli = OpenRGBClient()
21+
22+
print(cli.devices)
23+
print(cli.ee_devices)
24+
25+
FastLED-like Control Flow
26+
-------------------------
1027
This control method follows a pattern of setting color values, and then calling
1128
a function to apply the changed values to the physical LEDs. Here is an example
1229
for setting a device to a rainbow color.
@@ -19,7 +36,7 @@ for setting a device to a rainbow color.
1936
cli = OpenRGBClient()
2037
2138
# dividing the color spectrum by number of LEDs
22-
step = int(len(cli.devices[0].colors)/360)
39+
step = int(len(cli.ee_devices[0].colors)/360)
2340
for i, hue in enumerate(range(0, 360, step)):
24-
cli.devices[0].colors[i] = RGBColor.fromHSV(hue, 100, 100)
25-
cli.devices[0].show()
41+
cli.ee_devices[0].colors[i] = RGBColor.fromHSV(hue, 100, 100)
42+
cli.ee_devices[0].show()

docs/pages/usage.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ RGB values or HSV values.
5454
.. note::
5555

5656
Already familiar with other LED control libraries like fastLED or adafruit's
57-
neopixel library? The :doc:`alternative control</pages/alternate>` method
57+
neopixel library? The :doc:`effects control flow</pages/effects>`
5858
was made to be used in a similar way. Try it out and see which one you like
5959
better!
6060

@@ -88,7 +88,7 @@ motherboard has 8 LEDs, and sets them in a red, blue, red, blue... pattern.
8888
While these methods can be used for things like custom effects, it requires
8989
a little more effort to make it work quickly enough (see
9090
:doc:`optimizing for speed</pages/advanced>`). The
91-
:doc:`alternative control</pages/alternate>` method was made to be easier
91+
:doc:`effects control flow</pages/effects>` was made to be easier
9292
to use for effects that require fast changes.
9393

9494

0 commit comments

Comments
 (0)