mirror of
https://github.com/DanielPollithy/bluetooth_drone.git
synced 2025-10-16 11:45:38 +00:00
fixed fuck up
This commit is contained in:
parent
e0f2ced265
commit
be710d57ef
23
client.py
23
client.py
@ -30,14 +30,15 @@ def send_payload(address):
|
||||
sock.close()
|
||||
|
||||
|
||||
# while True:
|
||||
# nearby_devices = bluetooth.discover_devices(lookup_names=True)
|
||||
# print("found %d devices" % len(nearby_devices))
|
||||
#
|
||||
# for addr, name in nearby_devices:
|
||||
# print(" %s - %s" % (addr, name))
|
||||
# if addr == settings.PEER_BT_ADDRESS:
|
||||
# print("PEERING PARTNER FOUND")
|
||||
# send_payload(addr)
|
||||
#
|
||||
# time.sleep(settings.BT_SLEEP)
|
||||
if __name__ == '__main__':
|
||||
while True:
|
||||
nearby_devices = bluetooth.discover_devices(lookup_names=True)
|
||||
print("found %d devices" % len(nearby_devices))
|
||||
|
||||
for addr, name in nearby_devices:
|
||||
print(" %s - %s" % (addr, name))
|
||||
if addr == settings.PEER_BT_ADDRESS:
|
||||
print("PEERING PARTNER FOUND")
|
||||
send_payload(addr)
|
||||
|
||||
time.sleep(settings.BT_SLEEP)
|
||||
Loading…
Reference in New Issue
Block a user