pylabrobot.formulatrix.mantis.driver.simulator.MantisSimulationLedBar#
- class pylabrobot.formulatrix.mantis.driver.simulator.MantisSimulationLedBar(*, driver: MantisDriver, number_of_leds: int, show_actions: bool)#
Bases:
LedBarAn LED bar with no device behind it: every command is taken, and no hold is waited.
Attributes
The colour of the LEDs
show_progresslights.The colour shown after an action that failed, until the next action starts.
The colour shown while setup runs.
The colour shown for
SETUP_DONE_HOLDafter a setup.Methods
__init__(*, driver, number_of_leds, show_actions)set_color(*, color)Show one colour on every LED, or one colour per LED; any animation is stopped first.
show_progress(*, done, total)Light
round(number_of_leds * done / total)LEDs from the left indispense_progress_color, at least one oncedone> 0, the rest off; nothing is sent when that many are already lit.start_animation(*[, effect])Play one of
EFFECTS, repeating, until a colour is set or the animation is stopped.Stop the animation; the bar holds what it shows.
turn_off()Turn every LED off; no action shows its colour until the next one starts.
- Parameters:
driver (MantisDriver)
number_of_leds (int)
show_actions (bool)