forked from mirror/joycontrol
Merge remote-tracking branch 'origin/fix_device_class'
# Conflicts: # joycontrol/server.py
This commit is contained in:
@@ -77,9 +77,8 @@ async def create_hid_server(protocol_factory, ctl_psm=17, itr_psm=19, device_id=
|
|||||||
hid.powered(True)
|
hid.powered(True)
|
||||||
hid.pairable(True)
|
hid.pairable(True)
|
||||||
|
|
||||||
# setting bluetooth adapter name and class to the device we wish to emulate
|
# setting bluetooth adapter name to the device we wish to emulate
|
||||||
await hid.set_name(protocol.controller.device_name())
|
await hid.set_name(protocol.controller.device_name())
|
||||||
await hid.set_class()
|
|
||||||
|
|
||||||
logger.info('Advertising the Bluetooth SDP record...')
|
logger.info('Advertising the Bluetooth SDP record...')
|
||||||
try:
|
try:
|
||||||
@@ -88,6 +87,9 @@ async def create_hid_server(protocol_factory, ctl_psm=17, itr_psm=19, device_id=
|
|||||||
# Already registered (If multiple controllers are being emulated and this method is called consecutive times)
|
# Already registered (If multiple controllers are being emulated and this method is called consecutive times)
|
||||||
logger.debug(dbus_err)
|
logger.debug(dbus_err)
|
||||||
|
|
||||||
|
# set the device class to "Gamepad/joystick"
|
||||||
|
await hid.set_class()
|
||||||
|
|
||||||
# start advertising
|
# start advertising
|
||||||
hid.discoverable()
|
hid.discoverable()
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user