Skip to content

Class DroneRGBLedApi ​

Handles interactions with Drone RGB LEDs

Methods: ​

__init__ ​

python
def __init__(
	rc_api
)

Initialize self. See help(type(self)) for accurate signature.

Params: ​
  • rc_api: Any



set_brightness ​

python
def set_brightness(
	brightness: int
)

Sets the brightness of the LEDs.

Params: ​
  • brightness: int - Brightness percentage (0-100).



set_color_by_motor_number ​

python
def set_color_by_motor_number(
	r: int,
	g: int,
	b: int,
	index: robeex_ai_drone_api.rgb_led_api.MotorNumber
)

Sets the color for a specific LED index.

Params: ​
  • r: int - Red intensity (0-255).
  • g: int - Green intensity (0-255).
  • b: int - Blue intensity (0-255).
  • index: MotorNumber - LED index (-1 for disable, 0 for all, 1-4 for specific motors).



set_full_color ​

python
def set_full_color(
	r: int,
	g: int,
	b: int
)

Sets the same color for all LEDs.

Params: ​
  • r: int - Red intensity (0-255).
  • g: int - Green intensity (0-255).
  • b: int - Blue intensity (0-255).



set_mode ​

python
def set_mode(
	mode: robeex_ai_drone_api.rgb_led_api.RGBMode
)

Sets the mode of the LEDs (AUTO or MANUAL).

Params: ​
  • mode: RGBMode - The mode to set (RGBMode.AUTO or RGBMode.MANUAL).