bibliopixel.drivers.driver_base module¶
-
class
bibliopixel.drivers.driver_base.
DriverBase
(num=0, width=0, height=0, c_order='RGB', gamma=None, maker=<bibliopixel.project.data_maker.Maker object>, **kwds)[source]¶ Bases:
object
Base driver class to build other drivers from.
Parameters: - num (int) – Number of total pixels held by this driver
- width (int) – Width of matrix, for use
with
bibliopixel.layout.matrix.Matrix
- height (int) – Height of matrix, for use
with
bibliopixel.layout.matrix.Matrix
- c_order (str) – Color channel order
- gamma – Gamma correction table. Preset tables available
in
bibliopixel.colors.gamma
-
bufByteCount
()[source]¶ Total number of bytes that the pixel buffer represents. Mainly used for drivers such as
bibliopixel.drivers.serial
andnetwork
-
classmethod
construct
(project, **desc)[source]¶ Construct a driver from a project and a description.
-
pre_recursion
()¶
-
set_brightness
(brightness)[source]¶ Set the global brightness for this driver’s output.
Parameters: brightness (int) – 0-255 value representing the desired brightness level
-
set_colors
(colors, pos)[source]¶ Use with caution!
Directly set the pixel buffers.
Parameters: - colors – A list of color tuples
- pos (int) – Position in color list to begin set operation.
-
set_device_brightness
= None¶
-
set_pixel_positions
(pixel_positions)[source]¶ Internal Use Only
Placeholder callback for sending physical pixel layout data to the
SimPixel
driver.
-
start
()[source]¶ Called right before this driver will run. This is the place to do things like start threads, not in the constructor.