class Light - guddimon-/boblight-client GitHub Wiki
Documentation of class Light's public methods and their attributes
Methods
Light(name, vSanFrom=0, vScanTo=0, hScanFrom=0, hScanTo=0, setManually=False, color=Color(), speed=0, interpolation=False)
- Instantiate a new light. This is used by class Boblight to add the read lights to its internal structure.
setInterpolation(interpolation)
- Set the light's new interpolation value.
setSetManually(setManually)
- Set the light's new setManually value.
setSpeed(speed)
- Set the light's new speed value.
getName()
- Get the light's name. The result is of type string.
getSpeed()
- Get the light's speed value. The result is of type integer.
getColor()
- Get the light's color. The result is of type Color (see class Color).
getHScanFrom()
, getHScanTo()
, getVScanFrom()
, getVScanTo()
- Get the light's scan values as they are in the servers configuration. The result is of type float.
getInterpolation()
- Get the light's interpolation value. The result is of type boolean.
Attributes
name
:
Name of the light as boblightd sends it to us.
vScanFrom
, vScanTo
, hScanFrom
, hScanTo
:
These are the values as they are in the servers configuration. These information are stored for future features of boblib.py.
setManually
:
Indicates if this light's color was set manually by the users input (True) or by some internal calculation (False). This may help for scenarios like "set a few lights color and interpolate all the ones between them".
color
:
The lights color. See class Color for more details.
speed
:
Set the light's speed to a new value. Allowed are integer values in the range [0, 100]
ìnterpolation
:
Enable/disable interpolation of the light. Allowed values are True/False.