Add screensaver auto-lock, lynx/gsocket/apexrc defaults, htoprc, and Bantam updates
This commit is contained in:
1 parent
b7dca4f15f
commit
c12ed68d19
36 files changed
+1421
-75
No files matched your search
@@ -173,6 +173,48 @@ int main(void) {
|
||||
assert(perf.a72_online);
|
||||
assert(perf.suspend_timeout_s == 0);
|
||||
|
||||
/* Idle screensaver timing from last active input (battery balanced: dim=120s, suspend=300s) */
|
||||
pol.lid_closed = false;
|
||||
pol.hdmi_connected = false;
|
||||
pol.on_ac_power = false;
|
||||
uint64_t next_wait = 999999;
|
||||
assert(geminux_policy_eval_idle(&pol, IDLE_STAGE_ACTIVE, 0, &next_wait) == IDLE_ACT_NONE);
|
||||
assert(next_wait == 120000);
|
||||
/* User typed at t=100s, so when initial 120s timer fires (elapsed=20s) it re-arms for 100s */
|
||||
assert(geminux_policy_eval_idle(&pol, IDLE_STAGE_ACTIVE, 20000, &next_wait) == IDLE_ACT_NONE);
|
||||
assert(next_wait == 100000);
|
||||
assert(geminux_policy_eval_idle(&pol, IDLE_STAGE_ACTIVE, 120000, &next_wait) == IDLE_ACT_DIM);
|
||||
assert(next_wait == 180000);
|
||||
assert(geminux_policy_eval_idle(&pol, IDLE_STAGE_DIMMED, 200000, &next_wait) == IDLE_ACT_NONE);
|
||||
assert(next_wait == 100000);
|
||||
assert(geminux_policy_eval_idle(&pol, IDLE_STAGE_DIMMED, 300000, &next_wait) == IDLE_ACT_SUSPEND);
|
||||
assert(next_wait == 0);
|
||||
|
||||
/* AC balanced (dim=300s, suspend=0): acts as lock + blank screensaver without auto-suspend */
|
||||
pol.lid_closed = false;
|
||||
pol.on_ac_power = true;
|
||||
assert(geminux_policy_eval_idle(&pol, IDLE_STAGE_ACTIVE, 299000, &next_wait) == IDLE_ACT_NONE);
|
||||
assert(next_wait == 1000);
|
||||
assert(geminux_policy_eval_idle(&pol, IDLE_STAGE_ACTIVE, 300000, &next_wait) == IDLE_ACT_LOCK_BLANK);
|
||||
assert(next_wait == 0);
|
||||
assert(geminux_policy_eval_idle(&pol, IDLE_STAGE_LOCKED_BLANK, 450000, &next_wait) == IDLE_ACT_NONE);
|
||||
assert(next_wait == 0);
|
||||
|
||||
/* Inhibitors, HDMI, and closed lid suppress idle screensaver timers */
|
||||
assert(geminux_policy_add_inhibit(&pol, "video"));
|
||||
assert(geminux_policy_eval_idle(&pol, IDLE_STAGE_ACTIVE, 400000, &next_wait) == IDLE_ACT_NONE);
|
||||
assert(next_wait == 0);
|
||||
assert(geminux_policy_del_inhibit(&pol, "video"));
|
||||
pol.hdmi_connected = true;
|
||||
assert(geminux_policy_eval_idle(&pol, IDLE_STAGE_ACTIVE, 400000, &next_wait) == IDLE_ACT_NONE);
|
||||
assert(next_wait == 0);
|
||||
pol.hdmi_connected = false;
|
||||
pol.lid_closed = true;
|
||||
assert(geminux_policy_eval_idle(&pol, IDLE_STAGE_ACTIVE, 400000, &next_wait) == IDLE_ACT_NONE);
|
||||
assert(next_wait == 0);
|
||||
pol.lid_closed = false;
|
||||
pol.on_ac_power = false;
|
||||
|
||||
test_touch_gestures();
|
||||
|
||||
/* Wi-Fi NVRAM record validation, scan, and deterministic MAC fallback */
|
||||
|
||||
Reference in new issue
Block a user