Миграция к асинку

This commit is contained in:
2026-01-22 00:37:52 +09:00
parent 19871d1234
commit 25e04889c2
2 changed files with 76 additions and 28 deletions

18
main.py
View File

@@ -3,6 +3,8 @@ import logging
import configparser
import serial
import socket
import asyncio
import time
if __name__ == "__main__":
#consts&confs
@@ -29,9 +31,19 @@ if __name__ == "__main__":
zxc.set_controller_number(1)
zxc.set_port_device()
zxc.set_controller_capacity(18)
# добавь *aargs
#print(zxc.READ_ALL_CELLS())
print(zxc.OPEN_ALL_CELLS_LEGACY(True))
#print(zxc.OPEN_ALL_CELLS_LEGACY(True))
# print(zxc.read_controller(1))
# print(zxc.send_command(1, 17))
# print(zxc.read_controller(1))
# print(zxc.read_controller(1))
async def main(zxc):
print(await zxc.send_command(1, 17))
exit()
while True:
asyncio.run(main(zxc))