LedRing

class pyniryo_nate.models.robot.LedRing(animation: str, color: Color, brightness: int, period_ms: int | None = None)[source]

Bases: object

What the light ring at the base of the robot shows. The robot picks the state to display and drives the ring, this carries that rendering as is, so a client draws what it receives and needs no rule of its own.

Parameters:
  • animation (str) – How the ring lights up: off, solid, blink, breath or chase today. A robot may add a value, always in lowercase; a client that does not know one draws a steady light in the given color.

  • color (Color) – The color of the light.

  • brightness (int) – 0 for dark, 255 for the brightest the ring produces.

  • period_ms (int | None) – Duration of one cycle of the animation in milliseconds, None for off and solid.

Attributes

Methods

animation: str
color: Color
brightness: int
period_ms: int | None = None
classmethod from_transport_model(model: LedRing) → LedRing[source]
Parameters:

model (LedRing)

Return type:

LedRing