phoenix6.controls.solid_color
¶
Module Contents¶
- class phoenix6.controls.solid_color.SolidColor(led_start_index: int, led_end_index: int, color: RGBWColor = RGBWColor())¶
Sets LEDs to a solid color.
- Parameters:
led_start_index (int) – The index of the first LED this animation controls (inclusive). Indices 0-7 control the onboard LEDs, and 8-399 control an attached LED strip.
led_end_index (int) – The index of the last LED this animation controls (inclusive). Indices 0-7 control the onboard LEDs, and 8-399 control an attached LED strip.
color (RGBWColor) – The color to apply to the LEDs.
- property name: str¶
Gets the name of this control request.
- Returns:
Name of the control request
- Return type:
str
- property control_info: dict¶
Gets information about this control request.
- Returns:
Dictonary of control parameter names and corresponding applied values
- Return type:
dict
- led_start_index¶
The index of the first LED this animation controls (inclusive). Indices 0-7 control the onboard LEDs, and 8-399 control an attached LED strip.
- led_end_index¶
The index of the last LED this animation controls (inclusive). Indices 0-7 control the onboard LEDs, and 8-399 control an attached LED strip.
- color¶
The color to apply to the LEDs.
- with_led_start_index(new_led_start_index: int) SolidColor ¶
Modifies this Control Request’s led_start_index parameter and returns itself for method-chaining and easier to use request API.
The index of the first LED this animation controls (inclusive). Indices 0-7 control the onboard LEDs, and 8-399 control an attached LED strip.
- Parameters:
new_led_start_index (int) – Parameter to modify
- Returns:
Itself
- Return type:
- with_led_end_index(new_led_end_index: int) SolidColor ¶
Modifies this Control Request’s led_end_index parameter and returns itself for method-chaining and easier to use request API.
The index of the last LED this animation controls (inclusive). Indices 0-7 control the onboard LEDs, and 8-399 control an attached LED strip.
- Parameters:
new_led_end_index (int) – Parameter to modify
- Returns:
Itself
- Return type:
- with_color(new_color: RGBWColor) SolidColor ¶
Modifies this Control Request’s color parameter and returns itself for method-chaining and easier to use request API.
The color to apply to the LEDs.
- Parameters:
new_color (RGBWColor) – Parameter to modify
- Returns:
Itself
- Return type:
- with_update_freq_hz(new_update_freq_hz: phoenix6.units.hertz) SolidColor ¶
Sets the period at which this control will update at. This is designated in Hertz, with a minimum of 20 Hz (every 50 ms) and a maximum of 1000 Hz (every 1 ms).
If this field is set to 0 Hz, the control request will be sent immediately as a one-shot frame. This may be useful for advanced applications that require outputs to be synchronized with data acquisition. In this case, we recommend not exceeding 50 ms between control calls.
- Parameters:
new_update_freq_hz (hertz) – Parameter to modify
- Returns:
Itself
- Return type: