Add state for microphone button
This commit is contained in:
@@ -185,6 +185,7 @@ class pydualsense:
|
|||||||
misc2 = states[10]
|
misc2 = states[10]
|
||||||
self.state.ps = (misc2 & (1 << 0)) != 0
|
self.state.ps = (misc2 & (1 << 0)) != 0
|
||||||
self.state.touchBtn = (misc2 & 0x02) != 0
|
self.state.touchBtn = (misc2 & 0x02) != 0
|
||||||
|
self.state.micBtn = (misc2 & 0x04) != 0
|
||||||
|
|
||||||
|
|
||||||
# trackpad touch
|
# trackpad touch
|
||||||
@@ -262,7 +263,7 @@ class pydualsense:
|
|||||||
# set Micrphone LED, setting doesnt effect microphone settings
|
# set Micrphone LED, setting doesnt effect microphone settings
|
||||||
outReport[9] = self.audio.microphone_led # [9]
|
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
|
# add right trigger mode + parameters to packet
|
||||||
outReport[11] = self.triggerR.mode.value
|
outReport[11] = self.triggerR.mode.value
|
||||||
@@ -500,7 +501,7 @@ class DSAudio:
|
|||||||
raise TypeError('state needs to be bool')
|
raise TypeError('state needs to be bool')
|
||||||
|
|
||||||
self.setMicrophoneLED(state) # set led accordingly
|
self.setMicrophoneLED(state) # set led accordingly
|
||||||
self.microphone_state = state
|
self.microphone_mute = state
|
||||||
|
|
||||||
|
|
||||||
class DSTrigger:
|
class DSTrigger:
|
||||||
|
2
setup.py
2
setup.py
@@ -6,7 +6,7 @@ with open("README.md", "r") as fh:
|
|||||||
|
|
||||||
setup(
|
setup(
|
||||||
name='pydualsense',
|
name='pydualsense',
|
||||||
version='0.5.2',
|
version='0.5.2.5',
|
||||||
description='use your DualSense (PS5) controller with python',
|
description='use your DualSense (PS5) controller with python',
|
||||||
long_description=long_description,
|
long_description=long_description,
|
||||||
long_description_content_type="text/markdown",
|
long_description_content_type="text/markdown",
|
||||||
|
Reference in New Issue
Block a user