Skip to content

Commit

Permalink
Merge pull request #389 from luxonis/imu_device_ts
Browse files Browse the repository at this point in the history
Add device monotonic timestamp to IMU reports
  • Loading branch information
SzabolcsGergely committed Feb 22, 2022
2 parents e03be4c + 5f54fd1 commit 3a2961d
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 4 deletions.
2 changes: 1 addition & 1 deletion cmake/Depthai/DepthaiDeviceSideConfig.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
set(DEPTHAI_DEVICE_SIDE_MATURITY "snapshot")

# "full commit hash of device side binary"
set(DEPTHAI_DEVICE_SIDE_COMMIT "bfc09cbb3a84193709558b60fbd4adc3d744f361")
set(DEPTHAI_DEVICE_SIDE_COMMIT "6cc1d0f27df2bb36e003cde20f3923c7246b1018")

# "version if applicable"
set(DEPTHAI_DEVICE_SIDE_VERSION "")
7 changes: 5 additions & 2 deletions examples/IMU/imu_gyroscope_accelerometer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,11 @@ int main() {

xlinkOut->setStreamName("imu");

// enable ACCELEROMETER_RAW and GYROSCOPE_RAW at 500 hz rate
imu->enableIMUSensor({dai::IMUSensor::ACCELEROMETER_RAW, dai::IMUSensor::GYROSCOPE_RAW}, 500);
// enable ACCELEROMETER_RAW at 500 hz rate
imu->enableIMUSensor(dai::IMUSensor::ACCELEROMETER_RAW, 500);
// enable GYROSCOPE_RAW at 400 hz rate
imu->enableIMUSensor(dai::IMUSensor::GYROSCOPE_RAW, 400);
// it's recommended to set both setBatchReportThreshold and setMaxBatchReports to 20 when integrating in a pipeline with a lot of input/output connections
// above this threshold packets will be sent in batch of X, if the host is not blocked and USB bandwidth is available
imu->setBatchReportThreshold(1);
// maximum number of IMU packets in a batch, if it's reached device will block sending until host can receive it
Expand Down
2 changes: 1 addition & 1 deletion shared/depthai-shared

0 comments on commit 3a2961d

Please sign in to comment.