diff --git a/pygameControls/controller.py b/pygameControls/controller.py index 6f70e7f..906e4bf 100644 --- a/pygameControls/controller.py +++ b/pygameControls/controller.py @@ -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.0.4" +__version__ = "0.0.6" CONTROLLERS = { "DualSense Wireless Controller": DualSenseController, diff --git a/pygameControls/dualsense_controller.py b/pygameControls/dualsense_controller.py index 8a212f1..957e8df 100644 --- a/pygameControls/dualsense_controller.py +++ b/pygameControls/dualsense_controller.py @@ -18,6 +18,12 @@ class DualSenseController(ControlsBase): self.powerlevel = self.device.battery.Level self.batterystate = BATTERY_STATE[str(self.device.battery.State)] self.set_player_id(PlayerID.PLAYER_1) + self.numaxis: int = self.device.get_numaxes() + self.axis: list = [self.device.get_axis(a) for a in range(self.numaxis)] + self.numhats: int = self.device.get_numhats() + self.hats: list = [self.device.get_hat(h) for h in range(self.numhats)] + self.numbuttons: int = self.device.get_numbuttons() + self.buttons: list = [self.device.get_button(b) for b in range(self.numbuttons)] self.mapping = { "left stick x": self.axis[0], "left stick y": self.axis[1], diff --git a/pygameControls/dualsense_edge_controller.py b/pygameControls/dualsense_edge_controller.py index ecfb82d..b067b56 100644 --- a/pygameControls/dualsense_edge_controller.py +++ b/pygameControls/dualsense_edge_controller.py @@ -10,6 +10,12 @@ class DualSenseEdgeController(ControlsBase): self.powerlevel = self.device.battery.Level self.batterystate = BATTERY_STATE[str(self.device.battery.State)] self.set_player_id(PlayerID.PLAYER_1) + self.numaxis: int = self.device.get_numaxes() + self.axis: list = [self.device.get_axis(a) for a in range(self.numaxis)] + self.numhats: int = self.device.get_numhats() + self.hats: list = [self.device.get_hat(h) for h in range(self.numhats)] + self.numbuttons: int = self.device.get_numbuttons() + self.buttons: list = [self.device.get_button(b) for b in range(self.numbuttons)] self.mapping = { "left stick x": self.axis[0], "left stick y": self.axis[1], diff --git a/setup.py b/setup.py index a928b57..b4fbdae 100644 --- a/setup.py +++ b/setup.py @@ -3,7 +3,7 @@ if __name__ == "__main__": setup( name='pygameControls', - version='0.0.5', + version='0.0.6', packages=find_packages(), install_requires=[], author='Jan Lerking',