Monado OpenXR Runtime
Macros | Functions
hdk_device.cpp File Reference

Driver for an OSVR Hacker Dev Kit device. More...

#include <math.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <assert.h>
#include <type_traits>
#include "xrt/xrt_device.h"
#include "math/m_api.h"
#include "util/u_debug.h"
#include "util/u_misc.h"
#include "util/u_device.h"
#include "util/u_time.h"
#include "os/os_hid.h"
#include "hdk_device.h"
Include dependency graph for hdk_device.cpp:

Macros

#define HDK_SIN_PI_OVER_4   0.7071068f
 
#define HDK_DEBUG_INT(hd, name, val)   HDK_DEBUG(hd, "\t%s = %u", name, val)
 
#define HDK_DEBUG_MM(hd, name, val)
 
#define HDK_DEBUG_ANGLE(hd, name, val)
 
#define HDK_DEBUG_MAT2X2(hd, name, rot)
 

Functions

struct hdk_devicehdk_device_create (struct os_hid_device *dev, enum HDK_VARIANT variant, bool print_spew, bool print_debug)
 

Detailed Description

Driver for an OSVR Hacker Dev Kit device.

Based in part on the corresponding VRPN driver, available under BSL-1.0.

Author
Ryan Pavlik ryan..nosp@m.pavl.nosp@m.ik@co.nosp@m.llab.nosp@m.ora.c.nosp@m.om
Kevin M. Godby kevin.nosp@m.@god.nosp@m.by.or.nosp@m.g

Macro Definition Documentation

◆ HDK_DEBUG_ANGLE

#define HDK_DEBUG_ANGLE (   hd,
  name,
  val 
)
Value:
HDK_DEBUG(hd, "\t%s = %f (%i)", name, val, \
(int32_t)(val * (180 / M_PI)))

◆ HDK_DEBUG_MAT2X2

#define HDK_DEBUG_MAT2X2 (   hd,
  name,
  rot 
)
Value:
HDK_DEBUG(hd, "\t%s = {%f, %f} {%f, %f}", name, rot.v[0], rot.v[1], \
rot.v[2], rot.v[3])

◆ HDK_DEBUG_MM

#define HDK_DEBUG_MM (   hd,
  name,
  val 
)
Value:
HDK_DEBUG(hd, "\t%s = %i.%02imm", name, (int32_t)(val * 1000.f), \
abs((int32_t)(val * 100000.f)) % 100)