Set a maximum time for collecting DUT measurements

If the DUT has a stuck finger, or finger reports caused by noise, it may
continue to send measurements indefinitely, causing testing to stall.
This CL adds a maximum time for collecting measurements from the DUT to
prevent stalling.

BUG=b:148627899
TEST=Perform tests with and without manually adding a "stuck" finger to
the DUT. Works as expected.

Change-Id: If761b15a6fc5e67bc650143bd848ba5ac81a0f48
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/optofidelity_TPPT/+/2714062
Commit-Queue: Sean O'Brien <seobrien@chromium.org>
Tested-by: Sean O'Brien <seobrien@chromium.org>
Reviewed-by: Harry Cutts <hcutts@chromium.org>
2 files changed