From a4a00021d8fcc86fbeb17f0c6688227afe13f482 Mon Sep 17 00:00:00 2001 From: jimmy Date: Fri, 19 Sep 2025 00:07:37 +1200 Subject: [PATCH] Fix missing n3 attribute and async function issue - Add missing self.n3 = 1 attribute to MidiHandler initialization - Fix update_rgb async function to properly yield control with await asyncio.sleep(0) - Resolves TypeError about expecting coroutine but getting None - Application now working properly with buttons and dials functional --- src/main.py | 2 +- src/midi.py | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/main.py b/src/main.py index 03e01e8..10f9900 100644 --- a/src/main.py +++ b/src/main.py @@ -204,7 +204,7 @@ class App: # --- Asynchronous Update Functions --- @async_handler async def update_rgb(self, tab): - pass + await asyncio.sleep(0) # Yield control def update_status_labels(self): # Pull values from midi_handler diff --git a/src/midi.py b/src/midi.py index 6d3d62b..09fd9bc 100644 --- a/src/midi.py +++ b/src/midi.py @@ -54,6 +54,7 @@ class MidiHandler: # Raw CC-driven parameters (0-127) self.n1 = 10 self.n2 = 10 + self.n3 = 1 # Additional knobs (CC38-45) self.knob1 = 0 self.knob2 = 0