diff --git a/EyeTrackApp/utils/CycleCounter.py b/EyeTrackApp/utils/CycleCounter.py index 7fad7a5..b6d1411 100644 --- a/EyeTrackApp/utils/CycleCounter.py +++ b/EyeTrackApp/utils/CycleCounter.py @@ -33,4 +33,7 @@ class CycleCounter: self.max_count = max_count def force_complete(self): - self.count = self.max_count \ No newline at end of file + self.count = self.max_count + + def less_than_percentage(self,mult): + return self.count <= self.max_count * mult \ No newline at end of file diff --git a/EyeTrackApp/utils/mirrortrack.py b/EyeTrackApp/utils/mirrortrack.py index d8b6b14..f1b689b 100644 --- a/EyeTrackApp/utils/mirrortrack.py +++ b/EyeTrackApp/utils/mirrortrack.py @@ -179,7 +179,7 @@ class MirrorTrack: elif cls.cyc_counter_stare.active(): cls.cyc_counter_stare.decrease() - if not cls.cyc_counter_stare.active(): + if cls.cyc_counter_stare.less_than_percentage(0.5): if cls.bypass_stare: cls.bypass_stare = False if not cls.is_tracking_mode(): @@ -205,7 +205,7 @@ class MirrorTrack: elif cls.cyc_counter_inv.active(): cls.cyc_counter_inv.decrease() - if not cls.cyc_counter_inv.active(): + if cls.cyc_counter_inv.less_than_percentage(0.5): if cls.bypass_stare: cls.bypass_stare = False if cls.is_inverted_mode():