diff --git a/src/xrt/drivers/depthai/depthai_driver.cpp b/src/xrt/drivers/depthai/depthai_driver.cpp index 3215434f6..2cb347faf 100644 --- a/src/xrt/drivers/depthai/depthai_driver.cpp +++ b/src/xrt/drivers/depthai/depthai_driver.cpp @@ -482,7 +482,7 @@ depthai_do_one_imu_frame(struct depthai_fs *depthai) ts += ts_accel / 4; ts += ts_gyro / 4; - float diff_in_ms = fabs(diff) / (double)U_TIME_1MS_IN_NS; + float diff_in_ms = (float)(abs((double)diff) / (double)U_TIME_1MS_IN_NS); if (diff_in_ms > 2.5) { DEPTHAI_WARN(depthai, "Accel and gyro samples are too far apart - %f ms!", diff_in_ms); }