Warthog Lights Control
This Python module and command line tool control the lights on Thrustmaster's Warthog HOTAS throttle box.
Largely based on the reverse-engineering work done by mfranz
How to use
Once installed, this tool provides a Python module and a command-line tool, both named whlctl.
Command line tool
whlctl 0 # Turn off backlight
whlctl 5 # Turn backlight up to max brightness
whlctl 3 -l 1,5 # Turn lights 1 and 5 up to brightness 3/5
whlctl 1 -l 0,5 # Turn backlight and light 5 up to brightness 1/5
Omitting the -l flag will default to adjusting the backlight, and turn off all other lights.
Python API
import whlctl
whlctl.find_throttle() # -> "/dev/hidrawN" or FileNotFoundError
whlctl.write_leds(backlight=True, leds=[True,True,True,True,True], brightness=5)
# -> None or FileNotFoundError (see find_throttle)
find_throttle()
Takes no argument and returns the HID node for the Thrustmaster Warthog throttle (044f:0404), or raises a FileNotFoundError if the device isn't found.
This function is cached.
write_leds(backlight: bool, leds: list[bool], brightness: int)
The leds list must contain 5 booleans which designate, in order, the five circular lights from top to bottom. True means the light is to be powered on at the given brightness, False means it should be powered off.
brightness is expressed between 0 and 5.
Returns nothing, implicitly calls find_throttle() and thus can fail with FileNotFoundError as above. It can also hit a permission error if the current user has no write permission to the device node.
Metadata
Release files for whlctl 0.1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| whlctl-0.1.1.tar.gz | 3.4 kB | Without provenance | Details for whlctl-0.1.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| whlctl-0.1.1-py2.py3-none-any.whl | Python 2, Python 3 | none | any | Details for whlctl-0.1.1-py2.py3-none-any.whl |
Total release size: 8.2 kB
Release files / whlctl-0.1.1.tar.gz
| Download URL | whlctl-0.1.1.tar.gz |
|---|---|
| Size | 3.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
45733b03f1b0f10320d32b835a006024ba9456acbd65c324bdd191430029259f
|
|
BLAKE2b-256 checksum How to use checksums |
9ecd297220c8952d2d5832bbc6bc9b10f6410ef5fd18ef0b2eafefc13edf7387
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.1 CPython/3.9.15
|
Release files / whlctl-0.1.1-py2.py3-none-any.whl
| Download URL | whlctl-0.1.1-py2.py3-none-any.whl |
|---|---|
| Size | 4.8 kB |
| Tags | Python 2 Python 3 |
|
SHA-256 checksum How to use checksums |
90045fe50ff8b1979dae8103ebb4aa62c7a2873466f237408a0f08ddfb7c83b2
|
|
BLAKE2b-256 checksum How to use checksums |
ec60fc918aeddacbb1c03a3383eaf867920baa2cc2784b5d77fe414f80fdd97a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.1 CPython/3.9.15
|
Security for whlctl 0.1.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.