End the autorepeat table with a never-run step so the filter stores no count

This commit is contained in:
J. Nick Koston
2026-10-02 20:59:52 -05:00
parent eae1b99232
commit bf5d095cf6
4 changed files with 20 additions and 14 deletions
@@ -16,9 +16,11 @@ def test_autorepeat_timings_shared_progmem_table(
)
assert len(tables) == 2
shared, default = tables
assert main_cpp.count(f"AutorepeatFilter({shared}, 2);") == 2
assert f"AutorepeatFilter({default}, 1);" in main_cpp
assert main_cpp.count(f"AutorepeatFilter({shared});") == 2
assert f"AutorepeatFilter({default});" in main_cpp
assert "binary_sensor_autorepeat_timings" not in tables
default_table = main_cpp.split(f"{default}[] PROGMEM = ", 1)[1].split(";", 1)[0]
for field in (".delay = 1000", ".time_off = 100", ".time_on = 900"):
assert field in default_table
# Each table ends with a never-run delay instead of the filter storing a count.
assert main_cpp.count(".delay = SCHEDULER_DONT_RUN") == len(tables)