-
-
Notifications
You must be signed in to change notification settings - Fork 220
/
Copy pathRGBController_RoccatVulcanAimo.cpp
258 lines (237 loc) · 6.75 KB
/
RGBController_RoccatVulcanAimo.cpp
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
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
/*-----------------------------------------*\
| RGBController_RoccatVulcanAimo.cpp |
| |
| Generic RGB Interface for OpenRGB |
| |
| |
| Mola19 17/12/2021 |
\*-----------------------------------------*/
#include "RGBController_RoccatVulcanAimo.h"
#include <vector>
#define NA 0xFFFFFFFF
/*
original entry, maybe en_US ?
static unsigned int matrix_map[6][22] =
{ { 0, NA, 11, 17, 23, 28, NA, 48, 53, 59, 65, 78, 84, 85, 86, 99, 103, 108, NA, NA, NA, NA },
{ 1, 6, 12, 18, 24, 29, 33, 49, 54, 60, 66, 72, 79, 87, NA, 100, 104, 109, 113, 119, 124, 129 },
{ 2, NA, 7, 13, 19, 25, 30, 34, 50, 55, 61, 67, 73, 80, NA, 101, 105, 110, 114, 120, 125, 130 },
{ 3, NA, 8, 14, 20, 26, 31, 35, 51, 56, 62, 68, 74, 96, 88, NA, NA, NA, 115, 121, 126, NA },
{ 4, NA, 9, 15, 21, 27, 32, 36, 52, 57, 63, 69, 75, 82, NA, NA, 106, NA, 116, 122, 127, 131 },
{ 5, 10, 16, NA, NA, NA, 37, NA, NA, NA, NA, 70, 76, 83, 89, 102, 107, 111, 117, NA, 128, NA } };
*/
/* de_DE layout: */
static unsigned int matrix_map[6][22] =
{ { 0, NA, 11, 17, 23, 28, 48, 53, 59, 65, 78, 84, 85, 86, NA, 99, 103, 108, NA, NA, NA, NA },
{ 1, 6, 12, 18, 24, 29, 33, 49, 54, 60, 66, 72, 79, 87, NA, 100, 104, 109, 113, 119, 124, 129 },
{ 2, NA, 7, 13, 19, 25, 30, 34, 50, 55, 61, 67, 73, 80, 88, 101, 105, 110, 114, 120, 125, 130 },
{ 3, NA, 8, 14, 20, 26, 31, 35, 51, 56, 62, 68, 74, 96, NA, NA, NA, NA, 115, 121, 126, NA },
{ 4, NA, 9, 15, 21, 27, 32, 36, 52, 57, 63, 69, 75, 82, NA, NA, 106, NA, 116, 122, 127, 131 },
{ 5, 10, 16, NA, NA, NA, 37, NA, NA, NA, NA, 70, 76, 83, NA, 102, 107, 111, 117, NA, 128, NA } };
static const unsigned int zone_size = 132;
static const char *led_names[] =
{
"Key: Escape",
"Key: ^",
"Key: Tab",
"Key: Caps Lock",
"Key: Left Shift",
"Key: Left Control",
"Key: 1",
"Key: Q",
"Key: A",
"Key: <",
"Key: Left Windows",
"Key: F1",
"Key: 2",
"Key: W",
"Key: S",
"Key: Y",
"Key: Left Alt",
"Key: F2",
"Key: 3",
"Key: E",
"Key: D",
"Key: X",
"Unused",
"Key: F3",
"Key: 4",
"Key: R",
"Key: F",
"Key: C",
"Key: F4",
"Key: 5",
"Key: T",
"Key: G",
"Key: V",
"Key: 6",
"Key: Z",
"Key: H",
"Key: B",
"Key: Space",
"Unused",
"Unused",
"Unused",
"Unused",
"Unused",
"Unused",
"Unused",
"Unused",
"Unused",
"Unused",
"Key: F5",
"Key: 7",
"Key: U",
"Key: J",
"Key: N",
"Key: F6",
"Key: 8",
"Key: I",
"Key: K",
"Key: M",
"Unused",
"Key: F7",
"Key: 9",
"Key: O",
"Key: L",
"Key: ,",
"Unused",
"Key: F8",
"Key: 0",
"Key: P",
"Key: Ö",
"Key: .",
"Key: Right Alt",
"Unused",
"Key: ß",
"Key: Ü",
"Key: Ä",
"Key: -",
"Key: Right Fn",
"Unused",
"Key: F9",
"Key: ´",
"Key: +",
"Unused",
"Key: Right Shift",
"Key: Menu",
"Key: F10",
"Key: F11",
"Key: F12",
"Key: Backspace",
"Key: Enter",
"Key: Right Control",
"Unused",
"Unused",
"Unused",
"Unused",
"Unused",
"Unused",
"Key: #",
"Unused",
"Unused",
"Key: Print Screen",
"Key: Insert",
"Key: Delete",
"Key: Left Arrow",
"Key: Scroll Lock",
"Key: Home",
"Key: End",
"Key: Up Arrow",
"Key: Down Arrow",
"Key: Pause/Break",
"Key: Page Up",
"Key: Page Down",
"Key: Right Arrow",
"Unused",
"Key: Num Lock",
"Key: Number Pad 7",
"Key: Number Pad 4",
"Key: Number Pad 1",
"Key: Number Pad 0",
"Unused",
"Key: Number Pad /",
"Key: Number Pad 8",
"Key: Number Pad 5",
"Key: Number Pad 2",
"Unused",
"Key: Number Pad *",
"Key: Number Pad 9",
"Key: Number Pad 6",
"Key: Number Pad 3",
"Key: Number Pad ,",
"Key: Number Pad -",
"Key: Number Pad +",
"Key: Number Pad Enter",
};
RGBController_RoccatVulcanAimo::RGBController_RoccatVulcanAimo(RoccatVulcanAimoController* controller_ptr)
{
controller = controller_ptr;
name = "Roccat Vulcan 120 Aimo";
vendor = "Roccat";
type = DEVICE_TYPE_KEYBOARD;
description = "Roccat Vulcan Aimo Keyboard";
location = controller->GetLocation();
serial = controller->GetSerial();
mode Direct;
Direct.name = "Direct";
Direct.flags = MODE_FLAG_HAS_PER_LED_COLOR;
Direct.color_mode = MODE_COLORS_PER_LED;
modes.push_back(Direct);
SetupZones();
}
RGBController_RoccatVulcanAimo::~RGBController_RoccatVulcanAimo()
{
delete controller;
}
void RGBController_RoccatVulcanAimo::SetupZones()
{
/*---------------------------------------------------------*\
| Set up zones and leds per zone |
\*---------------------------------------------------------*/
zone new_zone;
new_zone.name = "Keyboard";
new_zone.type = ZONE_TYPE_MATRIX;
new_zone.leds_min = zone_size;
new_zone.leds_max = zone_size;
new_zone.leds_count = zone_size;
new_zone.matrix_map = new matrix_map_type;
new_zone.matrix_map->height = 6;
new_zone.matrix_map->width = 22;
new_zone.matrix_map->map = (unsigned int *)&matrix_map;
zones.push_back(new_zone);
for(unsigned int led_idx = 0; led_idx < zone_size; led_idx++)
{
led new_led;
new_led.name = led_names[led_idx];
leds.push_back(new_led);
}
SetupColors();
}
void RGBController_RoccatVulcanAimo::ResizeZone(int /*zone*/, int /*new_size*/)
{
/*---------------------------------------------------------*\
| This device does not support resizing zones |
\*---------------------------------------------------------*/
}
void RGBController_RoccatVulcanAimo::DeviceUpdateLEDs()
{
controller->SendColors(colors);
}
void RGBController_RoccatVulcanAimo::UpdateZoneLEDs(int /*zone_idx*/)
{
DeviceUpdateLEDs();
}
void RGBController_RoccatVulcanAimo::UpdateSingleLED(int /*led_idx*/)
{
DeviceUpdateLEDs();
}
void RGBController_RoccatVulcanAimo::SetCustomMode()
{
active_mode = 0;
}
void RGBController_RoccatVulcanAimo::DeviceUpdateMode()
{
/*---------------------------------------------------------*\
| Changing modes is currently not implemented |
\*---------------------------------------------------------*/
}