ITS: enable manual sensor_fusion
files affected:
utils/sensor_fusion_utils.py
config.yml (comment only changed)
bug: 205166446
Change-Id: Ibe2d7d8b1ec1852bc73697891a325976500b3d83
diff --git a/apps/CameraITS/config.yml b/apps/CameraITS/config.yml
index bc35cb1..fc712b3 100644
--- a/apps/CameraITS/config.yml
+++ b/apps/CameraITS/config.yml
@@ -44,7 +44,7 @@
test_length: 7
debug_mode: "False" # quotes are needed here
chart_distance: 25
- rotator_cntl: <controller-type> # can be arduino or canakit
+ rotator_cntl: <controller-type> # arduino, canakit, or as-is for manual
rotator_ch: <controller-channel>
camera: <camera-id>
diff --git a/apps/CameraITS/utils/sensor_fusion_utils.py b/apps/CameraITS/utils/sensor_fusion_utils.py
index 6ce53b1..59f5a60 100644
--- a/apps/CameraITS/utils/sensor_fusion_utils.py
+++ b/apps/CameraITS/utils/sensor_fusion_utils.py
@@ -234,12 +234,15 @@
elif rotate_cntl.lower() == 'canakit':
canakit_serial_port = serial_port_def('Canakit')
+ else:
+ logging.info('No rotation rig defined. Manual test: rotate phone by hand.')
+
# rotate phone
logging.debug('Rotating phone %dx', num_rotations)
for _ in range(num_rotations):
if rotate_cntl == 'arduino':
arduino_rotate_servo(rotate_ch, arduino_serial_port)
- else:
+ elif rotate_cntl == 'canakit':
canakit_set_relay_channel_state(canakit_serial_port, rotate_ch, 'ON')
canakit_set_relay_channel_state(canakit_serial_port, rotate_ch, 'OFF')
logging.debug('Finished rotations')