mirror of
https://gitlab.freedesktop.org/monado/monado.git
synced 2025-01-31 19:08:30 +00:00
auxiliary: Fix or disable a number of warnings
Both MSVC and doxygen warnings.
This commit is contained in:
parent
2b5f07c8e4
commit
ad1961fce7
|
@ -77,7 +77,7 @@ os_nanosleep(int64_t nsec)
|
||||||
spec.tv_nsec = (nsec % U_1_000_000_000);
|
spec.tv_nsec = (nsec % U_1_000_000_000);
|
||||||
nanosleep(&spec, NULL);
|
nanosleep(&spec, NULL);
|
||||||
#elif defined(XRT_OS_WINDOWS)
|
#elif defined(XRT_OS_WINDOWS)
|
||||||
Sleep(nsec / U_TIME_1MS_IN_NS);
|
Sleep((DWORD)(nsec / U_TIME_1MS_IN_NS));
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -7,6 +7,10 @@
|
||||||
* @ingroup st_prober
|
* @ingroup st_prober
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#ifdef _MSC_VER
|
||||||
|
#define _CRT_SECURE_NO_WARNINGS
|
||||||
|
#endif
|
||||||
|
|
||||||
#include <xrt/xrt_device.h>
|
#include <xrt/xrt_device.h>
|
||||||
#include "xrt/xrt_settings.h"
|
#include "xrt/xrt_settings.h"
|
||||||
#include "xrt/xrt_config.h"
|
#include "xrt/xrt_config.h"
|
||||||
|
@ -359,7 +363,7 @@ u_config_json_get_tracking_settings(struct u_config_json *json, struct xrt_setti
|
||||||
bad |= !get_obj_int(t, "version", &ver);
|
bad |= !get_obj_int(t, "version", &ver);
|
||||||
if (bad || ver >= 1) {
|
if (bad || ver >= 1) {
|
||||||
U_LOG_E("Missing or unknown version tag '%i' in tracking config", ver);
|
U_LOG_E("Missing or unknown version tag '%i' in tracking config", ver);
|
||||||
return NULL;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -130,101 +130,101 @@ static struct u_joint_curl_model hand_joint_default_set_curl_model_defaults[XRT_
|
||||||
[XRT_HAND_JOINT_RING_DISTAL] = {.position_offset = XRT_VEC3_ZERO,
|
[XRT_HAND_JOINT_RING_DISTAL] = {.position_offset = XRT_VEC3_ZERO,
|
||||||
.axis_angle_offset = {0, 0, 0},
|
.axis_angle_offset = {0, 0, 0},
|
||||||
.bone_length = 0.023,
|
.bone_length = 0.023,
|
||||||
.radius = 0.01,
|
.radius = 0.01f,
|
||||||
.joint_id = XRT_HAND_JOINT_RING_DISTAL},
|
.joint_id = XRT_HAND_JOINT_RING_DISTAL},
|
||||||
|
|
||||||
[XRT_HAND_JOINT_RING_TIP] = {.position_offset = XRT_VEC3_ZERO,
|
[XRT_HAND_JOINT_RING_TIP] = {.position_offset = XRT_VEC3_ZERO,
|
||||||
.axis_angle_offset = {0, 0, 0},
|
.axis_angle_offset = {0, 0, 0},
|
||||||
.bone_length = 0,
|
.bone_length = 0,
|
||||||
.radius = 0.013,
|
.radius = 0.013f,
|
||||||
.joint_id = XRT_HAND_JOINT_RING_TIP},
|
.joint_id = XRT_HAND_JOINT_RING_TIP},
|
||||||
|
|
||||||
|
|
||||||
[XRT_HAND_JOINT_MIDDLE_METACARPAL] = {.position_offset = {.x = 0.00, .y = 0, .z = -0.039},
|
[XRT_HAND_JOINT_MIDDLE_METACARPAL] = {.position_offset = {.x = 0, .y = 0, .z = -0.039f},
|
||||||
.axis_angle_offset = {0, 0, 0},
|
.axis_angle_offset = {0, 0, 0},
|
||||||
.bone_length = 0.045,
|
.bone_length = 0.045f,
|
||||||
.radius = 0.012,
|
.radius = 0.012f,
|
||||||
.joint_id = XRT_HAND_JOINT_MIDDLE_METACARPAL},
|
.joint_id = XRT_HAND_JOINT_MIDDLE_METACARPAL},
|
||||||
|
|
||||||
[XRT_HAND_JOINT_MIDDLE_PROXIMAL] = {.position_offset = XRT_VEC3_ZERO,
|
[XRT_HAND_JOINT_MIDDLE_PROXIMAL] = {.position_offset = XRT_VEC3_ZERO,
|
||||||
.axis_angle_offset = {0, 0, 0},
|
.axis_angle_offset = {0, 0, 0},
|
||||||
.bone_length = 0.042,
|
.bone_length = 0.042f,
|
||||||
.radius = 0.01,
|
.radius = 0.01f,
|
||||||
.joint_id = XRT_HAND_JOINT_MIDDLE_PROXIMAL},
|
.joint_id = XRT_HAND_JOINT_MIDDLE_PROXIMAL},
|
||||||
|
|
||||||
[XRT_HAND_JOINT_MIDDLE_INTERMEDIATE] = {.position_offset = XRT_VEC3_ZERO,
|
[XRT_HAND_JOINT_MIDDLE_INTERMEDIATE] = {.position_offset = XRT_VEC3_ZERO,
|
||||||
.axis_angle_offset = {0, 0, 0},
|
.axis_angle_offset = {0, 0, 0},
|
||||||
.bone_length = 0.033,
|
.bone_length = 0.033f,
|
||||||
.radius = 0.01,
|
.radius = 0.01f,
|
||||||
.joint_id = XRT_HAND_JOINT_MIDDLE_INTERMEDIATE},
|
.joint_id = XRT_HAND_JOINT_MIDDLE_INTERMEDIATE},
|
||||||
|
|
||||||
[XRT_HAND_JOINT_MIDDLE_DISTAL] = {.position_offset = XRT_VEC3_ZERO,
|
[XRT_HAND_JOINT_MIDDLE_DISTAL] = {.position_offset = XRT_VEC3_ZERO,
|
||||||
.axis_angle_offset = {0, 0, 0},
|
.axis_angle_offset = {0, 0, 0},
|
||||||
.bone_length = 0.024,
|
.bone_length = 0.024f,
|
||||||
.radius = 0.01,
|
.radius = 0.01f,
|
||||||
.joint_id = XRT_HAND_JOINT_MIDDLE_DISTAL},
|
.joint_id = XRT_HAND_JOINT_MIDDLE_DISTAL},
|
||||||
|
|
||||||
[XRT_HAND_JOINT_MIDDLE_TIP] = {.position_offset = XRT_VEC3_ZERO,
|
[XRT_HAND_JOINT_MIDDLE_TIP] = {.position_offset = XRT_VEC3_ZERO,
|
||||||
.axis_angle_offset = {0, 0, 0},
|
.axis_angle_offset = {0, 0, 0},
|
||||||
.bone_length = 0,
|
.bone_length = 0,
|
||||||
.radius = 0.01,
|
.radius = 0.01f,
|
||||||
.joint_id = XRT_HAND_JOINT_MIDDLE_TIP},
|
.joint_id = XRT_HAND_JOINT_MIDDLE_TIP},
|
||||||
|
|
||||||
|
|
||||||
[XRT_HAND_JOINT_INDEX_METACARPAL] = {.position_offset = {.x = 0.015, .y = 0, .z = -0.038},
|
[XRT_HAND_JOINT_INDEX_METACARPAL] = {.position_offset = {.x = 0.015, .y = 0, .z = -0.038},
|
||||||
.axis_angle_offset = {0, DEG_TO_RAD(12), 0},
|
.axis_angle_offset = {0, DEG_TO_RAD(12.0f), 0},
|
||||||
.bone_length = 0.05,
|
.bone_length = 0.05f,
|
||||||
.radius = 0.012,
|
.radius = 0.012f,
|
||||||
.joint_id = XRT_HAND_JOINT_INDEX_METACARPAL},
|
.joint_id = XRT_HAND_JOINT_INDEX_METACARPAL},
|
||||||
|
|
||||||
[XRT_HAND_JOINT_INDEX_PROXIMAL] = {.position_offset = XRT_VEC3_ZERO,
|
[XRT_HAND_JOINT_INDEX_PROXIMAL] = {.position_offset = XRT_VEC3_ZERO,
|
||||||
.axis_angle_offset = {0, DEG_TO_RAD(-10), 0},
|
.axis_angle_offset = {0, DEG_TO_RAD(-10.0f), 0},
|
||||||
.bone_length = 0.040,
|
.bone_length = 0.040f,
|
||||||
.radius = 0.011,
|
.radius = 0.011f,
|
||||||
.joint_id = XRT_HAND_JOINT_INDEX_PROXIMAL},
|
.joint_id = XRT_HAND_JOINT_INDEX_PROXIMAL},
|
||||||
|
|
||||||
[XRT_HAND_JOINT_INDEX_INTERMEDIATE] = {.position_offset = XRT_VEC3_ZERO,
|
[XRT_HAND_JOINT_INDEX_INTERMEDIATE] = {.position_offset = XRT_VEC3_ZERO,
|
||||||
.axis_angle_offset = {0, 0, 0},
|
.axis_angle_offset = {0, 0, 0},
|
||||||
.bone_length = 0.031,
|
.bone_length = 0.031f,
|
||||||
.radius = 0.01,
|
.radius = 0.01f,
|
||||||
.joint_id = XRT_HAND_JOINT_INDEX_INTERMEDIATE},
|
.joint_id = XRT_HAND_JOINT_INDEX_INTERMEDIATE},
|
||||||
|
|
||||||
[XRT_HAND_JOINT_INDEX_DISTAL] = {.position_offset = XRT_VEC3_ZERO,
|
[XRT_HAND_JOINT_INDEX_DISTAL] = {.position_offset = XRT_VEC3_ZERO,
|
||||||
.axis_angle_offset = {0, 0, 0},
|
.axis_angle_offset = {0, 0, 0},
|
||||||
.bone_length = 0.023,
|
.bone_length = 0.023f,
|
||||||
.radius = 0.01,
|
.radius = 0.01f,
|
||||||
.joint_id = XRT_HAND_JOINT_INDEX_DISTAL},
|
.joint_id = XRT_HAND_JOINT_INDEX_DISTAL},
|
||||||
|
|
||||||
[XRT_HAND_JOINT_INDEX_TIP] = {.position_offset = XRT_VEC3_ZERO,
|
[XRT_HAND_JOINT_INDEX_TIP] = {.position_offset = XRT_VEC3_ZERO,
|
||||||
.axis_angle_offset = {0, 0, 0},
|
.axis_angle_offset = {0, 0, 0},
|
||||||
.bone_length = 0,
|
.bone_length = 0,
|
||||||
.radius = 0.01,
|
.radius = 0.01f,
|
||||||
.joint_id = XRT_HAND_JOINT_INDEX_TIP},
|
.joint_id = XRT_HAND_JOINT_INDEX_TIP},
|
||||||
|
|
||||||
|
|
||||||
[XRT_HAND_JOINT_THUMB_METACARPAL] = {.position_offset = {.x = 0.03, .y = 0, .z = -0.033},
|
[XRT_HAND_JOINT_THUMB_METACARPAL] = {.position_offset = {.x = 0.03f, .y = 0, .z = -0.033f},
|
||||||
.axis_angle_offset = {0, DEG_TO_RAD(40), 0},
|
.axis_angle_offset = {0, DEG_TO_RAD(40), 0},
|
||||||
.bone_length = 0.037,
|
.bone_length = 0.037f,
|
||||||
.radius = 0.0175,
|
.radius = 0.0175f,
|
||||||
.joint_id = XRT_HAND_JOINT_THUMB_METACARPAL},
|
.joint_id = XRT_HAND_JOINT_THUMB_METACARPAL},
|
||||||
|
|
||||||
[XRT_HAND_JOINT_THUMB_PROXIMAL] = {.position_offset = XRT_VEC3_ZERO,
|
[XRT_HAND_JOINT_THUMB_PROXIMAL] = {.position_offset = XRT_VEC3_ZERO,
|
||||||
.axis_angle_offset = {0, DEG_TO_RAD(-12), 0},
|
.axis_angle_offset = {0, DEG_TO_RAD(-12), 0},
|
||||||
.bone_length = 0.038,
|
.bone_length = 0.038f,
|
||||||
.radius = 0.017,
|
.radius = 0.017f,
|
||||||
.joint_id = XRT_HAND_JOINT_THUMB_PROXIMAL},
|
.joint_id = XRT_HAND_JOINT_THUMB_PROXIMAL},
|
||||||
// no intermediate
|
// no intermediate
|
||||||
|
|
||||||
[XRT_HAND_JOINT_THUMB_DISTAL] = {.position_offset = XRT_VEC3_ZERO,
|
[XRT_HAND_JOINT_THUMB_DISTAL] = {.position_offset = XRT_VEC3_ZERO,
|
||||||
.axis_angle_offset = {0, 0, 0},
|
.axis_angle_offset = {0, 0, 0},
|
||||||
.bone_length = 0.028,
|
.bone_length = 0.028f,
|
||||||
.radius = 0.017,
|
.radius = 0.017f,
|
||||||
.joint_id = XRT_HAND_JOINT_THUMB_DISTAL},
|
.joint_id = XRT_HAND_JOINT_THUMB_DISTAL},
|
||||||
|
|
||||||
[XRT_HAND_JOINT_THUMB_TIP] = {.position_offset = XRT_VEC3_ZERO,
|
[XRT_HAND_JOINT_THUMB_TIP] = {.position_offset = XRT_VEC3_ZERO,
|
||||||
.axis_angle_offset = {0, 0, 0},
|
.axis_angle_offset = {0, 0, 0},
|
||||||
.bone_length = 0,
|
.bone_length = 0,
|
||||||
.radius = 0.016,
|
.radius = 0.016f,
|
||||||
.joint_id = XRT_HAND_JOINT_THUMB_TIP}};
|
.joint_id = XRT_HAND_JOINT_THUMB_TIP}};
|
||||||
|
|
||||||
inline static void
|
inline static void
|
||||||
|
|
|
@ -17,6 +17,7 @@
|
||||||
#include <iterator>
|
#include <iterator>
|
||||||
#include <type_traits>
|
#include <type_traits>
|
||||||
|
|
||||||
|
|
||||||
using xrt::auxiliary::util::RandomAccessIteratorBase;
|
using xrt::auxiliary::util::RandomAccessIteratorBase;
|
||||||
using xrt::auxiliary::util::detail::RingBufferHelper;
|
using xrt::auxiliary::util::detail::RingBufferHelper;
|
||||||
using id_value_type = uint64_t;
|
using id_value_type = uint64_t;
|
||||||
|
@ -111,16 +112,16 @@ static_assert(std::is_same<typename std::iterator_traits<IdRingbufferIterator>::
|
||||||
"Iterator should be random access");
|
"Iterator should be random access");
|
||||||
} // namespace
|
} // namespace
|
||||||
|
|
||||||
#define DEFAULT_CATCH(RETURNVAL) \
|
#define DEFAULT_CATCH(...) \
|
||||||
catch (std::exception const &e) \
|
catch (std::exception const &e) \
|
||||||
{ \
|
{ \
|
||||||
U_LOG_E("Caught exception: %s", e.what()); \
|
U_LOG_E("Caught exception: %s", e.what()); \
|
||||||
return RETURNVAL; \
|
return __VA_ARGS__; \
|
||||||
} \
|
} \
|
||||||
catch (...) \
|
catch (...) \
|
||||||
{ \
|
{ \
|
||||||
U_LOG_E("Caught exception"); \
|
U_LOG_E("Caught exception"); \
|
||||||
return RETURNVAL; \
|
return __VA_ARGS__; \
|
||||||
}
|
}
|
||||||
|
|
||||||
struct u_id_ringbuffer *
|
struct u_id_ringbuffer *
|
||||||
|
@ -277,7 +278,7 @@ handleAlgorithmResult(IdRingbufferIterator it, uint64_t *out_id, uint32_t *out_i
|
||||||
*out_id = *it;
|
*out_id = *it;
|
||||||
}
|
}
|
||||||
if (out_index != nullptr) {
|
if (out_index != nullptr) {
|
||||||
*out_index = it.index();
|
*out_index = static_cast<uint32_t>(it.index());
|
||||||
}
|
}
|
||||||
return it.inner_index();
|
return it.inner_index();
|
||||||
}
|
}
|
||||||
|
|
|
@ -19,12 +19,12 @@ extern "C" {
|
||||||
* @defgroup aux_pretty Pretty printing functions.
|
* @defgroup aux_pretty Pretty printing functions.
|
||||||
*
|
*
|
||||||
* Multiple modules implement additional pretty printing functions like
|
* Multiple modules implement additional pretty printing functions like
|
||||||
* @ref st_oxr.
|
* @ref oxr_api.
|
||||||
*
|
*
|
||||||
* Some functions have a `_indented` suffix added to them, this means that what
|
* Some functions have a `_indented` suffix added to them, this means that what
|
||||||
* they print starts indented, but also they start with a newline. This is so
|
* they print starts indented, but also they start with a newline. This is so
|
||||||
* they can easily be chained together to form a debug message printing out
|
* they can easily be chained together to form a debug message printing out
|
||||||
* various information. Most the final logging functions in Monado inserts a
|
* various information. Most of the final logging functions in Monado inserts a
|
||||||
* newline at the end of the message and we don't want two to be inserted.
|
* newline at the end of the message and we don't want two to be inserted.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
|
@ -49,7 +49,7 @@ public:
|
||||||
}
|
}
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* @copydoc u_worker_thread_pool_create.
|
* @copydoc u_worker_thread_pool_create
|
||||||
*/
|
*/
|
||||||
SharedThreadPool(uint32_t starting_worker_count, uint32_t thread_count)
|
SharedThreadPool(uint32_t starting_worker_count, uint32_t thread_count)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue