pygameControls 0.1.1__tar.gz → 0.1.3__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (20) hide show
  1. {pygamecontrols-0.1.1 → pygamecontrols-0.1.3}/PKG-INFO +1 -1
  2. {pygamecontrols-0.1.1 → pygamecontrols-0.1.3}/pygameControls/controller.py +1 -1
  3. {pygamecontrols-0.1.1 → pygamecontrols-0.1.3}/pygameControls/dualsense_controller.py +9 -2
  4. {pygamecontrols-0.1.1 → pygamecontrols-0.1.3}/pygameControls/dualsense_edge_controller.py +9 -2
  5. {pygamecontrols-0.1.1 → pygamecontrols-0.1.3}/pygameControls.egg-info/PKG-INFO +1 -1
  6. {pygamecontrols-0.1.1 → pygamecontrols-0.1.3}/setup.py +1 -1
  7. {pygamecontrols-0.1.1 → pygamecontrols-0.1.3}/LICENSE +0 -0
  8. {pygamecontrols-0.1.1 → pygamecontrols-0.1.3}/README.md +0 -0
  9. {pygamecontrols-0.1.1 → pygamecontrols-0.1.3}/pygameControls/__init__.py +0 -0
  10. {pygamecontrols-0.1.1 → pygamecontrols-0.1.3}/pygameControls/controlsbase.py +0 -0
  11. {pygamecontrols-0.1.1 → pygamecontrols-0.1.3}/pygameControls/generic_controller.py +0 -0
  12. {pygamecontrols-0.1.1 → pygamecontrols-0.1.3}/pygameControls/logitech_dual_action_controller.py +0 -0
  13. {pygamecontrols-0.1.1 → pygamecontrols-0.1.3}/pygameControls/logitech_f310_controller.py +0 -0
  14. {pygamecontrols-0.1.1 → pygamecontrols-0.1.3}/pygameControls/logitech_f510_controller.py +0 -0
  15. {pygamecontrols-0.1.1 → pygamecontrols-0.1.3}/pygameControls/logitech_f710_controller.py +0 -0
  16. {pygamecontrols-0.1.1 → pygamecontrols-0.1.3}/pygameControls/xbox_series_x_controller.py +0 -0
  17. {pygamecontrols-0.1.1 → pygamecontrols-0.1.3}/pygameControls.egg-info/SOURCES.txt +0 -0
  18. {pygamecontrols-0.1.1 → pygamecontrols-0.1.3}/pygameControls.egg-info/dependency_links.txt +0 -0
  19. {pygamecontrols-0.1.1 → pygamecontrols-0.1.3}/pygameControls.egg-info/top_level.txt +0 -0
  20. {pygamecontrols-0.1.1 → pygamecontrols-0.1.3}/setup.cfg +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: pygameControls
3
- Version: 0.1.1
3
+ Version: 0.1.3
4
4
  Summary: A simple controller class for pygame.
5
5
  Home-page:
6
6
  Author: Jan Lerking
@@ -9,7 +9,7 @@ from .xbox_series_x_controller import XboxSeriesXController
9
9
  from .generic_controller import GenericController
10
10
  from .logitech_dual_action_controller import LogitechDualActionController
11
11
 
12
- __version__ = "0.1.1"
12
+ __version__ = "0.1.3"
13
13
 
14
14
  CONTROLLERS = {
15
15
  "DualSense Wireless Controller": DualSenseController,
@@ -76,9 +76,16 @@ class DualSenseController(ControlsBase):
76
76
  def pause(self):
77
77
  pass
78
78
 
79
- def rumble(self):
80
- pass
79
+ def rumble(self, left, right):
80
+ if not left in range(256) or not right in range(256):
81
+ raise ValueError("left and right values must be in the range 0 - 255")
82
+ self.device.setLeftMotor(left)
83
+ self.device.setRightMotor(right)
81
84
 
85
+ def stop_rumble(self):
86
+ self.device.setLeftMotor(0)
87
+ self.device.setRightMotor(0)
88
+
82
89
  @property
83
90
  def name(self) -> str:
84
91
  return self._name
@@ -68,9 +68,16 @@ class DualSenseEdgeController(ControlsBase):
68
68
  def pause(self):
69
69
  pass
70
70
 
71
- def rumble(self):
72
- pass
71
+ def rumble(self, left, right):
72
+ if not left in range(256) or not right in range(256):
73
+ raise ValueError("left and right values must be in the range 0 - 255")
74
+ self.device.setLeftMotor(left)
75
+ self.device.setRightMotor(right)
73
76
 
77
+ def stop_rumble(self):
78
+ self.device.setLeftMotor(0)
79
+ self.device.setRightMotor(0)
80
+
74
81
  @property
75
82
  def name(self) -> str:
76
83
  return self._name
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: pygameControls
3
- Version: 0.1.1
3
+ Version: 0.1.3
4
4
  Summary: A simple controller class for pygame.
5
5
  Home-page:
6
6
  Author: Jan Lerking
@@ -3,7 +3,7 @@ if __name__ == "__main__":
3
3
 
4
4
  setup(
5
5
  name='pygameControls',
6
- version='0.1.1',
6
+ version='0.1.3',
7
7
  packages=find_packages(),
8
8
  install_requires=[],
9
9
  author='Jan Lerking',
File without changes
File without changes
File without changes