logitech
Classes:
| Name | Description |
|---|---|
LogitechDevice |
General Logitech device. |
LogitechDevice
LogitechDevice(
parser: ProtocolParser,
sock: socket,
model: LogitechDeviceModel,
)
General Logitech device.
General Logitech device.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
|
ProtocolParser
|
DCS-BIOS parser instance |
required |
|
socket
|
multicast UDP socket |
required |
|
LogitechDeviceModel
|
device model |
required |
Methods:
| Name | Description |
|---|---|
button_handle |
Button handler. |
check_buttons |
Check if a button was pressed and return its enum. |
clear |
Clear LCD. |
detecting_plane |
Try to detect airplane base on value received from DCS-BIOS. |
display |
Display a message as an image at LCD. |
gkey_callback_handler |
Logitech G-Key callback handler. |
load_new_plane |
Dynamic load of new detected aircraft. |
unload_old_plane |
Unloads the previous plane by remove all callbacks and keep only one. |
Attributes:
| Name | Type | Description |
|---|---|---|
messages |
list[str]
|
Get the text messages without the tittle from LCD. |
text |
list[tuple[str, Color]]
|
Get the latest text from LCD. |
Source code in src/dcspy/logitech.py
25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 | |
messages
property
text
property
writable
button_handle
button_handle() -> None
Button handler.
- Detect if a button was pressed
- Sent action to DCS-BIOS via network socket
Source code in src/dcspy/logitech.py
183 184 185 186 187 188 189 190 191 192 193 | |
check_buttons
check_buttons() -> LcdButton
Check if a button was pressed and return its enum.
Returns:
| Type | Description |
|---|---|
LcdButton
|
LcdButton enum of pressed button |
Source code in src/dcspy/logitech.py
168 169 170 171 172 173 174 175 176 177 178 179 180 181 | |
clear
clear(true_clear: bool = False) -> None
Clear LCD.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
|
bool
|
|
False
|
Source code in src/dcspy/logitech.py
208 209 210 211 212 213 214 215 216 | |
detecting_plane
Try to detect airplane base on value received from DCS-BIOS.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
|
str
|
Data from DCS-BIOS |
required |
Source code in src/dcspy/logitech.py
90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 | |
display
display() -> None
Display a message as an image at LCD.
For G13/G15/G510 takes the first four (4) or fewer elements of a list and display as four (4) rows. For G19 takes the first eight (8) or fewer elements of the list and display as eight (8) rows.
Source code in src/dcspy/logitech.py
80 81 82 83 84 85 86 87 88 | |
gkey_callback_handler
Logitech G-Key callback handler.
Send action to DCS-BIOS via network socket.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
|
int
|
Index number of G-Key |
required |
|
int
|
Mode of G-Key |
required |
|
int
|
Key state, one (1) - pressed, zero (0) - released |
required |
|
int
|
Indicate if the Event comes from a mouse, one (1) is yes, zro (0) is no |
required |
Source code in src/dcspy/logitech.py
150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 | |
load_new_plane
load_new_plane() -> None
Dynamic load of new detected aircraft.
Set up callbacks for detected plane inside DCS-BIOS parser.
Source code in src/dcspy/logitech.py
123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 | |
unload_old_plane
unload_old_plane() -> None
Unloads the previous plane by remove all callbacks and keep only one.
Source code in src/dcspy/logitech.py
113 114 115 116 117 118 119 120 121 | |