gsgr.run

class gsgr.run.Run(display_as, color, run, left_sensor=None, right_sensor=None)

A context manager in which the run is being executed.

This is implemented to support cfg changes for individual runs.

Parameter:
  • display_as (int | str) – Passed to MenuItem. Sets display_as initially.

  • color (int) – Passed to MenuItem. Sets color initially. Use color

  • config – A context manager to execute the run in. Designed for cfg calls. Sets context initially.

  • run – The run’s main function / callback.

prepare()

Wird direkt vor action ausgeführt.

Rückgabetyp:

None

update(first=False)
Rückgabetyp:

None

cleanup()

Patched verison of MenuItem.cleanup() to stop all motors.