Monado OpenXR Runtime
Data Structures
psmv_driver.c File Reference

PlayStation Move motion controller prober and driver code. More...

#include "xrt/xrt_prober.h"
#include "xrt/xrt_tracking.h"
#include "os/os_threading.h"
#include "os/os_hid.h"
#include "math/m_api.h"
#include "math/m_imu_pre.h"
#include "tracking/t_imu.h"
#include "util/u_var.h"
#include "util/u_time.h"
#include "util/u_misc.h"
#include "util/u_debug.h"
#include "util/u_device.h"
#include "psmv_interface.h"
#include <stdio.h>
#include <math.h>
#include <assert.h>
Include dependency graph for psmv_driver.c:

Data Structures

struct  psmv_set_led
 Led setting packet. More...
 
struct  psmv_f32_wire
 Wire encoding of a single 32 bit float, "little" endian. More...
 
struct  psmv_vec3_f32_wire
 Wire encoding of three 32 bit float, "little" endian. More...
 
struct  psmv_u16_wire
 Wire encoding of a single 16 bit integer, little endian. More...
 
struct  psmv_vec3_u16_wire
 Wire encoding of three 16 bit integers, little endian. More...
 
struct  psmv_i16_wire
 Wire encoding of a single 16 bit integer, little endian. More...
 
struct  psmv_vec3_i16_wire
 Wire encoding of three 16 bit integers, little endian. More...
 
struct  psmv_calibration_part
 Part of a calibration data, multiple packets make up a single data packet. More...
 
struct  psmv_calibration_zcm1
 Calibration data, multiple packets goes into this. More...
 
struct  psmv_parsed_calibration_zcm1
 Parsed calibration data from a ZCM1 device. More...
 
struct  psmv_calibration_zcm2
 Calibration data, multiple packets goes into this. More...
 
struct  psmv_parsed_calibration_zcm2
 Parsed calibration data from a ZCM2 device. More...
 
struct  psmv_input_zcm1
 Input package for ZCM1. More...
 
struct  psmv_input_zcm2
 Input package for ZCM2. More...
 
struct  psmv_parsed_sample
 A parsed sample of accel and gyro. More...
 
struct  psmv_parsed_input
 A parsed input packet. More...
 
struct  psmv_device
 A single PlayStation Move Controller. More...
 
#define PSMV_SPEW(p, ...)
 
#define PSMV_DEBUG(p, ...)
 
#define PSMV_ERROR(p, ...)
 
#define SET_INPUT(NAME)   (psmv->base.inputs[PSMV_INDEX_##NAME].name = XRT_INPUT_PSMV_##NAME)
 
enum  psmv_input_index {
  PSMV_INDEX_PS_CLICK, PSMV_INDEX_MOVE_CLICK, PSMV_INDEX_START_CLICK, PSMV_INDEX_SELECT_CLICK,
  PSMV_INDEX_SQUARE_CLICK, PSMV_INDEX_CROSS_CLICK, PSMV_INDEX_CIRCLE_CLICK, PSMV_INDEX_TRIANGLE_CLICK,
  PSMV_INDEX_TRIGGER_VALUE, PSMV_INDEX_BODY_CENTER_POSE, PSMV_INDEX_BALL_CENTER_POSE, PSMV_INDEX_BALL_TIP_POSE
}
 Indecies where each input is in the input list. More...
 
enum  psmv_button_bit {
  PSMV_BUTTON_BIT_MOVE_F2 = (1 << 6), PSMV_BUTTON_BIT_TRIGGER_F2 = (1 << 7), PSMV_BUTTON_BIT_PS = (1 << 8), PSMV_BUTTON_BIT_MOVE_F1 = (1 << 11),
  PSMV_BUTTON_BIT_TRIGGER_F1 = (1 << 12), PSMV_BUTTON_BIT_TRIANGLE = (1 << 20), PSMV_BUTTON_BIT_CIRCLE = (1 << 21), PSMV_BUTTON_BIT_CROSS = (1 << 22),
  PSMV_BUTTON_BIT_SQUARE = (1 << 23), PSMV_BUTTON_BIT_START = (1 << 27), PSMV_BUTTON_BIT_SELECT = (1 << 24), PSMV_BUTTON_BIT_MOVE_ANY,
  PSMV_BUTTON_BIT_TRIGGER_ANY
}
 Mask for the button in the button uint32_t. More...
 
int psmv_found (struct xrt_prober *xp, struct xrt_prober_device **devices, size_t num_devices, size_t index, struct xrt_device **out_xdevs)
 Probing function for the PS Move devices. More...
 

Detailed Description

PlayStation Move motion controller prober and driver code.

Author
Jakob Bornecrantz jakob.nosp@m.@col.nosp@m.labor.nosp@m.a.co.nosp@m.m
Ryan Pavlik ryan..nosp@m.pavl.nosp@m.ik@co.nosp@m.llab.nosp@m.ora.c.nosp@m.om