class documentation

class LedRingAnimations:

View In Hierarchy

Object which implements control method for the Led ring

Method __init__ Undocumented
Method alternate The different colors are alternated one after the other. If iterations is 0, do it indefinitely
Method blackout Black out every led, without stopping previous function
Method breath Leds turn on like a loading circle, and are all turned off at the same time If iterations is 0, do it indefinitely
Method breath_animation Undocumented
Method chase Movie theater light style chaser animation. If iterations is 0, do it indefinitely
Method color_wipe Wipe color across, light a Led at a time. Similar to goUp, but Leds are not turned off at the end.
Method custom Sets all Leds to a color at once
Method fade Undocumented
Method flashing Flash a color according to a frequency
Method get_state_list_from_pixel_strip Return a list of size self.led_count, containing the current rgb color [r, g, b] of each Led in the real led ring
Method go_up Leds turn on like a loading circle, and are all turned off at the same time If iterations is 0, do it indefinitely
Method go_up_and_down Leds turn on like a loading circle, and turn off the same way If iterations is 0, do it indefinitely
Method init_animation Undocumented
Method init_led_ring Undocumented
Method is_animation_running Undocumented
Method none Turn off leds, in simu and in real, with the "solid" method
Method notify_observers trigger a function in the observer (led ring node) class
Method rainbow Draw rainbow that fades across all Leds at once If iterations is 0, do it indefinitely
Method rainbow_chase Rainbow chase animation If iterations is 0, do it indefinitely
Method rainbow_cycle Draw rainbow that uniformly distributes itself across all Leds If iterations is 0, do it indefinitely
Method register_observer Used to add the led ring node as an observer of this class
Method set_and_show_leds Iterate over all leds, set them to the chosen color and show them all at once. "range_" must be filled only if we want to iterate over a part of the led ring. "index_delta" is used by "chase" methods only.
Method set_brightness Undocumented
Method set_current_anim_and_color Undocumented
Method set_current_real_leds_state Undocumented
Method set_led Set the color of a pixel, in simu or in real
Method set_led_color Undocumented
Method show_leds Display all Led's values previously set, in simu or in real
Method snake Undocumented
Method solid Sets all Leds to a color at once
Method stop_animation Stop iteration (and endless iteration) for functions that perform continous action like alternate_color, and wait until the previous function is finished. Used when launched in robot status display mode...
Method was_function_interrupted Undocumented
Instance Variable current_animation Undocumented
Instance Variable current_animation_color Undocumented
Instance Variable current_real_led_ring_state Undocumented
Instance Variable default_alternate_period Undocumented
Instance Variable default_breath_period Undocumented
Instance Variable default_chase_period Undocumented
Instance Variable default_colorwipe_period Undocumented
Instance Variable default_flashing_period Undocumented
Instance Variable default_goup_period Undocumented
Instance Variable default_goupanddown_period Undocumented
Instance Variable default_rainbow_period Undocumented
Instance Variable default_rainbowchase_period Undocumented
Instance Variable default_rainbowcycle_period Undocumented
Instance Variable default_snake_period Undocumented
Instance Variable LED_BRIGHTNESS Undocumented
Instance Variable LED_CHANNEL Undocumented
Instance Variable LED_COUNT Undocumented
Instance Variable led_count Undocumented
Instance Variable LED_DMA Undocumented
Instance Variable LED_FREQ_HZ Undocumented
Instance Variable LED_INVERT Undocumented
Instance Variable LED_PIN Undocumented
Instance Variable led_ring_makers Undocumented
Instance Variable LED_STRIP Undocumented
Instance Variable off_color Undocumented
Instance Variable strip Undocumented
Method __play_cycle_animation Undocumented
Method __rainbow_animation Undocumented
Method __sleep_animation Undocumented
Method __wipe_animation Undocumented
Instance Variable __animation_lock Undocumented
Instance Variable __is_simulation Undocumented
Instance Variable __led_offset Undocumented
Instance Variable __stop_func Undocumented
Instance Variable _observers Undocumented
def __init__(self):

Undocumented

def alternate(self, color_list_rgba, period=None, iterations=0):

The different colors are alternated one after the other. If iterations is 0, do it indefinitely

def blackout(self):

Black out every led, without stopping previous function

def breath(self, color_rgba, period=None, iterations=0):

