led_sdk
Functions:
| Name | Description |
|---|---|
logi_led_flash_lighting |
Save the current lighting, plays the flashing effect on the targeted devices. |
logi_led_init |
Make sure there isn't already another instance running and then makes the necessary initializations. |
logi_led_init_with_name |
Make sure there isn't already another instance running and then makes the necessary initializations. |
logi_led_pulse_lighting |
Save the current lighting, plays the pulsing effect on the targeted devices. |
logi_led_restore_lighting |
Restore the last saved lighting. |
logi_led_save_current_lighting |
Save the current lighting so that it can be restored after a temporary effect is finished. |
logi_led_set_lighting |
Set the lighting on connected and supported devices. |
logi_led_set_target_device |
Set the target device type for future calls. |
logi_led_shutdown |
Restore the last saved lighting and frees memory used by the SDK. |
logi_led_stop_effects |
Stop any of the preset effect. |
start_led_pulse |
Start the pulsing red effect in the thread on the keyboard. |
logi_led_flash_lighting
Save the current lighting, plays the flashing effect on the targeted devices.
Finally, restores the saved lighting.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
|
tuple[int, int, int]
|
Tuple with integer range 0 to 100 as an amount of red, green, blue |
required |
|
int
|
Parameter can be set (in millisecond) to LOGI_LED_DURATION_INFINITE to make the effect run until stopped with logi_led_stop_effects() |
required |
|
int
|
Duration of the flashing interval in millisecond |
required |
Returns:
| Type | Description |
|---|---|
bool
|
A result of execution |
Source code in src/dcspy/sdk/led_sdk.py
104 105 106 107 108 109 110 111 112 113 114 115 116 117 | |
logi_led_init
logi_led_init() -> bool
Make sure there isn't already another instance running and then makes the necessary initializations.
It saves the current lighting for all connected and supported devices. This function will also stop any effect currently going on the connected devices.
Returns:
| Type | Description |
|---|---|
bool
|
A result of execution |
Source code in src/dcspy/sdk/led_sdk.py
16 17 18 19 20 21 22 23 24 25 26 | |
logi_led_init_with_name
Make sure there isn't already another instance running and then makes the necessary initializations.
It saves the current lighting for all connected and supported devices. This function will also stop any effect currently going on the connected devices. Passing a name into this function will make the integration show up with a given custom name. The name is set only once, the first time this function or logi_led_init() is called.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
|
str
|
The referred name for this integration to show u as |
required |
Returns:
| Type | Description |
|---|---|
bool
|
A result of execution |
Source code in src/dcspy/sdk/led_sdk.py
29 30 31 32 33 34 35 36 37 38 39 40 41 42 | |
logi_led_pulse_lighting
Save the current lighting, plays the pulsing effect on the targeted devices.
Finally, restores the saved lighting.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
|
tuple[int, int, int]
|
Tuple with integer values range 0 to 100 as an amount of red, green, blue. |
required |
|
int
|
Parameter can be set (in millisecond) to LOGI_LED_DURATION_INFINITE to make the effect run until stopped with logi_led_stop_effects(). |
required |
|
int
|
Duration of the flashing interval in millisecond. |
required |
Returns:
| Type | Description |
|---|---|
bool
|
A result of execution. |
Source code in src/dcspy/sdk/led_sdk.py
120 121 122 123 124 125 126 127 128 129 130 131 132 133 | |
logi_led_restore_lighting
logi_led_restore_lighting() -> bool
Restore the last saved lighting.
It should be called after a temporary effect is finished. For example, if flashing a red warning sign for a few seconds, you would call this function right after the warning effect is finished.
Returns:
| Type | Description |
|---|---|
bool
|
A result of execution |
Source code in src/dcspy/sdk/led_sdk.py
73 74 75 76 77 78 79 80 81 82 83 84 | |
logi_led_save_current_lighting
logi_led_save_current_lighting() -> bool
Save the current lighting so that it can be restored after a temporary effect is finished.
For example, if flashing a red warning sign for a few seconds, you would call the logi_led_save_current_lighting() function just before starting the warning effect.
Returns:
| Type | Description |
|---|---|
bool
|
A result of execution |
Source code in src/dcspy/sdk/led_sdk.py
60 61 62 63 64 65 66 67 68 69 70 | |
logi_led_set_lighting
Set the lighting on connected and supported devices.
Do not call this function immediately after logi_led_init(), instead of wait a little of time after logi_led_init(). For devices that only support a single color, the highest percentage value given of the three colors will define the intensity. For monochrome device, Logitech Gaming Software will proportionally reduce the value of the highest color, according to the user hardware brightness setting.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
|
tuple[int, int, int]
|
Tuple with integer range 0 to 100 as an amount of red, green, blue |
required |
Returns:
| Type | Description |
|---|---|
bool
|
A result of execution |
Source code in src/dcspy/sdk/led_sdk.py
87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 | |
logi_led_set_target_device
logi_led_set_target_device(
target_device: LedConstants,
) -> bool
Set the target device type for future calls.
The default target device is LOGI_DEVICETYPE_ALL, therefore, if no call is made to LogiLedSetTargetDevice the SDK will apply any function to all the connected devices.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
|
LedConstants
|
One or a combination of the following values: LOGI_DEVICETYPE_MONOCHROME, LOGI_DEVICETYPE_RGB, LOGI_DEVICETYPE_ALL |
required |
Returns:
| Type | Description |
|---|---|
bool
|
A result of execution |
Source code in src/dcspy/sdk/led_sdk.py
45 46 47 48 49 50 51 52 53 54 55 56 57 | |
logi_led_shutdown
logi_led_shutdown() -> None
Restore the last saved lighting and frees memory used by the SDK.
Source code in src/dcspy/sdk/led_sdk.py
148 149 150 151 | |
logi_led_stop_effects
logi_led_stop_effects() -> bool
Stop any of the preset effect.
Started from logi_led_flash_lighting() or logi_led_pulse_lighting().
Returns:
| Type | Description |
|---|---|
bool
|
A result of execution |
Source code in src/dcspy/sdk/led_sdk.py
136 137 138 139 140 141 142 143 144 145 | |
start_led_pulse
Start the pulsing red effect in the thread on the keyboard.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
|
tuple[int, int, int]
|
Tuple with integer values range 0 to 100 as an amount of red, green, blue. |
required |
|
int
|
Parameter can be set (in millisecond) to 0 (zero) to make the effect run until an event is set. |
required |
|
int
|
Flashing interval in a millisecond. |
required |
|
Event
|
Stop event for infinite loop. |
required |
Source code in src/dcspy/sdk/led_sdk.py
154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 | |