qemu: scroll and home verbs in the driver
scroll X Y DY and home are judged by the channel's own ack, like nav and wake: the deterministic stand-in for a swipe that only brings a control into view (flare-edge #174), and the fresh-boot state a live panel needs before each flow (flare-edge #173). Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01N3G6m9Aw5RyVY4ZowtKzEj
This commit is contained in:
@@ -26,6 +26,12 @@ warden_debug.c. The same channel is what tools/warden-ctl reaches over SSH on
|
||||
a real panel, so these verbs mean the same thing on the rig and on hardware:
|
||||
|
||||
nav MENU[/TAB] jump to a page; fails if the page is unknown
|
||||
scroll X Y DY scroll the scrollable under pixel X,Y by DY
|
||||
pixels (positive reveals content below), no
|
||||
animation: the deterministic stand-in for a
|
||||
swipe that only brings a control into view
|
||||
home close every popup and go to Dashboard/Dashboard,
|
||||
the state a fresh boot starts in
|
||||
wake wake the UI as if touched, minus the swallow
|
||||
(sleep.c dims and then blanks an idle panel and
|
||||
eats the touch that ends either); every compiled
|
||||
@@ -538,6 +544,16 @@ def drive(s, f, script_path, outdir, size, ctl_path=None, console_path=None, ref
|
||||
need_ctl(lineno, cmd)
|
||||
reply = ctl.send("wake")
|
||||
record(lineno, line, "ok" if reply == "wake: ok" else "fail", reply)
|
||||
elif cmd in ("scroll", "home"):
|
||||
# scroll X Y DY: the scrollable under the pixel moves DY pixels
|
||||
# with no animation (warden_debug.c), the deterministic stand-in
|
||||
# for a swipe whose only job was to bring a control into view.
|
||||
# home: close every popup and return to Dashboard/Dashboard, the
|
||||
# state a fresh boot starts in, so a live panel can run one flow
|
||||
# after another. Both are judged by the channel's own ack.
|
||||
need_ctl(lineno, cmd)
|
||||
reply = ctl.send(line)
|
||||
record(lineno, line, "ok" if reply.startswith(f"{cmd}: ok") else "fail", reply)
|
||||
elif cmd in ("page", "hit", "stats", "ctl"):
|
||||
# Query verbs: print the reply, never judge it. `ctl` is a raw
|
||||
# passthrough for anything the channel grows later.
|
||||
|
||||
Reference in New Issue
Block a user