- refactored code structure
- fixed playerID led display
- added Color function with tuple support
- added type checking in every function
- added more Exceptions for out of bound values
This commit is contained in:
Florian Kaiser
2020-12-31 23:48:34 +01:00
parent 8fb31f86ba
commit 94cb09dbdd
7 changed files with 228 additions and 174 deletions

View File

@@ -10,16 +10,15 @@ pip install pydualsense
```
# usage
```python
from pydualsense import pydualsense
ds = pydualsense() # open controller
ds.setColor(255,0,0) # set touchpad color to red
ds.setLeftTriggerMode(TriggerModes.Rigid)
ds.setLeftTriggerForce(1, 255)
ds.init() # initialize controller
ds.light.setColorI(255,0,0) # set touchpad color to red
ds.triggerL.setMode(TriggerModes.Rigid)
ds.triggerL.setForce(1, 255)
ds.close() # closing the controller
```
@@ -44,5 +43,7 @@ Most stuff for this implementation were provided by and used from:
# Coming soon
- add bluetooth support
- add multiple controllers
- reading the states of the controller to enable a fully compatibility with python - partially done
- add documentation using sphinx