autocommit
This commit is contained in:
@@ -67,9 +67,13 @@ async def collect_flight_stats(state):
|
||||
else:
|
||||
if counter % 10 == 0:
|
||||
logger.warning("missing connection, pinging tello")
|
||||
response = await asyncio.to_thread(tello.send_command_with_return, "command", 3)
|
||||
#bat = await asyncio.to_thread(tello.get_battery)
|
||||
logger.info(f"\n\nDEBUG RESPONSE: \n** -> {response}")
|
||||
resp_cmd = await asyncio.to_thread(tello.send_command_with_return, "command", 3)
|
||||
if "Aborting command" in resp_cmd:
|
||||
logger.warning("no tello responded")
|
||||
else:
|
||||
bat = await asyncio.to_thread(tello.get_battery)
|
||||
logger.success(f"tello exists: {bat}")
|
||||
|
||||
counter += 1
|
||||
await asyncio.sleep(1.001)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user