ble - add adapter
This commit is contained in:
1 parent
73f089278c
commit
38ee150ea3
2 files changed
+6
-5
No files matched your search
+4
-4
@@ -392,11 +392,11 @@ def get_usb_id():
|
|||||||
# first let's see if it's already in the list
|
# first let's see if it's already in the list
|
||||||
for usb_id in present_usb_id_output:
|
for usb_id in present_usb_id_output:
|
||||||
if usb_id in bt_usb_ids:
|
if usb_id in bt_usb_ids:
|
||||||
current_usb_id = usb_id
|
result = usb_id
|
||||||
# if it's not in the list, guess
|
# if it's not in the list, guess
|
||||||
if len(current_usb_id) == 0:
|
if len(result) == 0:
|
||||||
current_usb_id = usb_id_guess()
|
result = usb_id_guess()
|
||||||
return current_usb_id
|
return result
|
||||||
|
|
||||||
# this will guess the USB ID if it's not found in the list
|
# this will guess the USB ID if it's not found in the list
|
||||||
def usb_id_guess():
|
def usb_id_guess():
|
||||||
|
|||||||
+2
-1
@@ -8,7 +8,8 @@ api_port = 5001
|
|||||||
redis_port = 6379
|
redis_port = 6379
|
||||||
enable_redis = True
|
enable_redis = True
|
||||||
bt_usb_ids = [
|
bt_usb_ids = [
|
||||||
"0bda:c821"
|
"0bda:c821",
|
||||||
|
"2357:0604"
|
||||||
]
|
]
|
||||||
|
|
||||||
# test settings
|
# test settings
|
||||||
|
|||||||
Reference in new issue
Block a user