mirror of
https://github.com/DanielPollithy/bluetooth_drone.git
synced 2025-10-16 11:45:38 +00:00
resetup raspy
This commit is contained in:
parent
fc5f3e4458
commit
b38f87184e
1
drone.py
1
drone.py
@ -7,6 +7,7 @@ def run():
|
||||
p = Process(target=drone_poller.run)
|
||||
p.start()
|
||||
client.run()
|
||||
p.join()
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
|
||||
@ -59,24 +59,20 @@ def poll_website():
|
||||
def run():
|
||||
while True:
|
||||
try:
|
||||
try:
|
||||
# send my own data
|
||||
notify_website()
|
||||
except:
|
||||
print('[x] Could not notify the website')
|
||||
print("Unexpected error:", sys.exc_info()[0])
|
||||
# send my own data
|
||||
notify_website()
|
||||
except:
|
||||
print('[x] Could not notify the website')
|
||||
print("Unexpected error:", sys.exc_info()[0])
|
||||
|
||||
try:
|
||||
# receive new bookings
|
||||
poll_website()
|
||||
except :
|
||||
print('[x] Could not fetch bookings from the website')
|
||||
print("Unexpected error:", sys.exc_info()[0])
|
||||
try:
|
||||
# receive new bookings
|
||||
poll_website()
|
||||
except :
|
||||
print('[x] Could not fetch bookings from the website')
|
||||
print("Unexpected error:", sys.exc_info()[0])
|
||||
|
||||
time.sleep(settings.WEBSITE_POLLING_SLEEP)
|
||||
except KeyboardInterrupt:
|
||||
print('Program execution stopped by user')
|
||||
exit()
|
||||
time.sleep(settings.WEBSITE_POLLING_SLEEP)
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
|
||||
Loading…
Reference in New Issue
Block a user