Leds turn on like a loading circle, and are all turned off at the same time If iterations is 0, do it indefinitely

def breath_animation(self, color_rgba, duration):

Undocumented

def chase(self, color_rgba, period=None, iterations=0):

Movie theater light style chaser animation. If iterations is 0, do it indefinitely

def color_wipe(self, color_rgba, duration=None):

Wipe color across, light a Led at a time. Similar to goUp, but Leds are not turned off at the end.

def custom(self, color_rgba):

Sets all Leds to a color at once

def fade(self, color_rgba, duration=3.5, steps=100):

Undocumented

def flashing(self, color_rgba, period=None, iterations=0):

Flash a color according to a frequency

def get_state_list_from_pixel_strip(self):

Return a list of size self.led_count, containing the current rgb color [r, g, b] of each Led in the real led ring

def go_up(self, color_rgba, period=None, iterations=0):

Leds turn on like a loading circle, and are all turned off at the same time If iterations is 0, do it indefinitely

def go_up_and_down(self, color_rgba, period=None, iterations=0):

Leds turn on like a loading circle, and turn off the same way If iterations is 0, do it indefinitely

def init_animation(self):

Undocumented

def init_led_ring(self):

Undocumented

def is_animation_running(self):

Undocumented

def none(self):

Turn off leds, in simu and in real, with the "solid" method

def notify_observers(self):

trigger a function in the observer (led ring node) class

def rainbow(self, period=None, iterations=0):

Draw rainbow that fades across all Leds at once If iterations is 0, do it indefinitely

def rainbow_chase(self, period=None, iterations=0):

Rainbow chase animation If iterations is 0, do it indefinitely

def rainbow_cycle(self, period=None, iterations=0):

Draw rainbow that uniformly distributes itself across all Leds If iterations is 0, do it indefinitely

def register_observer(self, observer):

Used to add the led ring node as an observer of this class

def set_and_show_leds(self, led_color, range_=None, index_delta=0):

Iterate over all leds, set them to the chosen color and show them all at once. "range_" must be filled only if we want to iterate over a part of the led ring. "index_delta" is used by "chase" methods only.

def set_brightness(self, brightness):

Undocumented

def set_current_anim_and_color(self, animation, anim_color=None):

Undocumented

def set_current_real_leds_state(self, rgb_list):

Undocumented

def set_led(self, index, color_rgba):

Set the color of a pixel, in simu or in real

def set_led_color(self, led_id, color_rgba):

Undocumented

def show_leds(self):

Display all Led's values previously set, in simu or in real

def snake(self, color_rgba, period=None, iterations=0):

Undocumented

def solid(self, color_rgba):

Sets all Leds to a color at once

def stop_animation(self):

Stop iteration (and endless iteration) for functions that perform continous action like alternate_color, and wait until the previous function is finished. Used when launched in robot status display mode. Indeed, when used by the user, the previous function is stopped before, in the start thread function

def was_function_interrupted(self):

Undocumented

current_animation =

Undocumented

current_animation_color =

Undocumented

current_real_led_ring_state =

Undocumented

default_alternate_period =

Undocumented

default_breath_period =

Undocumented

default_chase_period =

Undocumented

default_colorwipe_period =

Undocumented

default_flashing_period =

Undocumented

default_goup_period =

Undocumented

default_goupanddown_period =

Undocumented

default_rainbow_period =

Undocumented

default_rainbowchase_period =

Undocumented

default_rainbowcycle_period =

Undocumented

default_snake_period =

Undocumented

LED_BRIGHTNESS =

Undocumented

LED_CHANNEL =

Undocumented

LED_COUNT =

Undocumented

led_count =

Undocumented

LED_DMA =

Undocumented

LED_FREQ_HZ =

Undocumented

LED_INVERT =

Undocumented

LED_PIN =

Undocumented

led_ring_makers =

Undocumented

LED_STRIP =

Undocumented

off_color =

Undocumented

strip =

Undocumented

def __play_cycle_animation(self, color_cycle, period, iterations, animation_function):

Undocumented

def __rainbow_animation(self, duration, animation_function):

Undocumented

def __sleep_animation(self, until_time):

Undocumented

def __wipe_animation(self, color_rgba, duration):

Undocumented

__animation_lock =

Undocumented

__is_simulation =

Undocumented

__led_offset =

Undocumented

__stop_func: bool =

Undocumented

_observers: list =

Undocumented