rgbmatrix5x5 Module¶
An RGB LED display of 5x5 pixels made by pimoroni
Currently uses the library maintained by the manufacturer for device communication
Base Class¶
-
class
tallypi.outputs.rgbmatrix5x5.Base(*args, **kwargs)[source]¶ Bases:
tallypi.common.BaseOutputBase class for RGBMatrix5x5 displays
- Parameters
config (SingleTallyConfig) – The initial value for
configbrightness_scale (float, optional) – The value to set for
brightness_scale. Default is 1.0
-
color_map: ClassVar[Dict[tslumd.common.TallyColor, Tuple[int, int, int]]] = {<TallyColor.OFF: 0>: (0, 0, 0), <TallyColor.RED: 1>: (255, 0, 0), <TallyColor.GREEN: 2>: (0, 255, 0), <TallyColor.AMBER: 3>: (255, 191, 0)}¶ Mapping of
tslumd.common.TallyColorto tuples ofRgb
-
device: rgbmatrix5x5.RGBMatrix5x5¶ The
rgbmatrix5x5.RGBMatrix5x5instance
-
brightness_scale: float¶ A multiplier (from 0.0 to 1.0) used to limit the maximum brightness. A value of 1.0 produces the full range while 0.5 scales to half brightness.
-
classmethod
get_init_options() → Tuple[tallypi.config.Option][source]¶ Get the
config.Optiondefinitions required for this object
Indicator Class¶
-
class
tallypi.outputs.rgbmatrix5x5.Indicator(*args, **kwargs)[source]¶ Bases:
tallypi.outputs.rgbmatrix5x5.BaseShow a solid color for a single
Tally-
async
set_color(color: tslumd.common.TallyColor)[source]¶ Set all pixels of the
deviceto the given colorThe rgb values are retrieved from the
color_map- Parameters
color – The
TallyColor
-
async
set_brightness(brightness: float)[source]¶ Set the brightness of the device
- Parameters
brightness – The brightness value from
0.0to1.0
-
async
on_receiver_tally_change(tally: tslumd.tallyobj.Tally, *args, **kwargs)[source]¶ Callback for tally updates from
tslumd.tallyobj.Tally
-
async
Matrix Class¶
-
class
tallypi.outputs.rgbmatrix5x5.Matrix(*args, **kwargs)[source]¶ Bases:
tallypi.outputs.rgbmatrix5x5.BaseShow the status of up to 5 tallies in a matrix
The tallies are shown in 5 rows beginning with the
tally_indexof theconfigThe columns show the individual
TallyTypevalues('rh_tally', 'txt_tally', 'lh_tally')-
tally_matches(tally: tslumd.tallyobj.Tally) → bool[source]¶ Determine whether the given tally matches the
configUses either
SingleTallyConfig.matches()orMultiTallyConfig.matches(), depending on which of the two are used for theBaseIOsubclass
-
async
on_receiver_tally_change(tally: tslumd.tallyobj.Tally, props_changed: Set[str], **kwargs)[source]¶ Callback for tally updates from
tslumd.tallyobj.Tally
-