Миграция к асинку
This commit is contained in:
18
main.py
18
main.py
@@ -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))
|
||||
Reference in New Issue
Block a user