Details | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
127 | ligi | 1 | /************************************************** |
2 | * |
||
3 | * |
||
4 | * Riddim |
||
5 | * Remote Interactive Digital Drone Interface Mashup |
||
6 | * |
||
7 | * 2008 Marcus -LiGi- Bueschleb |
||
8 | * |
||
9 | * |
||
10 | **************************************************/ |
||
11 | |||
483 | ligi | 12 | #if !defined(RIDDIM_H) |
13 | #define RIDDIM_H |
||
14 | |||
15 | |||
16 | |||
17 | #define RIDDIM_VERSION_MAJOR 0 |
||
18 | #define RIDDIM_VERSION_MINOR 7 |
||
19 | |||
127 | ligi | 20 | // for config file parsing |
21 | #include <confuse.h> |
||
22 | #include <string.h> |
||
23 | |||
130 | ligi | 24 | |
25 | // for configuration file parsing |
||
26 | #include "config.h" |
||
27 | // for measuring |
||
28 | #include "statistics.h" |
||
127 | ligi | 29 | // for understanding the FC |
30 | #include "fc.h" |
||
31 | #include "bluetooth_handler.h" |
||
140 | ligi | 32 | |
130 | ligi | 33 | #include "evdev_handler.h" |
127 | ligi | 34 | |
140 | ligi | 35 | #include "joy_handler.h" |
36 | |||
127 | ligi | 37 | #include <stdio.h> |
38 | #include <stdlib.h> |
||
39 | #include <fcntl.h> |
||
40 | |||
41 | |||
42 | #include "lib/x52/x52.h" |
||
43 | |||
44 | #include <sys/socket.h> |
||
45 | |||
46 | |||
47 | #include <sys/time.h> |
||
48 | |||
49 | |||
50 | |||
483 | ligi | 51 | #include <sys/types.h> |
52 | #include <sys/dir.h> |
||
53 | #include <sys/param.h> |
||
54 | #include <stdio.h> |
||
127 | ligi | 55 | |
56 | |||
130 | ligi | 57 | |
483 | ligi | 58 | |
127 | ligi | 59 | #include <errno.h> |
60 | #include <sys/types.h> |
||
61 | #include <netinet/in.h> |
||
62 | #include <unistd.h>//for close() for socket |
||
63 | |||
64 | |||
65 | int act_nick=0; |
||
66 | int act_roll=0; |
||
67 | int act_gier=0; |
||
68 | int act_gas=0; |
||
69 | int act_mode=0; |
||
70 | |||
130 | ligi | 71 | |
72 | |||
73 | #define FALSE 0 |
||
74 | #define TRUE 1 |
||
75 | |||
127 | ligi | 76 | #define STATEID_SCANNING 0 |
77 | #define STATEID_CONNECTING 1 |
||
78 | |||
130 | ligi | 79 | |
127 | ligi | 80 | #define BUTTON_SELECT 26 |
81 | #define BUTTON_DOWN 28 |
||
82 | #define BUTTON_UP 27 |
||
83 | |||
84 | |||
85 | // #define AXIS_ROLL 0 |
||
86 | // #define AXIS_NICK 1 |
||
87 | // #define AXIS_GIER 5 |
||
88 | // #define AXIS_GAS 2 |
||
89 | |||
90 | |||
91 | |||
92 | // for x52 |
||
93 | /* |
||
94 | #define AXIS_ROLL 4 |
||
95 | #define AXIS_NICK 3 |
||
96 | #define AXIS_GIER 5 |
||
97 | #define AXIS_GAS 2 |
||
98 | |||
99 | #define INVERT_ROLL -1 |
||
100 | #define INVERT_NICK -1 |
||
101 | #define INVERT_GIER 1 |
||
102 | #define INVERT_GAS -1 |
||
103 | */ |
||
104 | |||
105 | #define AXIS_ROLL 0 |
||
106 | #define AXIS_NICK 1 |
||
107 | #define AXIS_GIER 3 |
||
108 | #define AXIS_GAS 2 |
||
109 | |||
110 | #define INVERT_ROLL 1 |
||
111 | #define INVERT_NICK -1 |
||
112 | #define INVERT_GIER 1 |
||
113 | #define INVERT_GAS -1 |
||
114 | |||
115 | |||
116 | #define INPUT_NONE 0 |
||
117 | #define INPUT_JOYDEV 1 |
||
118 | #define INPUT_EVDEV 2 |
||
483 | ligi | 119 | |
120 | |||
121 | #endif |