代码拉取完成,页面将自动刷新
同步操作将从 ianaxe/vrpn 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
#pragma once
#include <stddef.h> // for size_t
#include "vrpn_Analog.h" // for vrpn_Analog
#include "vrpn_Button.h" // for vrpn_Button_Filter
#include "vrpn_HumanInterface.h" // for vrpn_HidAcceptor (ptr only), etc
#if defined(VRPN_USE_HID)
// Device drivers for the nVidia Shield controller line of products
// Currently supported: Shield controller plugged into USB
class vrpn_nVidia_shield: public vrpn_BaseClass, protected vrpn_HidInterface {
public:
vrpn_nVidia_shield(vrpn_HidAcceptor *filter, const char *name, vrpn_Connection *c = 0,
vrpn_uint16 vendor = 0, vrpn_uint16 product = 0);
virtual ~vrpn_nVidia_shield(void);
virtual void mainloop(void) = 0;
protected:
// Set up message handlers, etc.
void init_hid(void);
void on_data_received(size_t bytes, vrpn_uint8 *buffer);
virtual void decodePacket(size_t bytes, vrpn_uint8 *buffer) = 0;
struct timeval d_timestamp;
vrpn_HidAcceptor *d_filter;
// No actual types to register, derived classes will be buttons or analogs
int register_types(void) { return 0; }
};
class vrpn_nVidia_shield_USB: protected vrpn_nVidia_shield,
public vrpn_Analog, public vrpn_Button_Filter {
public:
vrpn_nVidia_shield_USB(const char *name, vrpn_Connection *c = 0);
virtual ~vrpn_nVidia_shield_USB(void) {};
virtual void mainloop(void);
protected:
// Send report iff changed
void report_changes (vrpn_uint32 class_of_service = vrpn_CONNECTION_LOW_LATENCY);
// Send report whether or not changed
void report (vrpn_uint32 class_of_service = vrpn_CONNECTION_LOW_LATENCY);
void decodePacket(size_t bytes, vrpn_uint8 *buffer);
};
class vrpn_nVidia_shield_stealth_USB: protected vrpn_nVidia_shield,
public vrpn_Analog, public vrpn_Button_Filter {
public:
vrpn_nVidia_shield_stealth_USB(const char *name, vrpn_Connection *c = 0);
virtual ~vrpn_nVidia_shield_stealth_USB(void) {};
virtual void mainloop(void);
protected:
// Send report iff changed
void report_changes (vrpn_uint32 class_of_service = vrpn_CONNECTION_LOW_LATENCY);
// Send report whether or not changed
void report (vrpn_uint32 class_of_service = vrpn_CONNECTION_LOW_LATENCY);
void decodePacket(size_t bytes, vrpn_uint8 *buffer);
};
// end of VRPN_USE_HID
#else
class VRPN_API vrpn_nVidia_shield;
class VRPN_API vrpn_nVidia_shield_USB;
class VRPN_API vrpn_nVidia_shield_stealth_USB;
#endif
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。