aboutsummaryrefslogtreecommitdiffstats
path: root/hex33board/__init__.py
diff options
context:
space:
mode:
Diffstat (limited to 'hex33board/__init__.py')
-rw-r--r--hex33board/__init__.py14
1 files changed, 6 insertions, 8 deletions
diff --git a/hex33board/__init__.py b/hex33board/__init__.py
index 3448d4d..a33ad92 100644
--- a/hex33board/__init__.py
+++ b/hex33board/__init__.py
@@ -111,12 +111,8 @@ class Keyboard:
"i2c_addr": SliderSetting(
"I2C ADDRESS", 127, default=0x33, fmt="0x{0:02x} ({0:d})"
),
- "i2c_xo": SliderSetting(
- "I2C X OFFSET", 12 * 6, default=0
- ),
- "i2c_yo": SliderSetting(
- "I2C Y OFFSET", 16, default=0
- ),
+ "i2c_xo": SliderSetting("I2C X OFFSET", 12 * 6, default=0),
+ "i2c_yo": SliderSetting("I2C Y OFFSET", 16, default=0),
# SYNTH
"synth_vol": SliderSetting(
"SYNTH VOLUME",
@@ -320,9 +316,11 @@ class Keyboard:
self.on_layout(None, None)
-
def on_change(self, id, val, last):
- if not (id.startswith('rgb') or id.startswith('layout') or id.startswith('scale')): return
+ if not (
+ id.startswith("rgb") or id.startswith("layout") or id.startswith("scale")
+ ):
+ return
if isinstance(self.i2c, I2CLeader):
self.i2c.broadcast_chunked("S", json.dumps({id: val}).encode())