MCPcopy Create free account
hub / github.com/Ar-Ray-code/lingbot-depth-trt / print_devices

Function print_devices

python/scripts/camera/__init__.py:27–48  ·  view source on GitHub ↗
(devices: list[DeviceInfo], errors: list[str] | None = None)

Source from the content-addressed store, hash-verified

25
26
27def print_devices(devices: list[DeviceInfo], errors: list[str] | None = None) -> None:
28 if not devices:
29 print("No RGB-D cameras found.")
30 for i, info in enumerate(devices):
31 backend = info.get("backend", "unknown")
32 print(f"[{i}] {backend}: {info.get('name', 'unknown')}")
33 for key in [
34 "serial",
35 "uid",
36 "physical_port",
37 "usb_id",
38 "product_id",
39 "product_line",
40 "connection_type",
41 "usb_type",
42 "firmware",
43 "hardware",
44 ]:
45 if key in info:
46 print(f" {key}: {info[key]}")
47 for error in errors or []:
48 print(f" {error}")
49
50
51def _selector(args: argparse.Namespace, backend: str) -> str | None:

Callers 1

create_cameraFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected