Skip to content

Packet Structure

Stephen Bird edited this page Jul 8, 2018 · 23 revisions

uint16 is all little endian

A Note on transitions:

When you want to transition, by default, the colors will move from one to another (some kind of smoothing basically)

So say you have #0000FF as the Up Hold Level and the #FF0000 as Down Hold Level - the color will move between these two, so you'll see a flash of white and a blank in between. To avoid this, you can set Down Minimum Level or Up Maximum Level - so under the previous condition if i set one of these to #000000, then i wont see that flash of white, and if i set both of them to #000000 then i'll only flash between these two colors. Basically if the transition hits the maximum/minimum, it goes straight into the new color.

In order for a transition to happen, you must specify a hold delay

Index Type Name Description
0 Unknown
1 uint8 Packet Type The type of packet, 0x28 for light
2 Unknown
3 uint8 Channel RGB channel
4 uint8 Unknown With this set to 0x00 we don't get any changes...
5 uint8 Key Identifier Determines which portion of the keyboard to light up
6 uint8 Effect Id 0x00 = use hardware profile, 0x01 = stop animation, 0x02 = start animation
7 uint8 Up Maximum Level This is the lowest level that the color can reach.
8 uint8 Up Repeat Count Up-animation will repeat x times
9-10 uint16 Up Increment This is how much each tick should increase light level Down Hold Level to Up Hold Level
11-12 uint16 Up Increment Delay This is how long each tick should take as we move from from Down Hold Level to Up Hold Level ( n * 12 = y ms )
13 uint8 Up Hold Level A color channel brightness, can be the end or beginning depending on Effect Flag
14 uint8 Down Repeat Count Down-animation will repeat x times
15-16 uint16 Up Hold Delay How long should we sit at Up Hold Level. 0 > delay < 65535. 1 = 10ms
17 uint8 Down Minimum Level This is the lowest level that the color can reach.
18 uint8 Unknown If > 0x00, triggers something after a specific time when using UpHoldLevel
19-20 uint16 Down Decrement This seems to be how many steps from Down Hold Level to Down Minimum Level
21-22 uint16 Down Decrement Delay This is how long it takes to move from Down Hold Level to Down Minimum Level
23 uint8 Down Hold Level A color, can be the end or beginning depending on Effect Flag
24 uint8 Unknown If Down Hold Level is 0x00, this seems to be used as a "negative" Down Hold Level - 0xFF = off, 0x00 = max power
25-26 uint16 Down Hold Delay How long should we sit at Down Hold Level. 0 > delay < 65535. 1 = 10ms
27-28 uint16 Start Delay How long to wait before we apply the changes. 0 > delay < 65535. 1 = 10ms
29-30 uint16 Reserved
31-32 uint16 Effect Flag These two bytes change how/if the transitions take place. These are very important. Take a look at the code for the most information on them.
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
Clone this wiki locally