summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorClemenz Portmann <portmannc@google.com>2022-06-16 10:50:34 -0700
committerClemenz Portmann <portmannc@google.com>2022-06-16 10:56:06 -0700
commitd7767978fdb284a31d04a06c0691bb02d8383c5d (patch)
tree774a8ce0846d5690a7be47e4553d7ce0e60761fc
parent202478c3c997cb45532d8a45930c930dadc2e4a8 (diff)
downloadcts-d7767978fdb284a31d04a06c0691bb02d8383c5d.tar.gz
ITS: add additional delay in test_sensor_fusion.py for Arduino
bug: 236275663 Change-Id: I4c90a72d9c628741a4905f90156e63391c7c3135
-rw-r--r--apps/CameraITS/tests/sensor_fusion/test_sensor_fusion.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/apps/CameraITS/tests/sensor_fusion/test_sensor_fusion.py b/apps/CameraITS/tests/sensor_fusion/test_sensor_fusion.py
index 193993524de..8c98be0a2ec 100644
--- a/apps/CameraITS/tests/sensor_fusion/test_sensor_fusion.py
+++ b/apps/CameraITS/tests/sensor_fusion/test_sensor_fusion.py
@@ -39,6 +39,7 @@ _CAM_FRAME_RANGE_MAX = 9.0 # Seconds: max allowed camera frame range.
_GYRO_SAMP_RATE_MIN = 100.0 # Samples/second: min gyro sample rate.
_NAME = os.path.splitext(os.path.basename(__file__))[0]
_ARDUINO_ANGLES = (0, 90)
+_ARDUINO_INIT_WAIT_TIME = 3.0 # Seconds to wait for Arduino comm
_ARDUINO_MOVE_TIME = 2
_ARDUINO_SERVO_SPEED = 20
_NUM_ROTATIONS = 10
@@ -104,6 +105,8 @@ def _collect_data(cam, fps, w, h, test_length, rot_rig, chart_dist, log_path):
# Sleep a while for gyro events to stabilize.
time.sleep(_GYRO_INIT_WAIT_TIME)
+ if rot_rig['cntl'].lower() == 'arduino':
+ time.sleep(_ARDUINO_INIT_WAIT_TIME)
# Capture frames.
facing = props['android.lens.facing']