brian.uicontrol
- UiEventsListenerAlreadyClosedError
- LedColor
- ButtonId
- LedButtonAnimation
- set_button_led
- enable_knob_rotation_animation
- get_num_of_leds
UiEventsListenerAlreadyClosedError class objects
Thrown when trying to access closed UiEventsListener
LedColor class objects
__init__
red
green
blue
ButtonId class objects
TOP_LEFT
TOP_RIGHT
BOTTOM_LEFT
BOTTOM_RIGHT
KNOB
LedButtonAnimation class objects
Constants for selecting behavior of button LEDs. Only in use when LED animations are handled by Brian OS.
OFF
LED is fully off
STANDBY
LED is pulsing at low brightness level
SELECTABLE
LED is pulsing at medium brightness level
SELECTED
LED is pulsing at high brightness level
set_button_led
@staticmethod
def set_button_led(target: ButtonId,
animation: LedButtonAnimation,
color: LedColor = 'DEFAULT_COLOR_FROM_SETTINGS') -> None
Set desired animation and color for a specific button (target). These settings override the animation
requested by the PhysButtonOverlay
and the default os button effect, unless LedButtonAnimation._inherit
is used.
enable_knob_rotation_animation
If enabled, OS automatically animates the LEDs under the knob when it rotates. The user program starts in the enabled state.