Updated dualsense. /JL

This commit is contained in:
2025-04-20 09:19:45 +02:00
parent 436d77109a
commit 1d65c88a7b
4 changed files with 14 additions and 2 deletions

View File

@@ -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],