diff --git a/interfaces/Fingerprintd-Engine.cppm b/interfaces/Fingerprintd-Engine.cppm index f97d65e..46e3870 100644 --- a/interfaces/Fingerprintd-Engine.cppm +++ b/interfaces/Fingerprintd-Engine.cppm @@ -109,7 +109,16 @@ export namespace fingerprintd::engine { bool falling = !finger && prev_; if (rising) out.push_back(Event::FingerTouched); - if (finger && mode == Mode::Authenticate) + // CANDIDATE 1, under measurement: on the rising edge of an + // authentication, the touch event alone. It does run the matcher + // here (the rising frame answered `MATCH MATCH` / `rej rej` with + // both events -- two verdicts from one image), and every recorded + // match followed a touch event, so this keeps what is known to + // matter and drops ~300 ms of duplicate work on the frame that + // decides every quick tap. Held frames still send image-ready. + // Labelled baseline before this change: 2/10 quick taps matched, + // 0/5 wrong-finger taps. If the rate drops, this comes out. + if (finger && mode == Mode::Authenticate && !rising) out.push_back(Event::ImageReady); if (falling) out.push_back(Event::FingerReleased); diff --git a/packaging/fptrial.sh b/packaging/fptrial.sh index 81eb405..d11bc28 100644 --- a/packaging/fptrial.sh +++ b/packaging/fptrial.sh @@ -9,7 +9,7 @@ # is the latency a user feels. Unlabelled runs cannot be turned into a rate. C=${1:-10}; W=${2:-5} OUT=/tmp/fptrial-$(date +%Y%m%d-%H%M%S).log -now() { date +%s%N; } +now() { awk '{gsub(/\./,""); print $1 "0000000"}' /proc/uptime; } run() { # $1 = label printf '\n>>> %s -- press and LIFT (quick tap) ... ' "$1" t0=$(now) diff --git a/tests/Engine/main.cpp b/tests/Engine/main.cpp index 693407c..e56b2cc 100644 --- a/tests/Engine/main.cpp +++ b/tests/Engine/main.cpp @@ -121,8 +121,8 @@ int main() { // its press. Not to be removed without a measurement isolating it. TouchTracker a; auto a1 = a.Observe(true, Mode::Authenticate); - Check(a1.size() == 2 && a1[0] == Event::FingerTouched && a1[1] == Event::ImageReady, - "auth: rising edge reports touched then image-ready"); + Check(a1.size() == 1 && a1[0] == Event::FingerTouched, + "auth: rising edge reports touched only (candidate 1: one matcher run)"); auto a2 = a.Observe(true, Mode::Authenticate); Check(a2.size() == 1 && a2[0] == Event::ImageReady, "auth: a held frame still reports image-ready"); auto a3 = a.Observe(false, Mode::Authenticate);