OpenGloves device implementation.
More...
|
#define | OPENGLOVES_TRACE(d, ...) U_LOG_XDEV_IFL_T(&d->base, d->log_level, __VA_ARGS__) |
|
#define | OPENGLOVES_DEBUG(d, ...) U_LOG_XDEV_IFL_D(&d->base, d->log_level, __VA_ARGS__) |
|
#define | OPENGLOVES_INFO(d, ...) U_LOG_XDEV_IFL_I(&d->base, d->log_level, __VA_ARGS__) |
|
#define | OPENGLOVES_WARN(d, ...) U_LOG_XDEV_IFL_W(&d->base, d->log_level, __VA_ARGS__) |
|
#define | OPENGLOVES_ERROR(d, ...) U_LOG_XDEV_IFL_E(&d->base, d->log_level, __VA_ARGS__) |
|
|
enum | opengloves_input_index {
OPENGLOVES_INPUT_INDEX_HAND_TRACKING
, OPENGLOVES_INPUT_INDEX_TRIGGER_CLICK
, OPENGLOVES_INPUT_INDEX_TRIGGER_VALUE
, OPENGLOVES_INPUT_INDEX_A_CLICK
,
OPENGLOVES_INPUT_INDEX_B_CLICK
, OPENGLOVES_INPUT_INDEX_JOYSTICK_MAIN
, OPENGLOVES_INPUT_INDEX_JOYSTICK_MAIN_CLICK
, OPENGLOVES_INPUT_INDEX_COUNT
} |
|
enum | opengloves_output_index { OPENGLOVES_OUPUT_INDEX_FORCE_FEEDBACK
, OPENGLOVES_OUTPUT_INDEX_COUNT
} |
|
|
static struct opengloves_device * | opengloves_device (struct xrt_device *xdev) |
|
static void | opengloves_device_get_hand_tracking (struct xrt_device *xdev, enum xrt_input_name name, int64_t requested_timestamp_ns, struct xrt_hand_joint_set *out_joint_set, int64_t *out_timestamp_ns) |
|
static xrt_result_t | opengloves_device_update_inputs (struct xrt_device *xdev) |
|
static void | opengloves_ffb_location_convert (const struct xrt_output_force_feedback *xrt_ffb, struct opengloves_output_force_feedback *out_ffb) |
|
static void | opengloves_device_set_output (struct xrt_device *xdev, enum xrt_output_name name, const union xrt_output_value *value) |
|
static void | opengloves_device_destroy (struct xrt_device *xdev) |
|
static bool | opengloves_read_next_packet (struct opengloves_device *od, char *buffer, int buffer_len) |
| Reads the next packet from the device, finishing successfully when reaching a newline Returns true if finished at a newline, or false if there was an error. More...
|
|
static void * | opengloves_run_thread (void *ptr) |
| Main thread for reading data from the device. More...
|
|
struct xrt_device * | opengloves_device_create (struct opengloves_communication_device *ocd, enum xrt_hand hand) |
|
OpenGloves device implementation.
- Author
- Daniel Willmott web@d.nosp@m.an-w.nosp@m..com
◆ opengloves_read_next_packet()
Reads the next packet from the device, finishing successfully when reaching a newline Returns true if finished at a newline, or false if there was an error.
References os_thread_helper::os_thread_helper_lock().
◆ opengloves_run_thread()
static void * opengloves_run_thread |
( |
void * |
ptr | ) |
|
|
static |
Main thread for reading data from the device.