Face unlock: screen fill-light for low light; fix Quad-Bayer AE ramp
CI / test (push) Failing after 51s

- Boost the backlight to 90% while enrolling with the light on or while sign-in is scanning, then restore the previous level when that ends or the window closes.
- Add a Light: On/Off toggle (L key) to the Face window; the backdrop turns soft white while the light is on.
- Quad-Bayer AE: compute the low-light gain once and cap it by the highlight limit, so ramp-up and highlight back-off agree.
- Tests: backlight round-trip through the Face window, Quad-Bayer debayer color/low-light/dark-frame cases, and the AE ramp, back-off and restore order.
This commit is contained in:
nandi committed 2026-11-28 18:32:15 -08:00
1 parent c5b96e2c70
commit 40c5d6722c
8 files changed
+266 -12

No files matched your search

+14
View File
@@ -77,6 +77,8 @@ pub(all) struct FaceWindow {
mut applying : Bool
/// When the camera process ended without a picture: the window shows why.
mut ended : Bool
/// Soft white surround fill-light for low-light enrollment.
mut fill_light : Bool
/// The cameras chandra-face found when the configured one can't be used: (path, name, why
/// not; empty when it takes pictures). The window offers the usable ones.
cameras : Array[(String, String, String)]
@@ -375,6 +377,7 @@ pub fn FaceUnlock::open_window(self : FaceUnlock, mark : String?) -> Unit {
error: false,
applying: false,
ended: fd < 0,
fill_light: true,
cameras: [],
}
if fd < 0 {
@@ -406,6 +409,17 @@ pub fn FaceUnlock::snap(self : FaceUnlock) -> Unit {
}
}
///| Toggle the soft screen fill-light while taking enrollment pictures.
pub fn FaceUnlock::toggle_fill_light(self : FaceUnlock) -> Unit {
match self.window {
Some(w) if !w.applying && !w.ended => {
w.fill_light = !w.fill_light
self.touch()
}
_ => ()
}
}
///| Forget snap `i`.
pub fn FaceUnlock::drop_snap(self : FaceUnlock, i : Int) -> Unit {
match self.window {