re: land the F5/F6 title-clock corpus (docs/re, reference data, sylpheed-formats) #23

Merged
fabi merged 511 commits from auto/frame-blend-draw-path into main 2026-09-13 11:16:19 +00:00
Showing only changes of commit 97b0362bbd - Show all commits

View File

@@ -84,15 +84,33 @@ try: print("%.1f" % ring_row.ring_row(Image.open("/tmp/mbc_row.png")))
except Exception: print("nan")
PY
}
# 🔴 The first version of this loop broke on its FIRST comparison -- one DOWN
# was dropped, the row read the same twice, it concluded "the cursor has
# stopped" and pressed (A) on NEW GAME. A stop test that cannot tell "at the
# end" from "the press was lost" is the counting bug wearing a different hat.
# So: a non-move only ends the walk AFTER at least one move has been seen, a
# run of dropped presses aborts instead of pressing (A), and (A) is pressed
# only if the cursor demonstrably moved.
prev="$(row)"; echo " cursor row $prev"
for _ in 1 2 3 4 5 6 7 8; do
python3 "$SD/pad.py" tap DOWN 0.2; sleep 2
moved=0; stalls=0
for _ in 1 2 3 4 5 6 7 8 9 10; do
python3 "$SD/pad.py" tap DOWN 0.2; sleep 3
cur="$(row)"; echo " cursor row $cur"
[ "$cur" = "$prev" ] && break
prev="$cur"
if [ "$cur" = "$prev" ]; then
if [ "$moved" = 1 ]; then echo " cursor stopped -- at the last item"; break; fi
stalls=$((stalls+1))
[ "$stalls" -ge 4 ] && { echo "NO CURSOR MOVEMENT after 4 presses -- not pressing (A)"; exit 3; }
else
moved=1; stalls=0; prev="$cur"
fi
done
[ "$moved" = 1 ] || { echo "CURSOR NEVER MOVED -- not pressing (A)"; exit 3; }
python3 "$SD/pad.py" tap A 0.3; sleep 5
s="$(screen)"; echo " after EXTRAS attempt: $s"; shot "$OUT/extras.png"
# The blend map needs to know WHICH screen it is looking at, and screen_id
# calls both of these "menu". Ⓑ is advertised on EXTRAS and not on the main
# menu, so the footer is the discriminator a human would use; here the element
# count in the capture is checked instead, after the fact.
fi
# 3. arm, then dismiss the menu bar F10 opened