From dd2c21c43b547b3bd0653b5a2f458fb0844db827 Mon Sep 17 00:00:00 2001 From: mss Date: Mon, 26 Oct 2026 16:37:11 +0400 Subject: [PATCH] =?UTF-8?q?ai:=20circuitpython=20=E2=80=94=20=D1=83=D0=B1?= =?UTF-8?q?=D1=80=D0=B0=D0=BD=D1=8B=20keyword-=D0=B0=D1=80=D0=B3=D1=83?= =?UTF-8?q?=D0=BC=D0=B5=D0=BD=D1=82=D1=8B=20(split(maxsplit),=20dict.updat?= =?UTF-8?q?e(**)):=20CircuitPython=20=D0=B8=D1=85=20=D0=BD=D0=B5=20=D0=BF?= =?UTF-8?q?=D1=80=D0=B8=D0=BD=D0=B8=D0=BC=D0=B0=D0=B5=D1=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- stub/01-dds-generator-rp2040-circuitpython.py | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/stub/01-dds-generator-rp2040-circuitpython.py b/stub/01-dds-generator-rp2040-circuitpython.py index 2083556..deb8ce5 100644 --- a/stub/01-dds-generator-rp2040-circuitpython.py +++ b/stub/01-dds-generator-rp2040-circuitpython.py @@ -194,8 +194,13 @@ def cmd_sweep_parts(a): n = max(2, int(parts[2])) dwell = max(0.01, int(parts[3]) / 1000.0) ratio = (f1 / f0) ** (1.0 / (n - 1)) - state.update(sweep=True, sweep_f0=f0, sweep_ratio=ratio, - sweep_idx=0, sweep_n=n, sweep_dwell=dwell, sweep_t0=0.0) + state["sweep"] = True + state["sweep_f0"] = f0 + state["sweep_ratio"] = ratio + state["sweep_idx"] = 0 + state["sweep_n"] = n + state["sweep_dwell"] = dwell + state["sweep_t0"] = 0.0 cmd_f(str(int(round(f0)))) print("OK SWEEP") @@ -211,7 +216,7 @@ def handle(line, phase): line = line.strip() if not line: return False, phase - parts = line.split(maxsplit=1) + parts = line.split(None, 1) # позиционно: sep=None, maxsplit=1 (в CP нет kwargs!) cmd = parts[0].upper() a = parts[1] if len(parts) > 1 else "" if cmd == "F":