diff options
| author | s-ol <s+removethis@s-ol.nu> | 2024-11-26 22:56:24 +0000 |
|---|---|---|
| committer | s-ol <s+removethis@s-ol.nu> | 2024-11-26 23:09:32 +0000 |
| commit | 19033d220f23a645694923ba526b66a7429c4dec (patch) | |
| tree | 33c9f379c023f21e8ab6ced06cc67445ffd7f5c6 /hex33board/__init__.py | |
| parent | update for colorsys 3.0.0 (diff) | |
| download | firmware-main.tar.gz firmware-main.zip | |
Diffstat (limited to 'hex33board/__init__.py')
| -rw-r--r-- | hex33board/__init__.py | 14 |
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()) |
