aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/argaze/utils/record_tobii_session.py9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/argaze/utils/record_tobii_session.py b/src/argaze/utils/record_tobii_session.py
index 386acbf..070563f 100644
--- a/src/argaze/utils/record_tobii_session.py
+++ b/src/argaze/utils/record_tobii_session.py
@@ -2,11 +2,10 @@
import argparse
import time
+import random
from argaze.TobiiGlassesPro2 import TobiiController
-import cv2 as cv
-
def main():
"""
Record a Tobii Glasses Pro 2 session on Tobii interface's SD Card
@@ -50,6 +49,12 @@ def main():
print(tobii_controller.get_battery_info())
last_battery_level = battery_level
+ # send random event each 3 - 10 seconds
+ if time_count % random.randint(3, 10) == 0:
+
+ print('Send event')
+ tobii_controller.send_custom_event('TestEvent', time_count)
+
# Sleep 1 second
time.sleep(1)
time_count += 1