From 4814f627c629fe6f3aa2ca9c022f684324111348 Mon Sep 17 00:00:00 2001 From: Jakob Bornecrantz Date: Sun, 2 Oct 2022 15:17:50 +0100 Subject: [PATCH] d/dai: Fix conversion warnings --- src/xrt/drivers/depthai/depthai_driver.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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); }