fix(camera): set accepted face brightness to 110–220

This commit is contained in:
xsl
2026-10-15 20:51:19 +08:00
parent fbc556d1a6
commit c6d65493b6
3 changed files with 7 additions and 7 deletions
+2 -2
View File
@@ -116,7 +116,7 @@ try {
await page.waitForFunction(() => window.__voice.some(row => row.id === 'hint-front'));
assert((await page.locator('#cam-step').textContent()).includes('1/3'), 'invalid frontal angle never advances');
assert.equal(await page.evaluate(() => window.__voice.some(row => /^hint-turn-|^step[23]-|^shot-done$/.test(row.id))), false, 'no turn/next-step/completion audio before a successful front photo');
await page.evaluate(() => window.__cameraFixture.set('C3_180.jpg'));
await page.evaluate(() => { window.__cameraFixture.light(.6); return window.__cameraFixture.set('C3_180.jpg'); });
await page.waitForFunction(()=>window.__evaluations.some(row=>row.target==='front'&&!row.ok&&row.hint==='请到光线充足处'));
assert((await page.locator('#cam-step').textContent()).includes('1/3'),'dim sample cannot advance');
// Simulate improving room lighting, not bypassing the actual quality gate.
@@ -152,7 +152,7 @@ try {
for (const key of ['front', 'left', 'right']) {
const row = body.capture_diagnostics.views[key];
assert.equal(row.mode, 'live'); assert.equal(row.direction_checked, true);
assert(row.score >= .4 && row.luma >= 150 && row.luma <= 220);
assert(row.score >= .4 && row.luma >= 110 && row.luma <= 220);
assert(Math.abs(row.roll) <= 18);
}
assert(Math.abs(body.capture_diagnostics.views.front.yaw) <= 18);