pygameControls 0.1.1__py3-none-any.whl → 0.1.2__py3-none-any.whl

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.
@@ -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.2"
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(255) or not right in range(255):
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(255) or not right in range(255):
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.2
4
4
  Summary: A simple controller class for pygame.
5
5
  Home-page:
6
6
  Author: Jan Lerking
@@ -1,16 +1,16 @@
1
1
  pygameControls/__init__.py,sha256=Ivl6jPIP4xfrBe5kokd2FXP_CLV0bATuV3rorKfDcHI,25
2
- pygameControls/controller.py,sha256=RYOJk9n2dgF9s6Rp5C0yLTyVD1yJP_ZeL1DeicHnJZE,1257
2
+ pygameControls/controller.py,sha256=_73bW4ezix_VSQ9B_npDKrT5KQShNsM28YtO22e6AwM,1257
3
3
  pygameControls/controlsbase.py,sha256=dy7AzIjw4ZFP14Dq4QmQdQps5XgoH55vbAacVZYMXRQ,544
4
- pygameControls/dualsense_controller.py,sha256=IXQM3N7ClNSugDHM6wseP5la8_4zEEf3ySHIR0Ehi88,3119
5
- pygameControls/dualsense_edge_controller.py,sha256=2r1IGT5QL8YdHtQ6uTvvbfj39uKATSbczXBAQdAzf1c,2951
4
+ pygameControls/dualsense_controller.py,sha256=_wFlwKZfGMuZZsyH--5l31K1uUbftlm-Q9SDKRh0rW8,3453
5
+ pygameControls/dualsense_edge_controller.py,sha256=mQDnfk_w-8ZLd_0vADXWYbPCwBQRqNmk1PlWJoc3XDA,3285
6
6
  pygameControls/generic_controller.py,sha256=cLcTPq6ghx-GQffdyV4vr-dox-eh12lZ4mD0yyWgy8I,2078
7
7
  pygameControls/logitech_dual_action_controller.py,sha256=DrkAJrf8QvJlzJSdjes1kwRRjMV87BGyRvv4d9QIH44,2650
8
8
  pygameControls/logitech_f310_controller.py,sha256=h4ma-ewZfg2w4sKQbrnkMU1IDIWbJOU90sWtpWQcCzE,2639
9
9
  pygameControls/logitech_f510_controller.py,sha256=Wq8lpYa4yVNwLg72pESa2EszIrCaYFhc6x3JkenZ__8,3275
10
10
  pygameControls/logitech_f710_controller.py,sha256=Se_0LfcTunzsix0sSx7kNqnuKL5hzybRrnJC3j9LLaw,3275
11
11
  pygameControls/xbox_series_x_controller.py,sha256=bmlvLtblO5EQBOCrFZ6QlEqK4Pp4WhsEZrpn7A9d9PM,2075
12
- pygamecontrols-0.1.1.dist-info/licenses/LICENSE,sha256=KQMYrAM921Oeawv1XkqKG3PxDJy9v7wuu1vhr63d2CY,1070
13
- pygamecontrols-0.1.1.dist-info/METADATA,sha256=DCEYnqd3D_Zh2U5RIkyRdA8NvPZG32GX5m64vHsWoIE,617
14
- pygamecontrols-0.1.1.dist-info/WHEEL,sha256=lTU6B6eIfYoiQJTZNc-fyaR6BpL6ehTzU3xGYxn2n8k,91
15
- pygamecontrols-0.1.1.dist-info/top_level.txt,sha256=Tg86INulVO2XDGUPiQCC68Zsl36kBlr0My-Bn-q04V8,15
16
- pygamecontrols-0.1.1.dist-info/RECORD,,
12
+ pygamecontrols-0.1.2.dist-info/licenses/LICENSE,sha256=KQMYrAM921Oeawv1XkqKG3PxDJy9v7wuu1vhr63d2CY,1070
13
+ pygamecontrols-0.1.2.dist-info/METADATA,sha256=Qw1VkHV15o3VyVBsYSewya0GgiKK-str4g0f1Im8lbE,617
14
+ pygamecontrols-0.1.2.dist-info/WHEEL,sha256=pxyMxgL8-pra_rKaQ4drOZAegBVuX-G_4nRHjjgWbmo,91
15
+ pygamecontrols-0.1.2.dist-info/top_level.txt,sha256=Tg86INulVO2XDGUPiQCC68Zsl36kBlr0My-Bn-q04V8,15
16
+ pygamecontrols-0.1.2.dist-info/RECORD,,
@@ -1,5 +1,5 @@
1
1
  Wheel-Version: 1.0
2
- Generator: setuptools (78.1.1)
2
+ Generator: setuptools (79.0.0)
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any
5
5