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