0 Star 0 Fork 1

ianaxe/vrpn

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
vrpn_ADBox.h 1.08 KB
一键复制 编辑 原始数据 按行查看 历史
// -*- Mode:C++ -*-
/*
* ad-box driver
* works with Fraunhofer IMK AD-Box and Fakespace Cubic Mouse
*
* for additional information see:
* http://www.imk.fraunhofer.de
* http://www.fakespace.com
*
* written by Sascha Scholz <sascha.scholz@imk.fraunhofer.de>
*/
#ifndef VRPN_ADBOX_H
#define VRPN_ADBOX_H
#include "vrpn_Analog.h" // for vrpn_Analog
#include "vrpn_Button.h" // for VRPN_BUTTON_BUF_SIZE, etc
#include "vrpn_Configure.h" // for VRPN_API
#include "vrpn_Shared.h" // for timeval
class VRPN_API vrpn_Connection;
class VRPN_API vrpn_ADBox : public vrpn_Analog, public vrpn_Button_Filter {
public:
vrpn_ADBox(char* name, vrpn_Connection *c,
const char *port="/dev/ttyS1/", long baud=9600);
~vrpn_ADBox();
void mainloop();
private:
int ready;
struct timeval timestamp; // time of the last report from the device
int serial_fd;
unsigned char buffer[VRPN_BUTTON_BUF_SIZE];
int iNumBytes;
int iNumDigBytes;
int iFilter[8][30];
int iFilterPos;
};
#endif // #ifndef VRPN_ADBOX
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
C
1
https://gitee.com/ianaxe/vrpn.git
git@gitee.com:ianaxe/vrpn.git
ianaxe
vrpn
vrpn
master

搜索帮助