MCPcopy Create free account
hub / github.com/SpectacularAI/sdk / list_oakd_devices

Function list_oakd_devices

python/cli/record/oak.py:90–106  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

88 return outputFolder
89
90def list_oakd_devices():
91 import depthai
92 print('Searching for all available devices...\n')
93 infos: List[depthai.DeviceInfo] = depthai.DeviceBootloader.getAllAvailableDevices()
94 if len(infos) == 0:
95 print("Couldn't find any available devices.")
96 return
97 for info in infos:
98 with depthai.Device(depthai.Pipeline(), info, depthai.UsbSpeed.SUPER_PLUS) as device:
99 calib = device.readCalibration()
100 eeprom = calib.getEepromData()
101 state = str(info.state).split('X_LINK_')[1] # Converts enum eg. 'XLinkDeviceState.X_LINK_UNBOOTED' to 'UNBOOTED'
102 print(f"Found device '{info.name}', MxId: '{info.mxid}'")
103 print(f" State: {state}")
104 print(f" Product name: {eeprom.productName}")
105 print(f" Board name: {eeprom.boardName}")
106 print(f" Camera sensors: {device.getCameraSensorNames()}")
107
108
109def record(args):

Callers 1

recordFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected