aboutsummaryrefslogtreecommitdiff
path: root/serial_conn.py
diff options
context:
space:
mode:
authorSébastien Dailly <sebastien@dailly.me>2026-10-16 14:05:33 +0200
committerSébastien Dailly <sebastien@dailly.me>2026-10-16 14:05:33 +0200
commitbcde30ff9e322278ebeb316bfa34af0328680bcf (patch)
treee5b3192461f64fb998173feaf2511f3ae0c37fb0 /serial_conn.py
parentf421547316803b545c678a8610954b1b14339b9d (diff)
pylint review + ergol key mappingmain
Diffstat (limited to 'serial_conn.py')
-rw-r--r--serial_conn.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/serial_conn.py b/serial_conn.py
index a781d64..7645563 100644
--- a/serial_conn.py
+++ b/serial_conn.py
@@ -4,6 +4,7 @@ import time
from kmk.modules import Module
from usb_cdc import data
+
class Client(Module):
""" Listen the connections from host, and apply the actions depending of
the json command.
@@ -31,13 +32,12 @@ class Client(Module):
if current_name != "Disconnected":
self.last_name = current_name
keyboard.keymap[0].name = "Disconnected"
- time.sleep(1)
+ # time.sleep(1)
return
if self.last_name is not None:
keyboard.keymap[0].name = self.last_name
self.last_name = None
-
# Nothing to parse.
if data.in_waiting <= 0:
return
@@ -53,7 +53,7 @@ class Client(Module):
jdata = json.loads(content)
except ValueError as err:
# In circuitPython, json error are reported as ValueError.
- # seet https://docs.circuitpython.org/en/latest/docs/library/json.html#json.load
+ # see https://docs.circuitpython.org/en/latest/docs/library/json.html#json.load
print(err, line)
return
@@ -61,7 +61,7 @@ class Client(Module):
# direct raw layer instruction if this does not work.
actions = {
- "layer" : lambda x : keyboard.keymap[0].load(x),
+ "layer": lambda x: keyboard.keymap[0].load(x),
}
try: