aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorThéo de la Hogue2022-05-11 12:23:31 +0200
committerThéo de la Hogue2022-05-11 12:23:31 +0200
commit6e4257b49f57f1c815d07d0ee9e292c1f7a5758a (patch)
tree4e9f73e9eae3e7abf01cdec6e2e867d0a3105d48 /src
parentbe76e9dad29578f63a5651489f0b38adb169d877 (diff)
downloadargaze-6e4257b49f57f1c815d07d0ee9e292c1f7a5758a.zip
argaze-6e4257b49f57f1c815d07d0ee9e292c1f7a5758a.tar.gz
argaze-6e4257b49f57f1c815d07d0ee9e292c1f7a5758a.tar.bz2
argaze-6e4257b49f57f1c815d07d0ee9e292c1f7a5758a.tar.xz
Sending random custom events
Diffstat (limited to 'src')
-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