Add state for microphone button

This commit is contained in:
Florian Kaiser
2021-03-07 21:40:55 +01:00
parent b3ff9fd375
commit f5529f1463
2 changed files with 4 additions and 3 deletions

View File

@@ -185,6 +185,7 @@ class pydualsense:
misc2 = states[10]
self.state.ps = (misc2 & (1 << 0)) != 0
self.state.touchBtn = (misc2 & 0x02) != 0
self.state.micBtn = (misc2 & 0x04) != 0
# trackpad touch
@@ -262,7 +263,7 @@ class pydualsense:
# set Micrphone LED, setting doesnt effect microphone settings
outReport[9] = self.audio.microphone_led # [9]
outReport[10] = 0x10 if self.audio.microphone_state == True else 0x00
outReport[10] = 0x10 if self.audio.microphone_mute == True else 0x00
# add right trigger mode + parameters to packet
outReport[11] = self.triggerR.mode.value
@@ -500,7 +501,7 @@ class DSAudio:
raise TypeError('state needs to be bool')
self.setMicrophoneLED(state) # set led accordingly
self.microphone_state = state
self.microphone_mute = state
class DSTrigger:

View File

@@ -6,7 +6,7 @@ with open("README.md", "r") as fh:
setup(
name='pydualsense',
version='0.5.2',
version='0.5.2.5',
description='use your DualSense (PS5) controller with python',
long_description=long_description,
long_description_content_type="text/markdown",