diff --git a/pygameControls/controller.py b/pygameControls/controller.py index 6f70e7f..5731c1a 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.7" CONTROLLERS = { "DualSense Wireless Controller": DualSenseController, diff --git a/pygameControls/dualsense_controller.py b/pygameControls/dualsense_controller.py index 8a212f1..dbb32e7 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 = joy.get_numaxes() + self.axis: list = [joy.get_axis(a) for a in range(self.numaxis)] + self.numhats: int = joy.get_numhats() + self.hats: list = [joy.get_hat(h) for h in range(self.numhats)] + self.numbuttons: int = joy.get_numbuttons() + self.buttons: list = [joy.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..2a3370f 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 = joy.get_numaxes() + self.axis: list = [joy.get_axis(a) for a in range(self.numaxis)] + self.numhats: int = joy.get_numhats() + self.hats: list = [joy.get_hat(h) for h in range(self.numhats)] + self.numbuttons: int = joy.get_numbuttons() + self.buttons: list = [joy.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..9d69720 100644 --- a/setup.py +++ b/setup.py @@ -3,7 +3,7 @@ if __name__ == "__main__": setup( name='pygameControls', - version='0.0.5', + version='0.0.7', packages=find_packages(), install_requires=[], author='Jan Lerking',