update 更新Demo

This commit is contained in:
FrankCV2048
2024-08-26 22:42:27 +08:00
parent 7dc66871ee
commit 173ae711b4
9 changed files with 200 additions and 84 deletions

35
test.py
View File

@ -1,35 +0,0 @@
import asyncio
async def send_update_command():
while True:
command = "update_position_command\n"
print('command')
await asyncio.sleep(2)
#await writer.drain()
await asyncio.sleep(1)
async def query_robot_status():
while True:
command = "query_status_command\n"
print('status')
await asyncio.sleep(1)
# await writer.drain()
#feedback = await reader.read(1024)
#if feedback:
# print("Received feedback:", feedback.decode())
await asyncio.sleep(2)
async def main():
#reader, writer = await asyncio.open_connection('f', 'f')
await asyncio.gather(
send_update_command(),
query_robot_status()
)
print('UI')
asyncio.run(main())