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:
bufByteCount()[source]

Total number of bytes that the pixel buffer represents. Mainly used for drivers such as bibliopixel.drivers.serial and network

cleanup()[source]

Called to shut this driver down, and stop all threads and processes.

classmethod construct(project, **desc)[source]

Construct a driver from a project and a description.

join(timeout=None)[source]

Called to join threads.

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.

set_project(project)[source]
start()[source]

Called right before this driver will run. This is the place to do things like start threads, not in the constructor.

stop()[source]

Called to request any threads or resources to shut down.

sync()[source]

The sync() method is called after the entire frame has been sent to the device to indicate that it may now be displayed.

This is particularly useful when there are multiple drivers comprising one display which all need to display the next frame at exactly the same time.

update_colors()[source]

Apply any corrections to the current color list and send the results to the driver output. This function primarily provided as a wrapper for each driver’s implementation of _compute_packet() and _send_packet().