Fix 2720 Flip cover init, shared backlight and flip lock
This commit is contained in:
1 parent
c939687138
commit
b389120328
24 files changed
+494
-217
No files matched your search
@@ -63,12 +63,15 @@ def main():
|
||||
for token in ("LID_DEBOUNCE_MS 20", "HALL_EDGE_MS 20", "LID_LOOP_MS 20",
|
||||
"hall_observed", "fast_until", "write_session_file",
|
||||
"write_lid_state(closed)", 'write_session_file(state, "screenoff")',
|
||||
'write_session_file(state, "unlock")', 'cover_send("OPEN")',
|
||||
'write_session_file(state, "lock")', 'cover_send("OPEN")',
|
||||
'locker_send("LOCK\\n")', 'run_sxmo_state("lock", "open")',
|
||||
"read_ready(&list, fds, nfds, &switch_mask, &edge)",
|
||||
"LID_GENERATION_FILE", "run_dpms",
|
||||
"bananarchy-lid-state.sh"):
|
||||
if token not in lid:
|
||||
return fail("lid daemon lost instant handling: %s" % token)
|
||||
if "unlink(LOCK_FLAG)" in lid:
|
||||
return fail("opening the flip still auto-unlocks the desktop")
|
||||
# The cover daemon must be told to release the bus before the panel is lit.
|
||||
if lid.index('cover_send("OPEN")') > lid.index('write_sysfs_int(BRIGHTNESS, bl)'):
|
||||
return fail("the SPI bus is released after the main panel is relit")
|
||||
@@ -76,7 +79,14 @@ def main():
|
||||
if lid_close.index('write_session_file(LOCK_FLAG, "1")') > \
|
||||
lid_close.index('write_text_file(BRIGHTNESS, "0")'):
|
||||
return fail("the screen is locked after the panel is blanked")
|
||||
print("[ok] lid daemon: sticky hall state, edge wakeup and synchronous lock")
|
||||
lid_open = lid[lid.index(' } else {'):]
|
||||
if 'write_session_file(LOCK_FLAG, "1")' not in lid_open or \
|
||||
'write_session_file(state, "lock")' not in lid_open:
|
||||
return fail("opening the flip does not keep the desktop locked")
|
||||
if lid_open.index('write_session_file(state, "lock")') > \
|
||||
lid_open.index('write_sysfs_int(BRIGHTNESS, bl)'):
|
||||
return fail("the desktop lock is published after the panel is relit")
|
||||
print("[ok] lid daemon: instant close, persistent lock and bus handover")
|
||||
|
||||
scratch = pathlib.Path("/tmp/bantam/9064bb701d9e9f7c6412f0ea6846d88a")
|
||||
scratch.mkdir(parents=True, exist_ok=True)
|
||||
|
||||
Reference in new issue
Block a user