Skip to content

Commit

Permalink
fix: durationBetweenCaptures on android
Browse files Browse the repository at this point in the history
  • Loading branch information
Tweenkie committed Dec 20, 2019
1 parent 83a3ab2 commit 7ce7a65
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ private void processPreviewFrame(PreviewFrame previewFrame) {
if (detectPreviewDocument(frame) && focused) {
numOfSquares++;
double now = (double)(new Date()).getTime() / 1000.0;
if (numOfSquares == numOfRectangles && now < lastCaptureTime + durationBetweenCaptures) {
if (numOfSquares == numOfRectangles && now > lastCaptureTime + durationBetweenCaptures) {
lastCaptureTime = now;
numOfSquares = 0;
mMainActivity.requestPicture();
Expand Down

0 comments on commit 7ce7a65

Please sign in to comment.