-
Notifications
You must be signed in to change notification settings - Fork 0
/
vrpn_ADBox.h
48 lines (35 loc) · 1.08 KB
/
vrpn_ADBox.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
// -*- 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 <[email protected]>
*/
#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