Fixed a bug to allow rumble values 255. /JL #12
@@ -9,7 +9,7 @@ from .xbox_series_x_controller import XboxSeriesXController
|
||||
from .generic_controller import GenericController
|
||||
from .logitech_dual_action_controller import LogitechDualActionController
|
||||
|
||||
__version__ = "0.1.2"
|
||||
__version__ = "0.1.3"
|
||||
|
||||
CONTROLLERS = {
|
||||
"DualSense Wireless Controller": DualSenseController,
|
||||
|
@@ -77,7 +77,7 @@ class DualSenseController(ControlsBase):
|
||||
pass
|
||||
|
||||
def rumble(self, left, right):
|
||||
if not left in range(255) or not right in range(255):
|
||||
if not left in range(256) or not right in range(256):
|
||||
raise ValueError("left and right values must be in the range 0 - 255")
|
||||
self.device.setLeftMotor(left)
|
||||
self.device.setRightMotor(right)
|
||||
|
@@ -69,7 +69,7 @@ class DualSenseEdgeController(ControlsBase):
|
||||
pass
|
||||
|
||||
def rumble(self, left, right):
|
||||
if not left in range(255) or not right in range(255):
|
||||
if not left in range(256) or not right in range(256):
|
||||
raise ValueError("left and right values must be in the range 0 - 255")
|
||||
self.device.setLeftMotor(left)
|
||||
self.device.setRightMotor(right)
|
||||
|
Reference in New Issue
Block a user