Skip to content

Commit 6d6f5f4

Browse files
authored
Merge pull request #71 from mkikets99/master
Founded Rainbow Cycle for g712lw
2 parents 7831349 + c7c8bc4 commit 6d6f5f4

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

src/rogauracore.c

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -191,6 +191,20 @@ multi_breathing(Arguments *args, Messages *outputs) {
191191
}
192192
}
193193

194+
void
195+
rainbow_cycle(Arguments *args, Messages *outputs) {
196+
static int ind_off = 0;
197+
V(printf("rainbow_cycle\n"));
198+
outputs->nMessages = 4;
199+
for (int i = 0; i < 6; ++i) {
200+
uint8_t *m = outputs->messages[i];
201+
initMessage(m);
202+
m[3] = 3;
203+
m[4] = 0xff;
204+
m[7] = speedByteValue(args->scalars[0]);
205+
}
206+
}
207+
194208
void
195209
set_brightness(Arguments *args, Messages *outputs) {
196210
V(printf("single_static\n"));
@@ -294,6 +308,7 @@ const FunctionRecord FUNCTION_RECORDS[] = {
294308
{"single_colorcycle", &single_colorcycle, 0, 1, {SPEED}},
295309
{"multi_static", &multi_static, 4, 0},
296310
{"multi_breathing", &multi_breathing, 4, 1, {SPEED}},
311+
{"rainbow_cycle", &rainbow_cycle, 0, 1, {SPEED}},
297312
{"red", &red, 0, 0},
298313
{"green", &green, 0, 0},
299314
{"blue", &blue, 0, 0},

0 commit comments

Comments
 (0)