Compare commits

..

No commits in common. "cdf8686a79129158734f20d208f8c45466e16e07" and "60d8702359cc3c875a6ed83b39fda7d195ff09d4" have entirely different histories.

View file

@ -83,7 +83,7 @@ class State:
return None
async def handle_key(self, key_num: int, state: bool) -> str | None:
log.debug(f"key:{key_num}, state:{state}")
print(f"key:{key_num}, state:{state}")
if state is True:
msg = {
"apiVersion": "1.0.0",
@ -213,7 +213,7 @@ class TeamsCtrl:
if key_num > 4 or key_num < 0:
raise IndexError("invalid key number: {key_num}")
cmd = f"{key_num:01}{color[0]:02x}{color[1]:02x}{color[2]:02x}\n"
log.debug(f"set color:{cmd.strip()}")
print(cmd)
self.serial_writer.write(cmd.encode("utf-8"))
async def process_serial(self) -> None:
@ -313,11 +313,6 @@ if __name__ == "__main__":
)
args = parser.parse_args()
logging.basicConfig(level=args.log)
if args.log == "DEBUG":
logging.getLogger("asyncio").setLevel(logging.INFO)
logging.getLogger("websockets.client").setLevel(logging.INFO)
with open(args.token) as tf:
token = tf.read().strip()