Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
40 commits
Select commit Hold shift + click to select a range
3c8b3b0
updated for usb fetch wip
saching13 Oct 8, 2020
238352c
updated wrapper to write usb speed
saching13 Oct 8, 2020
fe75d89
modified hunter config in depthai-core for build fix
saching13 Oct 8, 2020
5658ec3
updating submodule linking
saching13 Oct 8, 2020
fb17ba2
added is_usb3() check function
saching13 Oct 9, 2020
25210b5
updated for usb fetch wip
saching13 Oct 8, 2020
64cca71
added is_usb3() check function
saching13 Oct 9, 2020
ca6b77c
Merge branch 'usb-testing' of https://github.com/luxonis/depthai-pyth…
saching13 Oct 9, 2020
ecee64d
updated device commit id
saching13 Oct 9, 2020
cd1852f
linked to the upadted depthai core and added api to get myriad x seri…
saching13 Oct 12, 2020
f056a29
update depthai-core
saching13 Oct 12, 2020
203fcd3
linking updated depthai-core in usb-testing
saching13 Oct 12, 2020
7bc4288
added eeprom loaded check
saching13 Oct 12, 2020
8ccc4c0
added destructor to python not tested
saching13 Oct 16, 2020
969ede9
added destructor to python not tested
saching13 Oct 16, 2020
52c0685
added destructor to python not tested
saching13 Oct 16, 2020
576111c
linked to the changed XLink wrapper by removing speed from init funct…
saching13 Oct 19, 2020
b664137
changing link to depthai-core
saching13 Oct 19, 2020
a441f1b
updated link to depthai-core
saching13 Oct 19, 2020
8edc696
linking to the updated depthai-core with multi device xlink support
saching13 Oct 20, 2020
4d9a385
updated device side config on depthai-core
saching13 Oct 20, 2020
11ffa2b
updated linking to depthai-core
saching13 Oct 20, 2020
d0b33b7
updated link to xlink
saching13 Oct 20, 2020
917fe1a
updated link to xlink
saching13 Oct 20, 2020
2452206
updated link to xlink
saching13 Oct 20, 2020
8b0514d
updated link to xlink
saching13 Oct 20, 2020
a239ba1
added print statement on calibration file path to verify with mx id
saching13 Oct 21, 2020
64ad4c4
merged with develop
saching13 Oct 21, 2020
89ac461
updated depthai-core link
saching13 Oct 21, 2020
527dd99
added device change check on swapping devices for testing
saching13 Oct 22, 2020
931d94f
added api to check cameras connection
saching13 Oct 23, 2020
ae3717e
Merge remote-tracking branch 'origin/develop' into usb-testing
alex-luxonis Oct 26, 2020
366ff7a
added api to write to eeprom and fetch existing pipeline
saching13 Oct 30, 2020
17eda35
renamed api to write_eeprom_data
saching13 Oct 30, 2020
b731629
changed xlink path
saching13 Nov 3, 2020
8aa64e6
added wrapper for xlinkConnect to make it threadsafe in depthai-shared
saching13 Nov 4, 2020
02b0186
updated device side commit id and xlinkwrapper
saching13 Nov 5, 2020
5d10246
updating depthai-core
saching13 Nov 5, 2020
56a4bf9
removed text.txt
saching13 Nov 5, 2020
b77255b
updated depthai-core
saching13 Nov 6, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
69 changes: 68 additions & 1 deletion src/device_bindings.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -124,9 +124,76 @@ void init_binding_device(pybind11::module& m){
"Returns a vector defining how much the right camera is translated w.r.t left camera."
)

.def(
"is_usb3",
&Device::is_usb3,
"Return true if connected over usb3 or else false."
)

.def(
"get_mx_id",
&Device::get_mx_id,
"Return the Myraid X serial number of the device."
)

.def(
"is_eeprom_loaded",
&Device::is_eeprom_loaded,
"Return true if EEPROM has both intrinsic matrixes."
)

.def(
"is_device_changed",
&Device::is_device_changed,
"Return true if device is swapped while running over watchdog thread."
)

.def(
"reset_device_changed",
&Device::reset_device_changed,
"Sets device_changed var to false to detect the next swap while running over watchdog thread."
)

.def(
"is_rgb_connected",
&Device::is_rgb_connected,
"Returns true if RGB camera is connected."
)

.def(
"is_left_connected",
&Device::is_left_connected,
"Returns true if left stereo camera is connected."
)

;
.def(
"is_right_connected",
&Device::is_right_connected,
"Returns true if right stereo camera is connected."
)
.def(
"write_eeprom_data",
[](Device& device, py::dict config)
{
// str(dict) for string representation uses ['] , but JSON requires ["]
// fast & dirty solution:
std::string str = py::str(config);
boost::replace_all(str, "\'", "\"");
boost::replace_all(str, "None", "null");
boost::replace_all(str, "True", "true");
boost::replace_all(str, "False", "false");
// TODO: make better json serialization

return device.write_eeprom_data(str);
},
"Takes board config and calibration data as input and writes to eeprom",
py::arg("config") = py::dict()
)
.def(
"get_pipeline",
&Device::get_pipeline,
"Returns shared ptr of CNNHostPipeline created using cerate_pipeline."
);


py::enum_<CaptureMetadata::AutofocusMode>(m, "AutofocusMode")
Expand Down