From d8970f25f946e93b5c0a7a57deebf0466893d993 Mon Sep 17 00:00:00 2001 From: Ryan Pavlik Date: Mon, 2 May 2022 16:54:03 -0500 Subject: [PATCH] a/math: Fix conversion warnings --- src/xrt/auxiliary/math/m_lowpass_float.hpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/xrt/auxiliary/math/m_lowpass_float.hpp b/src/xrt/auxiliary/math/m_lowpass_float.hpp index c9172cab4..e6b577edf 100644 --- a/src/xrt/auxiliary/math/m_lowpass_float.hpp +++ b/src/xrt/auxiliary/math/m_lowpass_float.hpp @@ -49,7 +49,7 @@ namespace detail { * before initializing the filter with the first sample. */ explicit LowPassIIR(Scalar cutoff_hz, Value const &val) noexcept - : state(val), time_constant(1.f / (2.f * M_PI * cutoff_hz)) + : state(val), time_constant(static_cast(1.f / (2.f * M_PI * cutoff_hz))) {} /*! @@ -82,7 +82,7 @@ namespace detail { return; } // get dt in seconds - Scalar dt = time_ns_to_s(timestamp_ns - filter_timestamp_ns); + Scalar dt = static_cast(time_ns_to_s(timestamp_ns - filter_timestamp_ns)); //! @todo limit max dt? Scalar weighted = dt * weight; Scalar alpha = weighted / (time_constant + weighted);