Skip to content

Commit 4ddb29f

Browse files
authored
Fix: Automatic signal detection timing (#410)
1 parent d5564ff commit 4ddb29f

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

Diff for: sources/base/DetectionAutomatic.cpp

+10
Original file line numberDiff line numberDiff line change
@@ -516,9 +516,15 @@ bool DetectionAutomatic::checkSignal(Image<ColorRgb>& image)
516516
bool hasSignal = (finalQuality <= _modelTolerance);
517517

518518
if (!hasSignal && _noSignal)
519+
{
520+
_onSignalTime = 0;
519521
return false;
522+
}
520523
if (hasSignal && !_noSignal)
524+
{
525+
_offSignalTime = 0;
521526
return true;
527+
}
522528

523529
qint64 time = InternalClock::now();
524530

@@ -551,6 +557,8 @@ bool DetectionAutomatic::checkSignal(Image<ColorRgb>& image)
551557

552558
return true;
553559
}
560+
else
561+
_offSignalTime = 0;
554562

555563
if (hasSignal && _noSignal)
556564
{
@@ -576,6 +584,8 @@ bool DetectionAutomatic::checkSignal(Image<ColorRgb>& image)
576584

577585
return false;
578586
}
587+
else
588+
_onSignalTime = 0;
579589

580590
return true;
581591
}

0 commit comments

Comments
 (0)