up
This commit is contained in:
parent
6cae2cd9af
commit
8f468ff531
7
main.py
7
main.py
@ -78,9 +78,9 @@ log_level = logging.DEBUG
|
||||
#log_level = logging.ERROR
|
||||
logging.basicConfig(level=log_level, format='%(name)s - %(levelname)s - %(message)s')
|
||||
logger = logging.getLogger(__name__)
|
||||
#PYTHONASYNCIODEBUG=1
|
||||
|
||||
### alive check ###
|
||||
|
||||
### Alive check ###
|
||||
async def alive_check():
|
||||
# loop for checked is alive
|
||||
logger.debug("alive check start")
|
||||
@ -89,7 +89,6 @@ async def alive_check():
|
||||
|
||||
while True:
|
||||
logger.debug(f"running ms: {time.ticks_ms() - init_ticks}")
|
||||
#print(f"main while running ms: {time.ticks_ms() - init_ticks}")
|
||||
onboar_led.on()
|
||||
await asyncio.sleep_ms(100)
|
||||
onboar_led.off()
|
||||
@ -111,8 +110,6 @@ async def olt_command(cmd, btn, rgb, ir_tx, tx1, tx2, tx3):
|
||||
# IR TX send
|
||||
logger.debug("Command {cmd} IR TX transmit")
|
||||
asyncio.create_task(ir_tx.transmit(tx1, tx2, tx3, False))
|
||||
#loop = asyncio.get_running_loop()
|
||||
#loop.set_exception_handler(exception_handler)
|
||||
await asyncio.sleep_ms(50)
|
||||
await btn.release.wait()
|
||||
logger.debug("Command {cmd} button released")
|
||||
|
Loading…
Reference in New Issue
Block a user