fix idempotency gne port uctoff
Some checks failed
CI and deploy / migration-check (push) Failing after 19s
CI and deploy / deploy (push) Has been skipped

This commit is contained in:
Dusan Vojacek
2026-04-29 13:09:43 +02:00
parent 5593397fd3
commit 89fb4f1924
3 changed files with 22 additions and 6 deletions

View File

@@ -340,8 +340,14 @@ def _drop_registers_matching_last_verified(
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
# GEN cutoff (BA81): chceme na zařízení dostat "clean" hodnotu 2/3.
# Pokud minulý verified stav obsahuje jiné bity (např. 0xFFFE/0xFFFF),
# maska sice sedí, ale firmware/UI nemusí cutoff aplikovat správně.
# Proto reg179 skipneme jen tehdy, když je poslední verified hodnota už
# skutečně 2 nebo 3 (tj. clean value), ne jen maskově ekvivalentní.
if int(lv) in (REG179_MI_EXPORT_DISABLE, REG179_MI_EXPORT_ENABLE):
skipped.append(int(reg))
continue
if int(lv) == int(val):
skipped.append(int(reg))
continue