diff options
author | Théo de la Hogue | 2024-07-23 12:46:28 +0200 |
---|---|---|
committer | Théo de la Hogue | 2024-07-23 12:46:28 +0200 |
commit | e4b2d284371661a0b286cdebee430f92131313e1 (patch) | |
tree | 11c31a950e4e040e78dfaee7994571f07df4c416 /src | |
parent | baf49b9adbac8060a9120b230e1e4aa85dc609bc (diff) | |
download | argaze-e4b2d284371661a0b286cdebee430f92131313e1.zip argaze-e4b2d284371661a0b286cdebee430f92131313e1.tar.gz argaze-e4b2d284371661a0b286cdebee430f92131313e1.tar.bz2 argaze-e4b2d284371661a0b286cdebee430f92131313e1.tar.xz |
Symplifying logical tests.
Diffstat (limited to 'src')
-rw-r--r-- | src/argaze/utils/contexts/TobiiProGlasses2.py | 19 |
1 files changed, 8 insertions, 11 deletions
diff --git a/src/argaze/utils/contexts/TobiiProGlasses2.py b/src/argaze/utils/contexts/TobiiProGlasses2.py index 75cd0ff..fbc9d1e 100644 --- a/src/argaze/utils/contexts/TobiiProGlasses2.py +++ b/src/argaze/utils/contexts/TobiiProGlasses2.py @@ -1362,20 +1362,17 @@ class SegmentPlayback(ArFeatures.DataPlaybackContext): logging.info('Difference between data and sync event timestamps is %i ms', diff_data_ts-diff_sync_ts) - # Don't process gaze positions if sync is required but no image have been processed yet - if self.__sync_event is not None and self.__sync_video_ts is None: + # Don't process gaze positions when: + # - no image have been processed yet + # - no sync event happened yet + if self.__sync_video_ts is None or self.__sync_ts is None: - continue + continue - # Don't process gaze positions if sync is required but sync event not happened yet - elif self.__sync_event is not None and self.__sync_ts is None: + # Otherwise, synchronize timestamp with sync event + else: - continue - - # Otherwise, synchronize timestamp with sync event - elif self.__sync_event is not None and self.__sync_ts is not None: - - data_ts = int(self.__sync_ts + data_ts - self.__sync_data_ts) + data_ts = int(self.__sync_ts + data_ts - self.__sync_data_ts) # Process gaze positions match data_object_type: |