1 Star 0 Fork 1

upczap/vrpn

forked from ianaxe/vrpn 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
vrpn_raw_sgibox.h 1.41 KB
一键复制 编辑 原始数据 按行查看 历史
Russ Taylor 提交于 2015-04-04 14:19 . Fixing compiler warnings on the mac.
/* vrpn_raw_sgibox.h
*
* This file describes the interface to an SGI dial & button box that
* is connected through a serial interface. This allows the control of
* the boxes without going through the SGI GL library, rather using the
* serial interface to connect with the device.
*/
#ifndef VRPN_RAW_SGIBOX
#define VRPN_RAW_SGIBOX
#include "vrpn_Configure.h" // for VRPN_API
#include "vrpn_Analog.h"
#include "vrpn_Dial.h"
#include "vrpn_Button.h"
class VRPN_API vrpn_Connection;
/* Number of buttons and number of dials on sgi button/dial boxes */
#define vrpn_SGI_NUM_BUTTONS (32)
#define vrpn_SGI_NUM_DIALS (8)
#define vrpn_SGI_NUMDEVS (vrpn_SGI_NUM_BUTTONS+vrpn_SGI_NUM_DIALS)
class VRPN_API vrpn_raw_SGIBox :public vrpn_Analog, public vrpn_Dial, public vrpn_Button_Filter {
public:
vrpn_raw_SGIBox(char * name, vrpn_Connection * c, char *serialDevName);
void mainloop();
int reset();
int send_light_command();
protected:
void get_report();
void check_press_bank(int base_button, unsigned char base_command,
unsigned char command);
void check_release_bank(int base_button, unsigned char base_command,
unsigned char command);
private:
int serialfd; // Serial port that has been opened
int mid_values[vrpn_SGI_NUM_DIALS]; //< Used to perform clamping
int last_values[vrpn_SGI_NUM_DIALS]; //< Used by dial reporting code
};
#endif // VRPN_RAW_SGIBOX
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
C
1
https://gitee.com/jari/vrpn.git
[email protected]:jari/vrpn.git
jari
vrpn
vrpn
master

搜索帮助