ai: circuitpython — убраны keyword-аргументы (split(maxsplit), dict.update(**)): CircuitPython их не принимает

This commit is contained in:
mss
2026-10-26 16:37:11 +04:00
parent f1db2eb6c1
commit dd2c21c43b
@@ -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":