-
Notifications
You must be signed in to change notification settings - Fork 22
/
wheels.h
144 lines (134 loc) · 3.15 KB
/
wheels.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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
/*
* ltwheelconf - configure logitech racing wheels
*
* Copyright (C) 2011 Michael Bauer <michael@m-bauer.org>
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
#ifndef wheels_h
#define wheels_h
#define VID_LOGITECH 0x046d
typedef struct {
// reserve space for max. 4 command strings, 8 chars each
unsigned char cmds[4][8];
// how many command strings are actually used
unsigned int numCmds;
} cmdstruct;
typedef struct {
char shortname[255];
char name[255];
unsigned int restricted_pid;
unsigned int native_pid;
unsigned int min_rotation;
unsigned int max_rotation;
unsigned int revision; /* aka bcdDevice - Device Release Number according to HID specs */
int (*get_nativemode_cmd)(cmdstruct *c);
int (*get_range_cmd)(cmdstruct *c, int range);
int (*get_autocenter_cmd)(cmdstruct *c, int centerforce, int rampspeed);
}wheelstruct;
int get_nativemode_cmd_DFP(cmdstruct *c);
int get_nativemode_cmd_DFGT(cmdstruct *c);
int get_nativemode_cmd_G25(cmdstruct *c);
int get_nativemode_cmd_G27(cmdstruct *c);
int get_range_cmd(cmdstruct *c, int range);
int get_range_cmd2(cmdstruct *c, int range);
int get_autocenter_cmd(cmdstruct *c, int centerforce, int rampspeed);
static const wheelstruct wheels[] = {
{
"DF",
"Driving Force",
0xc294,
0xc294,
40,
240,
0,
0,
0,
0
},
{
"MR",
"Momo Racing",
0xcA03,
0xcA03,
40,
240,
0x0019,
0,
0,
&get_autocenter_cmd
},
{
"MF",
"Momo Force",
0xc294,
0xc295,
40,
240,
0,
0,
0,
0
},
{
"DFP",
"Driving Force Pro",
0xc294,
0xc298,
0,
900,
0x1106,
&get_nativemode_cmd_DFP,
&get_range_cmd2,
&get_autocenter_cmd
},
{
"G25",
"G25",
0xc294,
0xc299,
40,
900,
0x1222,
&get_nativemode_cmd_G25,
&get_range_cmd,
&get_autocenter_cmd
},
{
"DFGT",
"Driving Force GT",
0xc294,
0xc29A,
40,
900,
0,
&get_nativemode_cmd_DFGT,
&get_range_cmd,
&get_autocenter_cmd
},
{
"G27",
"G27",
0xc294,
0xc29B,
40,
900,
0,
&get_nativemode_cmd_G27,
&get_range_cmd,
&get_autocenter_cmd
}
};
#endif