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