idempotence zapisu 178 a 179 grid peak shaveing a grid cuttoff
Some checks failed
CI and deploy / migration-check (push) Failing after 10s
CI and deploy / deploy (push) Has been skipped

This commit is contained in:
Dusan Vojacek
2026-04-20 11:41:57 +02:00
parent a07f5d57cb
commit 6cf14ed25b
3 changed files with 59 additions and 5 deletions

View File

@@ -332,9 +332,18 @@ def _drop_registers_matching_last_verified(
skipped: list[int] = []
for reg, meta, val in registers:
lv = last_verified.get(int(reg))
if lv is not None and lv == int(val):
skipped.append(int(reg))
continue
if lv is not None:
# reg178: porovnáváme jen masku bitů 45 (Deye si v dalších bitech drží vlastní stav).
if int(reg) == 178 and _deye_reg178_verify_match(int(val), int(lv)):
skipped.append(int(reg))
continue
# reg179: porovnáváme jen bits01 maskou 0x0003 (masked RMW zachovává ostatní bity).
if int(reg) == 179 and _deye_reg179_verify_match(int(val), int(lv)):
skipped.append(int(reg))
continue
if int(lv) == int(val):
skipped.append(int(reg))
continue
out.append((reg, meta, val))
return out, skipped