Skip to content

Commit a6677c0

Browse files
committed
Fix device_preset auto-detection default case (warn, do not crash)
1 parent af69859 commit a6677c0

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

python/cli/process/process.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -520,7 +520,6 @@ def detect_device_preset(input_dir):
520520
if args.device_preset:
521521
device_preset = args.device_preset
522522

523-
524523
if device_preset: print(f"Selected device type: {device_preset}", flush=True)
525524
else: print("Warning! Couldn't automatically detect device preset, to ensure best results suply one via --device_preset argument", flush=True)
526525

@@ -539,7 +538,7 @@ def detect_device_preset(input_dir):
539538
elif device_preset == 'oak-d':
540539
config['stereoPointCloudMinDepth'] = 0.5
541540
config['stereoPointCloudStride'] = 30
542-
elif "orbbec" in device_preset:
541+
elif device_preset is not None and "orbbec" in device_preset:
543542
if prefer_icp:
544543
parameter_sets.extend(['icp'])
545544
if not args.fast: parameter_sets.append('offline-icp')

0 commit comments

Comments
 (0)