Compare commits
851
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
227fd375fb | ||
|
|
069eeccb60 | ||
|
|
da77b63bea | ||
|
|
791d8820d6 | ||
|
|
05fbe381dd | ||
|
|
3b2466ba10 | ||
|
|
acc7fa6754 | ||
|
|
394a5c8eb0 | ||
|
|
ac6d89b611 | ||
|
|
46cdd6fbe1 | ||
|
|
14d543b9e4 | ||
|
|
8a831cef04 | ||
|
|
9fd79b1ad2 | ||
|
|
c9c37a4576 | ||
|
|
fe53d90664 | ||
|
|
8e8a9c8e05 | ||
|
|
dafc6e9cbc | ||
|
|
68b113bf86 | ||
|
|
eb5d8b579c | ||
|
|
56df76dbfc | ||
|
|
878f32fccf | ||
|
|
63828313bd | ||
|
|
31992acad1 | ||
|
|
bd41ba3b5c | ||
|
|
b9309c61e1 | ||
|
|
7fc8aea930 | ||
|
|
b35e119325 | ||
|
|
8fb790358f | ||
|
|
39c6dbf361 | ||
|
|
9d189d5b9b | ||
|
|
9e5c63cc64 | ||
|
|
b664f35e17 | ||
|
|
381e3ac70c | ||
|
|
e3225d93c4 | ||
|
|
1b3480bf8a | ||
|
|
a6bea17df2 | ||
|
|
28d73d74bc | ||
|
|
cf383cacdd | ||
|
|
d9b0995b44 | ||
|
|
79eb758a52 | ||
|
|
75463b8772 | ||
|
|
5da92fca4e | ||
|
|
d11be2aa0b | ||
|
|
285a7bce4e | ||
|
|
21009cdc45 | ||
|
|
a0cee2ce2b | ||
|
|
ba33ff0c35 | ||
|
|
795616e62d | ||
|
|
baa033ff7f | ||
|
|
33ec03d129 | ||
|
|
a0d5a985f0 | ||
|
|
1275fe816b | ||
|
|
d4e1ed5245 | ||
|
|
b833a43490 | ||
|
|
94295c52ba | ||
|
|
f32aa29ecd | ||
|
|
623fdfe522 | ||
|
|
a122ccdc37 | ||
|
|
74219e502a | ||
|
|
73cd84f43c | ||
|
|
f5a8ecc3f4 | ||
|
|
86a6a130e7 | ||
|
|
703afac049 | ||
|
|
2d0ebb7279 | ||
|
|
d9b51e4a02 | ||
|
|
387fed4f79 | ||
|
|
df0137c2b0 | ||
|
|
7c059fa3e3 | ||
|
|
1a62db7246 | ||
|
|
3a0b93c774 | ||
|
|
1afe65d206 | ||
|
|
962754f379 | ||
|
|
e69c9eedae | ||
|
|
9182d1e566 | ||
|
|
893de3f076 | ||
|
|
4f1c623093 | ||
|
|
7846d22bd8 | ||
|
|
68ae9ef9d5 | ||
|
|
44641ca8a6 | ||
|
|
152f16b31c | ||
|
|
b87f7150fc | ||
|
|
831a7cf5eb | ||
|
|
f99843a550 | ||
|
|
35217bce51 | ||
|
|
00077347b4 | ||
|
|
b2c9ace9c8 | ||
|
|
fd7dbd618d | ||
|
|
103b5f27bb | ||
|
|
71c1ffe91c | ||
|
|
0154f3c5dc | ||
|
|
60bc375345 | ||
|
|
5a2dca1ced | ||
|
|
c80f3be283 | ||
|
|
52f757ced2 | ||
|
|
156b7d0f89 | ||
|
|
69a8c84b4d | ||
|
|
d30f3a5f03 | ||
|
|
2868f61766 | ||
|
|
5d1c990b18 | ||
|
|
e6eeb906b8 | ||
|
|
ea00807a06 | ||
|
|
95b1133395 | ||
|
|
d56a9133ab | ||
|
|
8c96bf03f5 | ||
|
|
79e546fa43 | ||
|
|
baed37ecc7 | ||
|
|
c0be211236 | ||
|
|
55506f984e | ||
|
|
d03ca67ae5 | ||
|
|
b7f8eeb034 | ||
|
|
e8e0362d85 | ||
|
|
e9f430d8ed | ||
|
|
a306cf815b | ||
|
|
7c0eba1dc3 | ||
|
|
5d20744653 | ||
|
|
7e74c295a3 | ||
|
|
d145ee38e7 | ||
|
|
0a39673b9d | ||
|
|
6e93443034 | ||
|
|
cb71627d29 | ||
|
|
35f10dfb48 | ||
|
|
04ef7a2c28 | ||
|
|
a58e79ba71 | ||
|
|
3a74c85be8 | ||
|
|
6e71cd39b9 | ||
|
|
248668ea7d | ||
|
|
496a7a3609 | ||
|
|
112b6a2b9b | ||
|
|
7c38dad1ab | ||
|
|
cd1c9c705b | ||
|
|
b7f68379c2 | ||
|
|
43c0fea3be | ||
|
|
39f112bb98 | ||
|
|
3d113dab3c | ||
|
|
92f397544b | ||
|
|
fe4ca34528 | ||
|
|
464ef419e7 | ||
|
|
30e35eb44c | ||
|
|
b92a8996e9 | ||
|
|
c887ea94ff | ||
|
|
25a753b97a | ||
|
|
a86ab2955a | ||
|
|
259e05360e | ||
|
|
36b4f52cbc | ||
|
|
ee6343900b | ||
|
|
3818398d86 | ||
|
|
0973f6149b | ||
|
|
1e1fb09821 | ||
|
|
dfe099fe9b | ||
|
|
3b6450f188 | ||
|
|
971a2cc300 | ||
|
|
6b8db478fb | ||
|
|
3932a9614c | ||
|
|
4dde4fffe3 | ||
|
|
57d38be688 | ||
|
|
b79522a955 | ||
|
|
94333ff2f1 | ||
|
|
d3f4bfe192 | ||
|
|
d130e64f69 | ||
|
|
f7e9cddae9 | ||
|
|
6fbcf62d76 | ||
|
|
1a6943fe17 | ||
|
|
cde2343d09 | ||
|
|
c746b30287 | ||
|
|
3582b96dd9 | ||
|
|
d258065e36 | ||
|
|
7627466891 | ||
|
|
c476ee46f8 | ||
|
|
6fc68f4e62 | ||
|
|
75bac1fd4e | ||
|
|
94042375a7 | ||
|
|
103306c6c8 | ||
|
|
6d37d262ea | ||
|
|
473331dd3a | ||
|
|
bc9d03ef48 | ||
|
|
740c88fe0c | ||
|
|
684ef09168 | ||
|
|
e3b08fc15d | ||
|
|
5c931a61b4 | ||
|
|
ad7534d00d | ||
|
|
c81f8699f1 | ||
|
|
2af03eb0dc | ||
|
|
5064ba3f1d | ||
|
|
c5abe47859 | ||
|
|
8fdd0e40f8 | ||
|
|
a6a07ba0d7 | ||
|
|
614fef4189 | ||
|
|
d3e7dba2b7 | ||
|
|
39343c3e9e | ||
|
|
73865fec59 | ||
|
|
b508818f23 | ||
|
|
bef8ae0a2f | ||
|
|
cce2d41500 | ||
|
|
175f3ed338 | ||
|
|
c2cc7c6163 | ||
|
|
8fee041fad | ||
|
|
dfc1f8524a | ||
|
|
752bd2e35a | ||
|
|
01fe0b4630 | ||
|
|
e7f8bc0136 | ||
|
|
370918e07f | ||
|
|
133966677b | ||
|
|
44f84e4781 | ||
|
|
a8354ee046 | ||
|
|
4550e3073a | ||
|
|
abe7a49092 | ||
|
|
82a486bfb6 | ||
|
|
ad06e733f8 | ||
|
|
4306603a28 | ||
|
|
554f834a90 | ||
|
|
7236bec61f | ||
|
|
c799f1bfe9 | ||
|
|
f15c3c1420 | ||
|
|
aa67045330 | ||
|
|
736640f38d | ||
|
|
e9caf663bc | ||
|
|
8afbea53de | ||
|
|
c3d496ad5b | ||
|
|
06501f528d | ||
|
|
f6a678c1a4 | ||
|
|
30690d0ebd | ||
|
|
7a830cddf9 | ||
|
|
3dc1365d39 | ||
|
|
b03cd94ae8 | ||
|
|
bbf348d273 | ||
|
|
dce48eb415 | ||
|
|
decf14635d | ||
|
|
db4f49bbba | ||
|
|
26824fcb6e | ||
|
|
8afad91b33 | ||
|
|
69de0b13c4 | ||
|
|
967153bc10 | ||
|
|
971d9be1bd | ||
|
|
7a3faef886 | ||
|
|
f67030fcc7 | ||
|
|
7353e99449 | ||
|
|
91d9597c89 | ||
|
|
2eb569912b | ||
|
|
9410d9c066 | ||
|
|
29d8788e25 | ||
|
|
0304c50bc6 | ||
|
|
dd22150cfe | ||
|
|
07e7feca56 | ||
|
|
a93eec8f50 | ||
|
|
88bad762e5 | ||
|
|
18dfe6ca8b | ||
|
|
96dfa7009f | ||
|
|
92a9d8ad11 | ||
|
|
2ab9094b41 | ||
|
|
f6154ccbc4 | ||
|
|
0be01dde19 | ||
|
|
e113e91423 | ||
|
|
28c63b8b9d | ||
|
|
c5aac4c44f | ||
|
|
42e7f2a5c3 | ||
|
|
ae9ae18d31 | ||
|
|
f89cdac198 | ||
|
|
e8f345ff77 | ||
|
|
aff0610df9 | ||
|
|
9199d062d1 | ||
|
|
0ec4aaa629 | ||
|
|
9fca99b4ef | ||
|
|
14853895f3 | ||
|
|
d79a400c8c | ||
|
|
f741385e43 | ||
|
|
840bd92afb | ||
|
|
96e1fb0b10 | ||
|
|
388557e5f9 | ||
|
|
3f32817272 | ||
|
|
056b383536 | ||
|
|
0691f40588 | ||
|
|
800ca0aa7c | ||
|
|
a91679609b | ||
|
|
19f9408990 | ||
|
|
0eea0c9aca | ||
|
|
9f95aa8271 | ||
|
|
0ee04c497b | ||
|
|
2847270c97 | ||
|
|
b98174afba | ||
|
|
3416980849 | ||
|
|
c171bfbf3b | ||
|
|
583a737cb5 | ||
|
|
d2af6289dd | ||
|
|
44e6f455e9 | ||
|
|
b3a50d669e | ||
|
|
0092ea22e2 | ||
|
|
58fb35a9bb | ||
|
|
9a6ff77545 | ||
|
|
c4e0164479 | ||
|
|
f872f1c591 | ||
|
|
03e64da845 | ||
|
|
3150f64895 | ||
|
|
8b36e9c317 | ||
|
|
c5c5fc6c02 | ||
|
|
c7d9992a3d | ||
|
|
0d8f2c6b14 | ||
|
|
c1800f2a6f | ||
|
|
d41a115a07 | ||
|
|
2640a3b93f | ||
|
|
984c18cb11 | ||
|
|
23db15dfb9 | ||
|
|
9426f954b0 | ||
|
|
133b64778b | ||
|
|
a8a97fa38d | ||
|
|
da6061bbde | ||
|
|
dfad607697 | ||
|
|
5d7565bc59 | ||
|
|
ab962ca98f | ||
|
|
dbbf9858f8 | ||
|
|
51edb35e3f | ||
|
|
81c6ee6270 | ||
|
|
9ad37cc98f | ||
|
|
c76864dd4b | ||
|
|
e3889508c0 | ||
|
|
22d908b9a3 | ||
|
|
13d3e09f1a | ||
|
|
9ec15673d1 | ||
|
|
3a00a803e9 | ||
|
|
4a12a0db90 | ||
|
|
b4940e3a75 | ||
|
|
ffe07bbe3b | ||
|
|
7fdb006465 | ||
|
|
99da577c41 | ||
|
|
0f6fdd6c3b | ||
|
|
52ec58d67f | ||
|
|
c55fc59d18 | ||
|
|
b68b63e8c9 | ||
|
|
84bb05d504 | ||
|
|
f33a7ba870 | ||
|
|
93830c12ee | ||
|
|
b8b50f6651 | ||
|
|
8f331090f9 | ||
|
|
7ec1e8ddfa | ||
|
|
880dc1450d | ||
|
|
801e655c09 | ||
|
|
5e269dd089 | ||
|
|
476f81d5e8 | ||
|
|
66dfb5f6fd | ||
|
|
a2f2991192 | ||
|
|
cfedcd2180 | ||
|
|
cc06c62164 | ||
|
|
b4ca000402 | ||
|
|
b78a6f4418 | ||
|
|
d5693b7a08 | ||
|
|
cae0670065 | ||
|
|
f2d1188fdd | ||
|
|
70be81c92d | ||
|
|
5d5af93401 | ||
|
|
74cbdcce55 | ||
|
|
96d19a76cc | ||
|
|
55d2d44371 | ||
|
|
c6b05f5e3c | ||
|
|
ba91bf4d2e | ||
|
|
c1e5f7bb1b | ||
|
|
4855628d7a | ||
|
|
e48908573a | ||
|
|
1df9d60fa9 | ||
|
|
e69cb3bf88 | ||
|
|
c58ae260e5 | ||
|
|
555fb7b042 | ||
|
|
7a4eb4ddf8 | ||
|
|
4c3ddccd2f | ||
|
|
68af4d047b | ||
|
|
81128d1537 | ||
|
|
ac00a8f36f | ||
|
|
7f6eee119a | ||
|
|
950951be6e | ||
|
|
351d7b9e74 | ||
|
|
f948d6e1d3 | ||
|
|
416898b97b | ||
|
|
ec2290ae47 | ||
|
|
02e0504227 | ||
|
|
0b45eac52c | ||
|
|
15a3deadbe | ||
|
|
c1db812b67 | ||
|
|
ccee553257 | ||
|
|
69ccd56fef | ||
|
|
c13f031119 | ||
|
|
5a484a0ef3 | ||
|
|
95648b20b9 | ||
|
|
72dc73cf88 | ||
|
|
5cfd064da1 | ||
|
|
de3482c791 | ||
|
|
d09c66900d | ||
|
|
2a1b7a9e2e | ||
|
|
9efdd13e58 | ||
|
|
0ef5103012 | ||
|
|
9fd352efc4 | ||
|
|
d5db3d6428 | ||
|
|
b3c3e167f3 | ||
|
|
de35e6a403 | ||
|
|
36a6a864be | ||
|
|
452f3353ee | ||
|
|
b7230b661f | ||
|
|
c28aa02946 | ||
|
|
1d208c14fa | ||
|
|
1a6d68d3bf | ||
|
|
3d93b60e64 | ||
|
|
ff6cee33c4 | ||
|
|
5869e5ff31 | ||
|
|
298d80e056 | ||
|
|
b6ad5e9223 | ||
|
|
4ff52d9bcf | ||
|
|
f9f9bf0cb8 | ||
|
|
b62b2a4ad9 | ||
|
|
c91a9636cd | ||
|
|
e631ca9f11 | ||
|
|
b2572eeeda | ||
|
|
d591cd638e | ||
|
|
2a87e38f7a | ||
|
|
42d96fbc3d | ||
|
|
8dea53ba5c | ||
|
|
68194928ca | ||
|
|
56b75aaffc | ||
|
|
c509698b54 | ||
|
|
b3c5a65884 | ||
|
|
90e4da1a39 | ||
|
|
fd270c2553 | ||
|
|
21dc3612f7 | ||
|
|
cff3a400a4 | ||
|
|
279c16b5c0 | ||
|
|
9fc5408640 | ||
|
|
849904309b | ||
|
|
d0d9f04751 | ||
|
|
bd6b358e0d | ||
|
|
6da0dbf511 | ||
|
|
30dc059ddb | ||
|
|
2ce0beec82 | ||
|
|
74922bdf60 | ||
|
|
46eebd9936 | ||
|
|
0721f643c4 | ||
|
|
0b5010cda6 | ||
|
|
246150b44a | ||
|
|
21b113200c | ||
|
|
6672b53542 | ||
|
|
6e3271fe95 | ||
|
|
61d3bc0e98 | ||
|
|
77ff2a367c | ||
|
|
4d92056b97 | ||
|
|
e8ea65432f | ||
|
|
318fbeb995 | ||
|
|
ea798a7752 | ||
|
|
3608cafc32 | ||
|
|
4e0c09efd4 | ||
|
|
f5fc3ff450 | ||
|
|
23ec68701a | ||
|
|
5c30da6171 | ||
|
|
f516970d76 | ||
|
|
b0a08c7d10 | ||
|
|
c541716225 | ||
|
|
70f3ae1b6d | ||
|
|
8b9a4d141a | ||
|
|
05b4f00629 | ||
|
|
946383b502 | ||
|
|
7ef7edb1d3 | ||
|
|
396853658c | ||
|
|
696008b48f | ||
|
|
d63a955082 | ||
|
|
c1d67aa740 | ||
|
|
7886dc4c14 | ||
|
|
a3c77d20a0 | ||
|
|
6e53097f83 | ||
|
|
e657f5c8d4 | ||
|
|
31a0e2d61f | ||
|
|
fb4359b009 | ||
|
|
769d433373 | ||
|
|
b6673965e2 | ||
|
|
9c66a76419 | ||
|
|
d79f0cf928 | ||
|
|
0d0a3bece4 | ||
|
|
0b25cae5e5 | ||
|
|
a6b890a48d | ||
|
|
da582e3ba5 | ||
|
|
41928d17ec | ||
|
|
7efa26a11d | ||
|
|
7c07031603 | ||
|
|
9fca9da408 | ||
|
|
380905cc72 | ||
|
|
ec442416fa | ||
|
|
0c079c2bf4 | ||
|
|
269e7c6115 | ||
|
|
b22438d345 | ||
|
|
999dbc3024 | ||
|
|
fcb0363812 | ||
|
|
463b827556 | ||
|
|
f0a1ed2c0f | ||
|
|
665069d98f | ||
|
|
bbf50ef812 | ||
|
|
ba186cfaee | ||
|
|
692ca00011 | ||
|
|
f855d160ca | ||
|
|
9eb0169fcf | ||
|
|
d99be3e0e6 | ||
|
|
5603ca86a3 | ||
|
|
4835353ce0 | ||
|
|
30ea38d133 | ||
|
|
7a939c8233 | ||
|
|
51a014fecb | ||
|
|
2acdcec678 | ||
|
|
8a63cfbf25 | ||
|
|
d4e802f3b3 | ||
|
|
c1781bc4cb | ||
|
|
5966632276 | ||
|
|
76d3a6051a | ||
|
|
da9a96e3f2 | ||
|
|
f573af369f | ||
|
|
b58b3c0402 | ||
|
|
db517c01af | ||
|
|
3fb56e610d | ||
|
|
63936126f3 | ||
|
|
d7bab0dc7b | ||
|
|
fa03750957 | ||
|
|
d3f3df0b83 | ||
|
|
13edc400c9 | ||
|
|
6aa8eb6101 | ||
|
|
28ee8cd6eb | ||
|
|
4ea6ccc17b | ||
|
|
e80a89f094 | ||
|
|
58360fb6d4 | ||
|
|
22bee9be29 | ||
|
|
d2e8ea066d | ||
|
|
60b4810666 | ||
|
|
93dd7f2122 | ||
|
|
c71cc4f18a | ||
|
|
011d36492e | ||
|
|
3cd7560534 | ||
|
|
82f4177bdc | ||
|
|
3be23b3285 | ||
|
|
63833ba123 | ||
|
|
8d2d4d68c8 | ||
|
|
d72702129f | ||
|
|
f2c1f85b2f | ||
|
|
1b01bbb7fc | ||
|
|
679b790687 | ||
|
|
dc7b13a5f7 | ||
|
|
5161d673b1 | ||
|
|
0fca93e454 | ||
|
|
664b794efa | ||
|
|
c60cf5d2de | ||
|
|
8d8f70bfdf | ||
|
|
b349c3ff2c | ||
|
|
30a250c7df | ||
|
|
a1449d99cf | ||
|
|
a589a0f0b8 | ||
|
|
21594063ca | ||
|
|
8f89583eb0 | ||
|
|
8487b5c89d | ||
|
|
3a2d0f46ac | ||
|
|
8af2461735 | ||
|
|
6c8c48d2fe | ||
|
|
f8895af960 | ||
|
|
4664a27d6b | ||
|
|
2609822f8a | ||
|
|
cd3ad1822b | ||
|
|
0a6930945e | ||
|
|
4373df41ba | ||
|
|
0971aa92c3 | ||
|
|
f2aef24b8a | ||
|
|
f019320df1 | ||
|
|
3af3d137a5 | ||
|
|
9d0d65ca3a | ||
|
|
9a33c95b69 | ||
|
|
b113fd8cbc | ||
|
|
1836b5e417 | ||
|
|
d5f9411ecb | ||
|
|
9ad0fa26bf | ||
|
|
6a4550c6f0 | ||
|
|
cc3414408f | ||
|
|
fd8101b0c3 | ||
|
|
18f484c274 | ||
|
|
221f5007ab | ||
|
|
fbb7d16039 | ||
|
|
ca84bad1fc | ||
|
|
be9fe7bb2d | ||
|
|
e21d29fa27 | ||
|
|
febdd2ad5e | ||
|
|
503ad36256 | ||
|
|
1be1656ce8 | ||
|
|
cd6831ccbe | ||
|
|
676547b8b0 | ||
|
|
c82a6052a2 | ||
|
|
a0726dc065 | ||
|
|
86fbdfa6e7 | ||
|
|
0eb082f21b | ||
|
|
714736bf73 | ||
|
|
079e344c5a | ||
|
|
c2e0bd496f | ||
|
|
f1a050a503 | ||
|
|
bf24ab3d53 | ||
|
|
5190274004 | ||
|
|
5db766cfa0 | ||
|
|
ddc8bc5885 | ||
|
|
4036a9e414 | ||
|
|
fa74b64d6d | ||
|
|
59c2ca2052 | ||
|
|
a528db1604 | ||
|
|
72a5afc910 | ||
|
|
974f7d1e26 | ||
|
|
2a6ad477e6 | ||
|
|
ce64dbc686 | ||
|
|
eb199dae67 | ||
|
|
ad9fd08a08 | ||
|
|
86b2ced685 | ||
|
|
4e96056ac4 | ||
|
|
84c24e70c0 | ||
|
|
d069947252 | ||
|
|
550503d757 | ||
|
|
ef6241fe38 | ||
|
|
fcce668d66 | ||
|
|
1bd9215a72 | ||
|
|
840512751c | ||
|
|
517287117b | ||
|
|
46d935c1a4 | ||
|
|
9680d072fa | ||
|
|
06413f2877 | ||
|
|
ce86faabfe | ||
|
|
2134323bf8 | ||
|
|
67e08d3415 | ||
|
|
f8d3c7a838 | ||
|
|
2c630a5218 | ||
|
|
e418aa7f95 | ||
|
|
3ab1519e25 | ||
|
|
d8c40cab6d | ||
|
|
f0e9650085 | ||
|
|
a34d796059 | ||
|
|
9470cb69fd | ||
|
|
520b83a226 | ||
|
|
85af2e1ed7 | ||
|
|
f420e9bbbe | ||
|
|
82cb9fb7d0 | ||
|
|
719d7b8801 | ||
|
|
b13ca818bb | ||
|
|
2dd013a0a0 | ||
|
|
49e4f00aff | ||
|
|
4c018421a2 | ||
|
|
a2826ec865 | ||
|
|
c256b6246a | ||
|
|
f9bfb951ca | ||
|
|
8c63eeea47 | ||
|
|
b136e7739a | ||
|
|
2967ccb1cb | ||
|
|
03d5dd6008 | ||
|
|
89d1ee2483 | ||
|
|
c313b19fc5 | ||
|
|
2a6856a5d2 | ||
|
|
f3c7a213b1 | ||
|
|
f6ddf5676a | ||
|
|
b331fbcd4d | ||
|
|
41eec46fa7 | ||
|
|
0eb34eec25 | ||
|
|
a1f144daf2 | ||
|
|
ca73941e5d | ||
|
|
0bdf600409 | ||
|
|
d5f8e2cac9 | ||
|
|
20f3e5db0b | ||
|
|
d412ef5e17 | ||
|
|
0269cdd068 | ||
|
|
12f90a67f9 | ||
|
|
ca554d9ef6 | ||
|
|
0c0ffe7f5c | ||
|
|
0eee6044b2 | ||
|
|
da21f992c5 | ||
|
|
6c8a46cc7d | ||
|
|
aa31e21868 | ||
|
|
ee66121364 | ||
|
|
327edf2a6b | ||
|
|
2535ac3edf | ||
|
|
df56b42e62 | ||
|
|
bed69130fd | ||
|
|
f54460fd2e | ||
|
|
2bde9b287f | ||
|
|
c8abbc6054 | ||
|
|
cba7c016d3 | ||
|
|
7d0db424ec | ||
|
|
6f9e164874 | ||
|
|
2927135cdd | ||
|
|
0afcdbd0ca | ||
|
|
8813c9936d | ||
|
|
abe7068197 | ||
|
|
d7f0872690 | ||
|
|
df75659778 | ||
|
|
c32663bb32 | ||
|
|
c94eed432d | ||
|
|
a73a879238 | ||
|
|
a8500a2a8a | ||
|
|
718962c188 | ||
|
|
e6190ec275 | ||
|
|
13e8f70438 | ||
|
|
ea206235c5 | ||
|
|
dc0103a155 | ||
|
|
31ec06b576 | ||
|
|
17a58b4c22 | ||
|
|
56564092bc | ||
|
|
2b546fce9f | ||
|
|
69a065eeed | ||
|
|
a7c01e039d | ||
|
|
4639833bdb | ||
|
|
bf6fe2b4fb | ||
|
|
04d2ebacca | ||
|
|
e44fd9ed78 | ||
|
|
526d35edfe | ||
|
|
2ec68c29de | ||
|
|
c761661386 | ||
|
|
142e7fcc02 | ||
|
|
e928111c00 | ||
|
|
0665ded648 | ||
|
|
b9a8a62e38 | ||
|
|
74bbaaf643 | ||
|
|
5799ea8160 | ||
|
|
3dc2453deb | ||
|
|
d2b3965bc2 | ||
|
|
e4da571d6b | ||
|
|
5e45480a0e | ||
|
|
90c1e10cc5 | ||
|
|
0255b09e0e | ||
|
|
bd21325d04 | ||
|
|
9bc2a6fa2b | ||
|
|
cb3f0fdcbd | ||
|
|
b8628bb495 | ||
|
|
9c26f79ca6 | ||
|
|
30f9b84d5f | ||
|
|
1318d23401 | ||
|
|
9fb71a30ec | ||
|
|
abd34f1810 | ||
|
|
6a472437bb | ||
|
|
43b97bca75 | ||
|
|
a667bd456c | ||
|
|
c6de7cf784 | ||
|
|
59deaad070 | ||
|
|
7709799bc2 | ||
|
|
d59138363e | ||
|
|
faaf2009b6 | ||
|
|
66c9691c87 | ||
|
|
73d09e7c1c | ||
|
|
3a508e71aa | ||
|
|
a1d7a76349 | ||
|
|
5ea65eda5a | ||
|
|
29347b9b4d | ||
|
|
a06d528d3b | ||
|
|
ac0fd4b3fc | ||
|
|
47783feecb | ||
|
|
fad8955397 | ||
|
|
d0bcf06e5f | ||
|
|
fed03f88c8 | ||
|
|
b6afcc222a | ||
|
|
4bcc33569a | ||
|
|
46a79c6bb5 | ||
|
|
25d45fd9db | ||
|
|
c5795492e1 | ||
|
|
e86d9f9241 | ||
|
|
3db4ea30a3 | ||
|
|
a3acd6bda5 | ||
|
|
12a3b1f83e | ||
|
|
cf2df815e3 | ||
|
|
f03e4fd049 | ||
|
|
75bf674537 | ||
|
|
c3b1b16d11 | ||
|
|
d8b9159125 | ||
|
|
a30617d971 | ||
|
|
c7d824fbf3 | ||
|
|
2335259dd6 | ||
|
|
64686c92cd | ||
|
|
3cbc4e5570 | ||
|
|
d3f49c72e1 | ||
|
|
f460a6573c | ||
|
|
26a0b88937 | ||
|
|
a3ca8a721d | ||
|
|
bdaebe1218 | ||
|
|
f76dbb08cc | ||
|
|
5ac2ece8b4 | ||
|
|
37cd743315 | ||
|
|
c0c772b11b | ||
|
|
ccc78c3516 | ||
|
|
09b7aab886 | ||
|
|
ce3eac9d8a | ||
|
|
a762d00aa8 | ||
|
|
e5b3c12814 | ||
|
|
df73d0263a | ||
|
|
2affb6d1e7 | ||
|
|
4cc6a28e73 | ||
|
|
89881bfd7e | ||
|
|
458e30e2be | ||
|
|
5aaadf4e5a | ||
|
|
c750158286 | ||
|
|
80dee91ab9 | ||
|
|
0cfe5ae0bb | ||
|
|
b6d4ded29a | ||
|
|
6d981e21ff | ||
|
|
38afb8b8eb | ||
|
|
6efb172fb2 | ||
|
|
3332835417 | ||
|
|
ec34b23688 | ||
|
|
e4c43548eb | ||
|
|
fc6306f44a | ||
|
|
520b2450e3 | ||
|
|
c96119a9fd | ||
|
|
5242b3cb03 | ||
|
|
21cb086b87 | ||
|
|
c4d0d38e69 | ||
|
|
eecdd4befc | ||
|
|
804490399f | ||
|
|
47bb1c0b37 | ||
|
|
064bae7b87 | ||
|
|
ebfbb4b56f | ||
|
|
35203da9c3 | ||
|
|
b4dff4dd0c | ||
|
|
68fc171a31 | ||
|
|
fb1c20ed30 | ||
|
|
a31c4f5254 | ||
|
|
570cc16c98 | ||
|
|
d796fcba8f | ||
|
|
ad7a6e60f2 | ||
|
|
7c02075ba6 | ||
|
|
a83165f112 | ||
|
|
8ad90314fd | ||
|
|
e2db20b1f3 | ||
|
|
2e26a7f82d | ||
|
|
313fda32c0 | ||
|
|
28c0bd8592 | ||
|
|
e87d20b08d | ||
|
|
ce32b88010 | ||
|
|
9f82afa485 | ||
|
|
5589aad730 | ||
|
|
5f8b044577 | ||
|
|
924f5af2ed | ||
|
|
a5acd5f322 | ||
|
|
dff4cc6cbf | ||
|
|
4532f98a94 | ||
|
|
c09d41bd40 | ||
|
|
fc26902d1d | ||
|
|
a427bfe1e1 | ||
|
|
5b1b9b011a | ||
|
|
97ea56e777 | ||
|
|
91a40ab079 | ||
|
|
4ea1d9a1f4 | ||
|
|
33dc2f41a9 | ||
|
|
6793d4a3a0 | ||
|
|
4c6bf55c8a | ||
|
|
a977cadfda | ||
|
|
381069afc7 | ||
|
|
3c14af4a28 | ||
|
|
c3476be9e4 | ||
|
|
519cdb642c | ||
|
|
2c1e23fdbd | ||
|
|
7f865d73f0 | ||
|
|
d98db1587b | ||
|
|
34ff3aa99a | ||
|
|
7177a534b9 | ||
|
|
3e7ad705bb | ||
|
|
ac1503d246 | ||
|
|
26732ed42c |
+1
-1
@@ -1,6 +1,6 @@
|
||||
# These are supported funding model platforms
|
||||
|
||||
github: # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2]
|
||||
github: CalcProgrammer1
|
||||
patreon: CalcProgrammer1
|
||||
open_collective: # Replace with a single Open Collective username
|
||||
ko_fi: # Replace with a single Ko-fi username
|
||||
|
||||
@@ -8,6 +8,9 @@ OpenRGB-x86_64.AppImage
|
||||
60-openrgb.rules
|
||||
debian/changelog
|
||||
fedora/OpenRGB.spec
|
||||
OpenRGB_resource.rc
|
||||
OpenRGB Windows 32-bit/
|
||||
OpenRGB Windows 64-bit/
|
||||
|
||||
# Directories
|
||||
.build/
|
||||
@@ -28,6 +31,7 @@ Build/
|
||||
.qmake.stash
|
||||
.vscode
|
||||
.vs
|
||||
.idea
|
||||
|
||||
# Generic Files
|
||||
.DS_Store
|
||||
|
||||
+341
-401
@@ -1,18 +1,24 @@
|
||||
# swy: some useful references; the MSVC part of the CI script is based on the one from bind9, by Michał Kępień:
|
||||
# https://gitlab.com/gitlab-org/ci-cd/shared-runners/images/gcp/windows-containers/blob/master/cookbooks/preinstalled-software/README.md
|
||||
# https://gitlab.isc.org/isc-projects/bind9/commit/facc6a051fcac70fbbc61cb92a37be8c3e4db5ec#587d266bb27a4dc3022bbed44dfa19849df3044c_718_731
|
||||
# https://www.kittell.net/code/powershell-unix-sed-equivalent-change-text-file/
|
||||
# https://powershell.org/forums/topic/how-to-use-ansi-vt100-formatting-in-powershell-ooh-pretty-colors/
|
||||
#-----------------------------------------------------------#
|
||||
# .gitlab-ci.yml #
|
||||
# #
|
||||
# OpenRGB GitLab CI Configuration #
|
||||
# #
|
||||
# This file is part of the OpenRGB project #
|
||||
# SPDX-License-Identifier: GPL-2.0-or-later #
|
||||
#-----------------------------------------------------------#
|
||||
|
||||
#-----------------------------------------------------------------------#
|
||||
# OpenRGB GitLab CI Configuration #
|
||||
#-----------------------------------------------------------------------#
|
||||
.fork_local_runner_rules:
|
||||
rules:
|
||||
- if: $CI_PROJECT_PATH == "CalcProgrammer1/OpenRGB" || $CI_PIPELINE_SOURCE == "push"
|
||||
when: on_success
|
||||
|
||||
.fork_gitlab_runner_rules:
|
||||
#-----------------------------------------------------------#
|
||||
# GitLab CI Rules #
|
||||
# #
|
||||
# * For downstream forks (not on CalcProgrammer1/OpenRGB), #
|
||||
# run only if manually started to save CI minutes if #
|
||||
# GitLab hosted runners #
|
||||
# * For commits to the CalcProgrammer1/OpenRGB repository, #
|
||||
# automatically run all jobs on the default branch, #
|
||||
# otherwise run them if the source is part of a merge #
|
||||
# request #
|
||||
#-----------------------------------------------------------#
|
||||
.downstream_rules:
|
||||
rules:
|
||||
- if: $CI_PROJECT_PATH != "CalcProgrammer1/OpenRGB" && $CI_PIPELINE_SOURCE == "push"
|
||||
when: manual
|
||||
@@ -20,9 +26,9 @@
|
||||
|
||||
.upstream_rules:
|
||||
rules:
|
||||
- if: '$CI_PROJECT_PATH == "CalcProgrammer1/OpenRGB"'
|
||||
- if: '$CI_PROJECT_PATH == "CalcProgrammer1/OpenRGB" && ($CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH || $CI_PIPELINE_SOURCE == "merge_request_event")'
|
||||
when: on_success
|
||||
- !reference [.fork_gitlab_runner_rules, rules]
|
||||
- !reference [.downstream_rules, rules]
|
||||
|
||||
.shared_windows_runners:
|
||||
tags:
|
||||
@@ -41,9 +47,9 @@ variables:
|
||||
before_script:
|
||||
- echo "started by ${GITLAB_USER_NAME}"
|
||||
|
||||
#-----------------------------------------------------------------------#
|
||||
# Supported Devices Build Target #
|
||||
#-----------------------------------------------------------------------#
|
||||
#-----------------------------------------------------------#
|
||||
# Supported Devices Build Target #
|
||||
#-----------------------------------------------------------#
|
||||
"Supported Devices":
|
||||
image: registry.gitlab.com/openrgbdevelopers/openrgb-linux-ci-deb-builder:bookworm-amd64
|
||||
tags:
|
||||
@@ -64,327 +70,236 @@ before_script:
|
||||
rules:
|
||||
- !reference [.upstream_rules, rules]
|
||||
|
||||
#-----------------------------------------------------------------------#
|
||||
# Linux (AppImage) i386 Build Target #
|
||||
#-----------------------------------------------------------------------#
|
||||
#-----------------------------------------------------------#
|
||||
# OpenRGB Common Appimage Build Steps #
|
||||
#-----------------------------------------------------------#
|
||||
.hidden_appimage_script: &appimage_script_steps
|
||||
image: registry.gitlab.com/openrgbdevelopers/openrgb-linux-ci-deb-builder:bookworm-${TGT_ARCH}
|
||||
tags:
|
||||
- linux
|
||||
- ${TGT_ARCH}
|
||||
stage: build
|
||||
script:
|
||||
- export $(dpkg-architecture)
|
||||
- ./scripts/build-appimage.sh ${TGT_QT}
|
||||
|
||||
artifacts:
|
||||
name: "${CI_PROJECT_NAME}_Linux_${TGT_NAME}_${CI_COMMIT_SHORT_SHA}"
|
||||
paths:
|
||||
- OpenRGB-${TGT_PATH}.AppImage
|
||||
- 60-openrgb.rules
|
||||
- README.md
|
||||
expire_in: 30 days
|
||||
|
||||
rules:
|
||||
- !reference [.upstream_rules, rules]
|
||||
|
||||
#-----------------------------------------------------------#
|
||||
# Linux (AppImage) i386 Build Target #
|
||||
#-----------------------------------------------------------#
|
||||
"Linux i386 AppImage":
|
||||
image: registry.gitlab.com/openrgbdevelopers/openrgb-linux-ci-deb-builder:bookworm-i386
|
||||
tags:
|
||||
- linux
|
||||
- i386
|
||||
stage: build
|
||||
script:
|
||||
- export $(dpkg-architecture)
|
||||
- ./scripts/build-appimage.sh
|
||||
variables:
|
||||
TGT_ARCH: "i386"
|
||||
TGT_QT: "qt6"
|
||||
TGT_NAME: "${TGT_ARCH}"
|
||||
TGT_PATH: "${TGT_ARCH}"
|
||||
<<: *appimage_script_steps
|
||||
|
||||
artifacts:
|
||||
name: "${CI_PROJECT_NAME}_Linux_i386_${CI_COMMIT_SHORT_SHA}"
|
||||
paths:
|
||||
- OpenRGB-i386.AppImage
|
||||
- 60-openrgb.rules
|
||||
- README.md
|
||||
expire_in: 30 days
|
||||
|
||||
rules:
|
||||
- !reference [.upstream_rules, rules]
|
||||
|
||||
#-----------------------------------------------------------------------#
|
||||
# Linux (AppImage) Qt6 i386 Build Target #
|
||||
#-----------------------------------------------------------------------#
|
||||
"Linux i386 AppImage Qt6":
|
||||
image: registry.gitlab.com/openrgbdevelopers/openrgb-linux-ci-deb-builder:bookworm-i386
|
||||
tags:
|
||||
- linux
|
||||
- i386
|
||||
stage: build
|
||||
script:
|
||||
- export $(dpkg-architecture)
|
||||
- ./scripts/build-appimage.sh qt6
|
||||
|
||||
artifacts:
|
||||
name: "${CI_PROJECT_NAME}_Linux_i386_Qt6_${CI_COMMIT_SHORT_SHA}"
|
||||
paths:
|
||||
- OpenRGB-i386.AppImage
|
||||
- 60-openrgb.rules
|
||||
- README.md
|
||||
expire_in: 30 days
|
||||
|
||||
rules:
|
||||
- !reference [.upstream_rules, rules]
|
||||
|
||||
#-----------------------------------------------------------------------#
|
||||
# Linux (AppImage) amd64 Build Target #
|
||||
#-----------------------------------------------------------------------#
|
||||
"Linux amd64 AppImage Base":
|
||||
image: registry.gitlab.com/openrgbdevelopers/openrgb-linux-ci-deb-builder:bookworm-amd64
|
||||
stage: build
|
||||
script:
|
||||
- export $(dpkg-architecture)
|
||||
- ./scripts/build-appimage.sh
|
||||
|
||||
artifacts:
|
||||
name: "${CI_PROJECT_NAME}_Linux_amd64_${CI_COMMIT_SHORT_SHA}"
|
||||
paths:
|
||||
- OpenRGB-x86_64.AppImage
|
||||
- 60-openrgb.rules
|
||||
- README.md
|
||||
expire_in: 30 days
|
||||
|
||||
rules:
|
||||
- if: $CI_PIPELINE_SOURCE == "merge_request_event" || $CI_PIPELINE_SOURCE == "push"
|
||||
when: never
|
||||
#-----------------------------------------------------------#
|
||||
# Linux (AppImage) Qt5 i386 Build Target #
|
||||
#-----------------------------------------------------------#
|
||||
"Linux i386 AppImage Qt5":
|
||||
variables:
|
||||
TGT_ARCH: "i386"
|
||||
TGT_QT: ""
|
||||
TGT_NAME: "${TGT_ARCH}_qt5"
|
||||
TGT_PATH: "${TGT_ARCH}"
|
||||
<<: *appimage_script_steps
|
||||
|
||||
#-----------------------------------------------------------#
|
||||
# Linux (AppImage) amd64 Build Target #
|
||||
#-----------------------------------------------------------#
|
||||
"Linux amd64 AppImage":
|
||||
extends: "Linux amd64 AppImage Base"
|
||||
variables:
|
||||
TGT_ARCH: "amd64"
|
||||
TGT_QT: "qt6"
|
||||
TGT_NAME: "${TGT_ARCH}"
|
||||
TGT_PATH: "x86_64"
|
||||
<<: *appimage_script_steps
|
||||
rules:
|
||||
- !reference [.fork_local_runner_rules, rules]
|
||||
tags:
|
||||
- linux
|
||||
- amd64
|
||||
- !reference [.upstream_rules, rules]
|
||||
|
||||
"Linux amd64 AppImage (gitlab.com runner)":
|
||||
extends: "Linux amd64 AppImage Base"
|
||||
"Linux amd64 AppImage (Downstream)":
|
||||
extends: "Linux amd64 AppImage"
|
||||
rules:
|
||||
- !reference [.fork_gitlab_runner_rules, rules]
|
||||
- !reference [.downstream_rules, rules]
|
||||
tags:
|
||||
- "saas-linux-small-amd64"
|
||||
|
||||
#-----------------------------------------------------------------------#
|
||||
# Linux (AppImage) Qt6 amd64 Build Target #
|
||||
#-----------------------------------------------------------------------#
|
||||
"Linux amd64 AppImage Qt6":
|
||||
image: registry.gitlab.com/openrgbdevelopers/openrgb-linux-ci-deb-builder:bookworm-amd64
|
||||
tags:
|
||||
- linux
|
||||
- amd64
|
||||
stage: build
|
||||
script:
|
||||
- export $(dpkg-architecture)
|
||||
- ./scripts/build-appimage.sh qt6
|
||||
#-----------------------------------------------------------#
|
||||
# Linux (AppImage) Qt5 amd64 Build Target #
|
||||
#-----------------------------------------------------------#
|
||||
"Linux amd64 AppImage Qt5":
|
||||
variables:
|
||||
TGT_ARCH: "amd64"
|
||||
TGT_QT: ""
|
||||
TGT_NAME: "${TGT_ARCH}_qt5"
|
||||
TGT_PATH: "x86_64"
|
||||
<<: *appimage_script_steps
|
||||
|
||||
artifacts:
|
||||
name: "${CI_PROJECT_NAME}_Linux_amd64_Qt6_${CI_COMMIT_SHORT_SHA}"
|
||||
paths:
|
||||
- OpenRGB-amd64.AppImage
|
||||
- 60-openrgb.rules
|
||||
- README.md
|
||||
expire_in: 30 days
|
||||
|
||||
rules:
|
||||
- !reference [.upstream_rules, rules]
|
||||
|
||||
#-----------------------------------------------------------------------#
|
||||
# Linux (AppImage) armhf Build Target #
|
||||
#-----------------------------------------------------------------------#
|
||||
#-----------------------------------------------------------#
|
||||
# Linux (AppImage) armhf Build Target #
|
||||
#-----------------------------------------------------------#
|
||||
"Linux armhf AppImage":
|
||||
image: registry.gitlab.com/openrgbdevelopers/openrgb-linux-ci-deb-builder:bookworm-armhf
|
||||
tags:
|
||||
- linux
|
||||
- armhf
|
||||
stage: build
|
||||
script:
|
||||
- export $(dpkg-architecture)
|
||||
- ./scripts/build-appimage.sh
|
||||
variables:
|
||||
TGT_ARCH: "armhf"
|
||||
TGT_QT: "qt6"
|
||||
TGT_NAME: "${TGT_ARCH}"
|
||||
TGT_PATH: "${TGT_ARCH}"
|
||||
<<: *appimage_script_steps
|
||||
|
||||
artifacts:
|
||||
name: "${CI_PROJECT_NAME}_Linux_armhf_${CI_COMMIT_SHORT_SHA}"
|
||||
paths:
|
||||
- OpenRGB-armhf.AppImage
|
||||
- 60-openrgb.rules
|
||||
- README.md
|
||||
expire_in: 30 days
|
||||
#-----------------------------------------------------------#
|
||||
# Linux (AppImage) Qt5 armhf Build Target #
|
||||
#-----------------------------------------------------------#
|
||||
"Linux armhf AppImage Qt5":
|
||||
variables:
|
||||
TGT_ARCH: "armhf"
|
||||
TGT_QT: ""
|
||||
TGT_NAME: "${TGT_ARCH}_qt5"
|
||||
TGT_PATH: "${TGT_ARCH}"
|
||||
<<: *appimage_script_steps
|
||||
|
||||
rules:
|
||||
- !reference [.upstream_rules, rules]
|
||||
|
||||
#-----------------------------------------------------------------------#
|
||||
# Linux (AppImage) Qt6 armhf Build Target #
|
||||
#-----------------------------------------------------------------------#
|
||||
"Linux armhf AppImage Qt6":
|
||||
image: registry.gitlab.com/openrgbdevelopers/openrgb-linux-ci-deb-builder:bookworm-armhf
|
||||
tags:
|
||||
- linux
|
||||
- armhf
|
||||
stage: build
|
||||
script:
|
||||
- export $(dpkg-architecture)
|
||||
- ./scripts/build-appimage.sh qt6
|
||||
|
||||
artifacts:
|
||||
name: "${CI_PROJECT_NAME}_Linux_armhf_Qt6_${CI_COMMIT_SHORT_SHA}"
|
||||
paths:
|
||||
- OpenRGB-armhf.AppImage
|
||||
- 60-openrgb.rules
|
||||
- README.md
|
||||
expire_in: 30 days
|
||||
|
||||
rules:
|
||||
- !reference [.upstream_rules, rules]
|
||||
|
||||
#-----------------------------------------------------------------------#
|
||||
# Linux (AppImage) arm64 Build Target #
|
||||
#-----------------------------------------------------------------------#
|
||||
#-----------------------------------------------------------#
|
||||
# Linux (AppImage) arm64 Build Target #
|
||||
#-----------------------------------------------------------#
|
||||
"Linux arm64 AppImage":
|
||||
image: registry.gitlab.com/openrgbdevelopers/openrgb-linux-ci-deb-builder:bookworm-arm64
|
||||
variables:
|
||||
TGT_ARCH: "arm64"
|
||||
TGT_QT: "qt6"
|
||||
TGT_NAME: "${TGT_ARCH}"
|
||||
TGT_PATH: "${TGT_ARCH}"
|
||||
<<: *appimage_script_steps
|
||||
|
||||
#-----------------------------------------------------------#
|
||||
# Linux (AppImage) Qt5 arm64 Build Target #
|
||||
#-----------------------------------------------------------#
|
||||
"Linux arm64 AppImage Qt5":
|
||||
variables:
|
||||
TGT_ARCH: "arm64"
|
||||
TGT_QT: ""
|
||||
TGT_NAME: "${TGT_ARCH}_qt5"
|
||||
TGT_PATH: "${TGT_ARCH}"
|
||||
<<: *appimage_script_steps
|
||||
|
||||
#-----------------------------------------------------------#
|
||||
# OpenRGB Common Debian Build Steps #
|
||||
#-----------------------------------------------------------#
|
||||
.hidden_deb_script: &debian_script_steps
|
||||
stage: build
|
||||
image: registry.gitlab.com/openrgbdevelopers/openrgb-linux-ci-deb-builder:$TGT_DEB-$TGT_ARCH
|
||||
tags:
|
||||
- linux
|
||||
- arm64
|
||||
stage: build
|
||||
- $TGT_ARCH
|
||||
script:
|
||||
- export $(dpkg-architecture)
|
||||
- ./scripts/build-appimage.sh
|
||||
- ./scripts/build-package-files.sh debian/changelog
|
||||
- dpkg-architecture -l
|
||||
- dpkg-buildpackage -us -B
|
||||
- rm -v ../openrgb-dbgsym*.deb
|
||||
- mv -v ../openrgb*.deb ./
|
||||
|
||||
artifacts:
|
||||
name: "${CI_PROJECT_NAME}_Linux_arm64_${CI_COMMIT_SHORT_SHA}"
|
||||
name: "${CI_PROJECT_NAME}_Linux_${TGT_ARCH}_deb_${CI_COMMIT_SHORT_SHA}"
|
||||
paths:
|
||||
- OpenRGB-arm64.AppImage
|
||||
- 60-openrgb.rules
|
||||
- README.md
|
||||
- openrgb*.deb
|
||||
exclude:
|
||||
- openrgb-dbgsym*.deb
|
||||
expire_in: 30 days
|
||||
|
||||
rules:
|
||||
- !reference [.upstream_rules, rules]
|
||||
|
||||
#-----------------------------------------------------------------------#
|
||||
# Linux (AppImage) Qt6 arm64 Build Target #
|
||||
#-----------------------------------------------------------------------#
|
||||
"Linux arm64 AppImage Qt6":
|
||||
image: registry.gitlab.com/openrgbdevelopers/openrgb-linux-ci-deb-builder:bookworm-arm64
|
||||
tags:
|
||||
- linux
|
||||
- arm64
|
||||
stage: build
|
||||
script:
|
||||
- export $(dpkg-architecture)
|
||||
- ./scripts/build-appimage.sh qt6
|
||||
|
||||
artifacts:
|
||||
name: "${CI_PROJECT_NAME}_Linux_arm64_Qt6_${CI_COMMIT_SHORT_SHA}"
|
||||
paths:
|
||||
- OpenRGB-arm64.AppImage
|
||||
- 60-openrgb.rules
|
||||
- README.md
|
||||
expire_in: 30 days
|
||||
|
||||
rules:
|
||||
- !reference [.upstream_rules, rules]
|
||||
|
||||
#-----------------------------------------------------------------------#
|
||||
# Linux (.deb) Debian Bookworm i386 Build Target #
|
||||
#-----------------------------------------------------------------------#
|
||||
#-----------------------------------------------------------#
|
||||
# Linux (.deb) Debian Bookworm i386 Build Target #
|
||||
#-----------------------------------------------------------#
|
||||
"Linux i386 .deb (Debian Bookworm)":
|
||||
image: registry.gitlab.com/openrgbdevelopers/openrgb-linux-ci-deb-builder:bookworm-i386
|
||||
tags:
|
||||
- linux
|
||||
- i386
|
||||
stage: build
|
||||
script:
|
||||
- ./scripts/build-package-files.sh debian/changelog
|
||||
- dpkg-architecture -l
|
||||
- dpkg-buildpackage -us -B
|
||||
- rm -v ../openrgb-dbgsym*.deb
|
||||
- mv -v ../openrgb*.deb ./
|
||||
variables:
|
||||
TGT_ARCH: "i386"
|
||||
TGT_DEB: "bookworm"
|
||||
<<: *debian_script_steps
|
||||
|
||||
artifacts:
|
||||
name: "${CI_PROJECT_NAME}_Linux_i386_deb_${CI_COMMIT_SHORT_SHA}"
|
||||
paths:
|
||||
- openrgb*.deb
|
||||
exclude:
|
||||
- openrgb-dbgsym*.deb
|
||||
expire_in: 30 days
|
||||
#-----------------------------------------------------------#
|
||||
# Linux (.deb) Debian Trixie i386 Build Target #
|
||||
#-----------------------------------------------------------#
|
||||
"Linux i386 .deb (Debian Trixie)":
|
||||
variables:
|
||||
TGT_ARCH: "i386"
|
||||
TGT_DEB: "trixie"
|
||||
<<: *debian_script_steps
|
||||
|
||||
rules:
|
||||
- !reference [.upstream_rules, rules]
|
||||
|
||||
#-----------------------------------------------------------------------#
|
||||
# Linux (.deb) Debian Bookworm amd64 Build Target #
|
||||
#-----------------------------------------------------------------------#
|
||||
#-----------------------------------------------------------#
|
||||
# Linux (.deb) Debian Bookworm amd64 Build Target #
|
||||
#-----------------------------------------------------------#
|
||||
"Linux amd64 .deb (Debian Bookworm)":
|
||||
image: registry.gitlab.com/openrgbdevelopers/openrgb-linux-ci-deb-builder:bookworm-amd64
|
||||
tags:
|
||||
- linux
|
||||
- amd64
|
||||
stage: build
|
||||
script:
|
||||
- ./scripts/build-package-files.sh debian/changelog
|
||||
- dpkg-architecture -l
|
||||
- dpkg-buildpackage -us -B
|
||||
- rm -v ../openrgb-dbgsym*.deb
|
||||
- mv -v ../openrgb*.deb ./
|
||||
variables:
|
||||
TGT_ARCH: "amd64"
|
||||
TGT_DEB: "bookworm"
|
||||
<<: *debian_script_steps
|
||||
|
||||
artifacts:
|
||||
name: "${CI_PROJECT_NAME}_Linux_amd64_deb_${CI_COMMIT_SHORT_SHA}"
|
||||
paths:
|
||||
- openrgb*.deb
|
||||
exclude:
|
||||
- openrgb-dbgsym*.deb
|
||||
expire_in: 30 days
|
||||
#-----------------------------------------------------------#
|
||||
# Linux (.deb) Debian Trixie amd64 Build Target #
|
||||
#-----------------------------------------------------------#
|
||||
"Linux amd64 .deb (Debian Trixie)":
|
||||
variables:
|
||||
TGT_ARCH: "amd64"
|
||||
TGT_DEB: "trixie"
|
||||
<<: *debian_script_steps
|
||||
|
||||
rules:
|
||||
- !reference [.upstream_rules, rules]
|
||||
|
||||
#-----------------------------------------------------------------------#
|
||||
# Linux (.deb) Debian Bookworm armhf Build Target #
|
||||
#-----------------------------------------------------------------------#
|
||||
#-----------------------------------------------------------#
|
||||
# Linux (.deb) Debian Bookworm armhf Build Target #
|
||||
#-----------------------------------------------------------#
|
||||
"Linux armhf .deb (Debian Bookworm)":
|
||||
image: registry.gitlab.com/openrgbdevelopers/openrgb-linux-ci-deb-builder:bookworm-armhf
|
||||
tags:
|
||||
- linux
|
||||
- armhf
|
||||
stage: build
|
||||
script:
|
||||
- ./scripts/build-package-files.sh debian/changelog
|
||||
- dpkg-architecture -l
|
||||
- dpkg-buildpackage -us -B
|
||||
- rm -v ../openrgb-dbgsym*.deb
|
||||
- mv -v ../openrgb*.deb ./
|
||||
variables:
|
||||
TGT_ARCH: "armhf"
|
||||
TGT_DEB: "bookworm"
|
||||
<<: *debian_script_steps
|
||||
|
||||
artifacts:
|
||||
name: "${CI_PROJECT_NAME}_Linux_armhf_deb_${CI_COMMIT_SHORT_SHA}"
|
||||
paths:
|
||||
- openrgb*.deb
|
||||
exclude:
|
||||
- openrgb-dbgsym*.deb
|
||||
expire_in: 30 days
|
||||
#-----------------------------------------------------------#
|
||||
# Linux (.deb) Debian Trixie armhf Build Target #
|
||||
#-----------------------------------------------------------#
|
||||
"Linux armhf .deb (Debian Trixie)":
|
||||
variables:
|
||||
TGT_ARCH: "armhf"
|
||||
TGT_DEB: "trixie"
|
||||
<<: *debian_script_steps
|
||||
|
||||
rules:
|
||||
- !reference [.upstream_rules, rules]
|
||||
|
||||
#-----------------------------------------------------------------------#
|
||||
# Linux (.deb) Debian Bookworm arm64 Build Target #
|
||||
#-----------------------------------------------------------------------#
|
||||
#-----------------------------------------------------------#
|
||||
# Linux (.deb) Debian Bookworm arm64 Build Target #
|
||||
#-----------------------------------------------------------#
|
||||
"Linux arm64 .deb (Debian Bookworm)":
|
||||
image: registry.gitlab.com/openrgbdevelopers/openrgb-linux-ci-deb-builder:bookworm-arm64
|
||||
tags:
|
||||
- linux
|
||||
- arm64
|
||||
variables:
|
||||
TGT_ARCH: "arm64"
|
||||
TGT_DEB: "bookworm"
|
||||
<<: *debian_script_steps
|
||||
|
||||
#-----------------------------------------------------------#
|
||||
# Linux (.deb) Debian Trixie arm64 Build Target #
|
||||
#-----------------------------------------------------------#
|
||||
"Linux arm64 .deb (Debian Trixie)":
|
||||
variables:
|
||||
TGT_ARCH: "arm64"
|
||||
TGT_DEB: "trixie"
|
||||
<<: *debian_script_steps
|
||||
|
||||
#-----------------------------------------------------------#
|
||||
# Linux (.rpm, F43) 64-bit Build Target #
|
||||
#-----------------------------------------------------------#
|
||||
"Linux 64 F43 rpm":
|
||||
image: fedora:43
|
||||
stage: build
|
||||
script:
|
||||
- ./scripts/build-package-files.sh debian/changelog
|
||||
- dpkg-architecture -l
|
||||
- dpkg-buildpackage -us -B
|
||||
- rm -v ../openrgb-dbgsym*.deb
|
||||
- mv -v ../openrgb*.deb ./
|
||||
|
||||
artifacts:
|
||||
name: "${CI_PROJECT_NAME}_Linux_arm64_deb_${CI_COMMIT_SHORT_SHA}"
|
||||
paths:
|
||||
- openrgb*.deb
|
||||
exclude:
|
||||
- openrgb-dbgsym*.deb
|
||||
expire_in: 30 days
|
||||
|
||||
rules:
|
||||
- !reference [.upstream_rules, rules]
|
||||
|
||||
#-----------------------------------------------------------------------#
|
||||
# Linux (.rpm, F40) 64-bit Build Target #
|
||||
#-----------------------------------------------------------------------#
|
||||
"Linux 64 F40 rpm":
|
||||
image: fedora:40
|
||||
stage: build
|
||||
script:
|
||||
- dnf install rpmdevtools dnf-plugins-core libcurl-devel qt5-qtbase-devel git -y
|
||||
- dnf install rpmdevtools dnf-plugins-core libcurl-devel qt5-qtbase-devel git wget -y
|
||||
- 'wget -O hidapi-hotplug.zip https://gitlab.com/OpenRGBDevelopers/hidapi-hotplug/-/jobs/artifacts/master/download?job=Linux+64+F43+rpm'
|
||||
- unzip hidapi-hotplug.zip
|
||||
- dnf install ./*.rpm -y
|
||||
- rpmdev-setuptree
|
||||
- ./scripts/build-package-files.sh fedora/OpenRGB.spec
|
||||
- cp fedora/OpenRGB.spec /root/rpmbuild/SPECS
|
||||
@@ -405,94 +320,103 @@ before_script:
|
||||
rules:
|
||||
- !reference [.upstream_rules, rules]
|
||||
|
||||
#-----------------------------------------------------------------------#
|
||||
# Debian i386 Bookworm test #
|
||||
#-----------------------------------------------------------------------#
|
||||
#-----------------------------------------------------------#
|
||||
# Debian i386 Bookworm test #
|
||||
#-----------------------------------------------------------#
|
||||
"Debian i386 Bookworm":
|
||||
image: i386/debian:bookworm
|
||||
stage: test
|
||||
script:
|
||||
- apt update
|
||||
- DEBIAN_FRONTEND=noninteractive apt update
|
||||
- DEBIAN_FRONTEND=noninteractive apt install -y unzip curl
|
||||
- 'curl -o hidapi-hotplug.zip -L https://gitlab.com/OpenRGBDevelopers/hidapi-hotplug/-/jobs/artifacts/master/download?job=Linux+i386+.deb+%28Debian+Bookworm%29'
|
||||
- unzip hidapi-hotplug.zip
|
||||
- DEBIAN_FRONTEND=noninteractive apt install -yq --no-install-recommends ./libhidapi-hotplug*.deb
|
||||
- DEBIAN_FRONTEND=noninteractive apt install -yq --no-install-recommends ./openrgb*i386.deb
|
||||
- openrgb --version
|
||||
- apt remove -y openrgb
|
||||
- DEBIAN_FRONTEND=noninteractive apt remove -y openrgb
|
||||
dependencies:
|
||||
- "Linux i386 .deb (Debian Bookworm)"
|
||||
needs:
|
||||
- "Linux i386 .deb (Debian Bookworm)"
|
||||
rules:
|
||||
- !reference [.upstream_rules, rules]
|
||||
|
||||
#-----------------------------------------------------------------------#
|
||||
# Debian amd64 Bookworm test #
|
||||
#-----------------------------------------------------------------------#
|
||||
#-----------------------------------------------------------#
|
||||
# Debian amd64 Bookworm test #
|
||||
#-----------------------------------------------------------#
|
||||
"Debian amd64 Bookworm":
|
||||
image: amd64/debian:bookworm
|
||||
stage: test
|
||||
script:
|
||||
- apt update
|
||||
- DEBIAN_FRONTEND=noninteractive apt update
|
||||
- DEBIAN_FRONTEND=noninteractive apt install -y unzip curl
|
||||
- 'curl -o hidapi-hotplug.zip -L https://gitlab.com/OpenRGBDevelopers/hidapi-hotplug/-/jobs/artifacts/master/download?job=Linux+amd64+.deb+%28Debian+Bookworm%29'
|
||||
- unzip hidapi-hotplug.zip
|
||||
- DEBIAN_FRONTEND=noninteractive apt install -yq --no-install-recommends ./libhidapi-hotplug*.deb
|
||||
- DEBIAN_FRONTEND=noninteractive apt install -yq --no-install-recommends ./openrgb*amd64.deb
|
||||
- openrgb --version
|
||||
- apt remove -y openrgb
|
||||
- DEBIAN_FRONTEND=noninteractive apt remove -y openrgb
|
||||
dependencies:
|
||||
- "Linux amd64 .deb (Debian Bookworm)"
|
||||
needs:
|
||||
- "Linux amd64 .deb (Debian Bookworm)"
|
||||
rules:
|
||||
- !reference [.upstream_rules, rules]
|
||||
|
||||
#-----------------------------------------------------------------------#
|
||||
# Ubuntu amd64 22.04 test #
|
||||
#-----------------------------------------------------------------------#
|
||||
"Ubuntu amd64 22.04LTS":
|
||||
image: ubuntu:jammy
|
||||
stage: test
|
||||
script:
|
||||
- apt update
|
||||
- DEBIAN_FRONTEND=noninteractive apt install -yq --no-install-recommends ./openrgb*amd64.deb
|
||||
- openrgb --version
|
||||
- apt remove -y openrgb
|
||||
dependencies:
|
||||
- "Linux amd64 .deb (Debian Bookworm)"
|
||||
needs:
|
||||
- "Linux amd64 .deb (Debian Bookworm)"
|
||||
|
||||
#-----------------------------------------------------------------------#
|
||||
# Ubuntu amd64 24.04 test #
|
||||
#-----------------------------------------------------------------------#
|
||||
#-----------------------------------------------------------#
|
||||
# Ubuntu amd64 24.04 test #
|
||||
#-----------------------------------------------------------#
|
||||
"Ubuntu amd64 24.04LTS":
|
||||
image: ubuntu:noble
|
||||
stage: test
|
||||
script:
|
||||
- apt update
|
||||
- DEBIAN_FRONTEND=noninteractive apt update
|
||||
- DEBIAN_FRONTEND=noninteractive apt install -y unzip curl
|
||||
- 'curl -o hidapi-hotplug.zip -L https://gitlab.com/OpenRGBDevelopers/hidapi-hotplug/-/jobs/artifacts/master/download?job=Linux+amd64+.deb+%28Debian+Bookworm%29'
|
||||
- unzip hidapi-hotplug.zip
|
||||
- DEBIAN_FRONTEND=noninteractive apt install -yq --no-install-recommends ./libhidapi-hotplug*.deb
|
||||
- DEBIAN_FRONTEND=noninteractive apt install -yq --no-install-recommends ./openrgb*amd64.deb
|
||||
- openrgb --version
|
||||
- apt remove -y openrgb
|
||||
- DEBIAN_FRONTEND=noninteractive apt remove -y openrgb
|
||||
dependencies:
|
||||
- "Linux amd64 .deb (Debian Bookworm)"
|
||||
needs:
|
||||
- "Linux amd64 .deb (Debian Bookworm)"
|
||||
rules:
|
||||
- !reference [.upstream_rules, rules]
|
||||
|
||||
#-----------------------------------------------------------------------#
|
||||
# Fedora 64 v40 test #
|
||||
#-----------------------------------------------------------------------#
|
||||
"Fedora 64 v40":
|
||||
image: fedora:40
|
||||
#-----------------------------------------------------------#
|
||||
# Fedora 64 v43 test #
|
||||
#-----------------------------------------------------------#
|
||||
"Fedora 64 v43":
|
||||
image: fedora:43
|
||||
stage: test
|
||||
script:
|
||||
- yum -y localinstall ./openrgb*64.rpm
|
||||
- dnf install unzip wget -y
|
||||
- 'wget -O hidapi-hotplug.zip https://gitlab.com/OpenRGBDevelopers/hidapi-hotplug/-/jobs/artifacts/master/download?job=Linux+64+F43+rpm'
|
||||
- unzip hidapi-hotplug.zip
|
||||
- dnf install ./*.rpm -y
|
||||
- dnf5 -y install ./openrgb*64.rpm
|
||||
- openrgb --version
|
||||
- yum -y remove openrgb
|
||||
- dnf5 -y remove openrgb
|
||||
dependencies:
|
||||
- "Linux 64 F40 rpm"
|
||||
- "Linux 64 F43 rpm"
|
||||
needs:
|
||||
- "Linux 64 F40 rpm"
|
||||
- "Linux 64 F43 rpm"
|
||||
rules:
|
||||
- !reference [.upstream_rules, rules]
|
||||
|
||||
#-----------------------------------------------------------------------#
|
||||
# Windows (32-bit) Build Target #
|
||||
#-----------------------------------------------------------------------#
|
||||
#-----------------------------------------------------------#
|
||||
# Windows (32-bit) Build Target #
|
||||
#-----------------------------------------------------------#
|
||||
"Windows 32":
|
||||
extends:
|
||||
- .shared_windows_runners
|
||||
stage: build
|
||||
script:
|
||||
- scripts\build-windows.bat 5.15.0 2019 32
|
||||
- $ErrorActionPreference = "SilentlyContinue" ; Set-MpPreference -DisableRealtimeMonitoring $true ; $ErrorActionPreference = "Stop"
|
||||
- scripts\build-windows.bat 6.8.3 2022 32
|
||||
artifacts:
|
||||
name: "${CI_PROJECT_NAME}_Windows_32_${CI_COMMIT_SHORT_SHA}"
|
||||
paths:
|
||||
@@ -504,17 +428,18 @@ before_script:
|
||||
rules:
|
||||
- !reference [.upstream_rules, rules]
|
||||
|
||||
#-----------------------------------------------------------------------#
|
||||
# Windows (32-bit) Qt6 Build Target #
|
||||
#-----------------------------------------------------------------------#
|
||||
"Windows 32 Qt6":
|
||||
#-----------------------------------------------------------#
|
||||
# Windows (32-bit) Qt5 Build Target #
|
||||
#-----------------------------------------------------------#
|
||||
"Windows 32 Qt5":
|
||||
extends:
|
||||
- .shared_windows_runners
|
||||
stage: build
|
||||
script:
|
||||
- scripts\build-windows.bat 6.8.3 2022 32
|
||||
- $ErrorActionPreference = "SilentlyContinue" ; Set-MpPreference -DisableRealtimeMonitoring $true ; $ErrorActionPreference = "Stop"
|
||||
- scripts\build-windows.bat 5.15.0 2019 32
|
||||
artifacts:
|
||||
name: "${CI_PROJECT_NAME}_Windows_32_Qt6_${CI_COMMIT_SHORT_SHA}"
|
||||
name: "${CI_PROJECT_NAME}_Windows_32_Qt5_${CI_COMMIT_SHORT_SHA}"
|
||||
paths:
|
||||
- 'OpenRGB Windows 32-bit'
|
||||
exclude:
|
||||
@@ -524,15 +449,16 @@ before_script:
|
||||
rules:
|
||||
- !reference [.upstream_rules, rules]
|
||||
|
||||
#-----------------------------------------------------------------------#
|
||||
# Windows (64-bit) Build Target #
|
||||
#-----------------------------------------------------------------------#
|
||||
#-----------------------------------------------------------#
|
||||
# Windows (64-bit) Build Target #
|
||||
#-----------------------------------------------------------#
|
||||
"Windows 64 Base":
|
||||
extends:
|
||||
- .shared_windows_runners
|
||||
stage: build
|
||||
script:
|
||||
- scripts\build-windows.bat 5.15.0 2019 64
|
||||
- $ErrorActionPreference = "SilentlyContinue" ; Set-MpPreference -DisableRealtimeMonitoring $true ; $ErrorActionPreference = "Stop"
|
||||
- scripts\build-windows.bat 6.8.3 2022 64
|
||||
artifacts:
|
||||
name: "${CI_PROJECT_NAME}_Windows_64_${CI_COMMIT_SHORT_SHA}"
|
||||
paths:
|
||||
@@ -545,13 +471,12 @@ before_script:
|
||||
- if: $CI_PIPELINE_SOURCE == "merge_request_event" || $CI_PIPELINE_SOURCE == "push"
|
||||
when: never
|
||||
|
||||
|
||||
"Windows 64":
|
||||
extends: "Windows 64 Base"
|
||||
rules:
|
||||
- !reference [.fork_local_runner_rules, rules]
|
||||
- !reference [.upstream_rules, rules]
|
||||
|
||||
"Windows 64 (gitlab.com runner)":
|
||||
"Windows 64 (Downstream)":
|
||||
extends: "Windows 64 Base"
|
||||
before_script:
|
||||
- git clone https://gitlab.com/OpenRGBDevelopers/OpenRGB-Qt-Packages
|
||||
@@ -559,21 +484,22 @@ before_script:
|
||||
- .\install-chocolatey.bat
|
||||
- cd ..
|
||||
rules:
|
||||
- !reference [.fork_gitlab_runner_rules, rules]
|
||||
- !reference [.downstream_rules, rules]
|
||||
tags:
|
||||
- "saas-windows-medium-amd64"
|
||||
|
||||
#-----------------------------------------------------------------------#
|
||||
# Windows (64-bit) Qt6 Build Target #
|
||||
#-----------------------------------------------------------------------#
|
||||
"Windows 64 Qt6 Base":
|
||||
#-----------------------------------------------------------#
|
||||
# Windows (64-bit) Qt5 Build Target #
|
||||
#-----------------------------------------------------------#
|
||||
"Windows 64 Qt5 Base":
|
||||
extends:
|
||||
- .shared_windows_runners
|
||||
stage: build
|
||||
script:
|
||||
- scripts\build-windows.bat 6.8.3 2022 64
|
||||
- $ErrorActionPreference = "SilentlyContinue" ; Set-MpPreference -DisableRealtimeMonitoring $true ; $ErrorActionPreference = "Stop"
|
||||
- scripts\build-windows.bat 5.15.0 2019 64
|
||||
artifacts:
|
||||
name: "${CI_PROJECT_NAME}_Windows_64_Qt6_${CI_COMMIT_SHORT_SHA}"
|
||||
name: "${CI_PROJECT_NAME}_Windows_64_Qt5_${CI_COMMIT_SHORT_SHA}"
|
||||
paths:
|
||||
- 'OpenRGB Windows 64-bit'
|
||||
exclude:
|
||||
@@ -585,35 +511,32 @@ before_script:
|
||||
when: never
|
||||
|
||||
|
||||
"Windows 64 Qt6":
|
||||
extends: "Windows 64 Qt6 Base"
|
||||
"Windows 64 Qt5":
|
||||
extends: "Windows 64 Qt5 Base"
|
||||
rules:
|
||||
- !reference [.fork_local_runner_rules, rules]
|
||||
- !reference [.upstream_rules, rules]
|
||||
|
||||
"Windows 64 Qt6 (gitlab.com runner)":
|
||||
extends: "Windows 64 Qt6 Base"
|
||||
"Windows 64 Qt5 (Downstream)":
|
||||
extends: "Windows 64 Qt5 Base"
|
||||
before_script:
|
||||
- git clone https://gitlab.com/OpenRGBDevelopers/OpenRGB-Qt-Packages
|
||||
- cd OpenRGB-Qt-Packages
|
||||
- .\install-chocolatey.bat
|
||||
- cd ..
|
||||
rules:
|
||||
- !reference [.fork_gitlab_runner_rules, rules]
|
||||
- !reference [.downstream_rules, rules]
|
||||
tags:
|
||||
- "saas-windows-medium-amd64"
|
||||
|
||||
#-----------------------------------------------------------------------#
|
||||
# MacOS Build Target #
|
||||
#-----------------------------------------------------------------------#
|
||||
#-----------------------------------------------------------#
|
||||
# MacOS Build Target #
|
||||
#-----------------------------------------------------------#
|
||||
"MacOS ARM64":
|
||||
tags:
|
||||
- macos
|
||||
stage: build
|
||||
script:
|
||||
- eval $(/opt/homebrew/bin/brew shellenv)
|
||||
- qmake OpenRGB.pro
|
||||
- make -j16
|
||||
- macdeployqt OpenRGB.app -codesign=OpenRGB
|
||||
- ./scripts/build-macos.sh qt6 arm
|
||||
|
||||
artifacts:
|
||||
name: "${CI_PROJECT_NAME}_MacOS_ARM64_${CI_COMMIT_SHORT_SHA}"
|
||||
@@ -622,23 +545,30 @@ before_script:
|
||||
expire_in: 30 days
|
||||
|
||||
rules:
|
||||
- if: '$CI_PROJECT_PATH == "CalcProgrammer1/OpenRGB"'
|
||||
when: on_success
|
||||
- if: '$BUILD_MACOS =~ /.+/'
|
||||
when: on_success
|
||||
- if: $CI_PIPELINE_SOURCE == "push"
|
||||
when: manual
|
||||
allow_failure: true
|
||||
- !reference [.upstream_rules, rules]
|
||||
|
||||
"MacOS ARM64 Qt5":
|
||||
tags:
|
||||
- macos
|
||||
stage: build
|
||||
script:
|
||||
- ./scripts/build-macos.sh qt5 arm
|
||||
|
||||
artifacts:
|
||||
name: "${CI_PROJECT_NAME}_MacOS_Qt5_ARM64_${CI_COMMIT_SHORT_SHA}"
|
||||
paths:
|
||||
- OpenRGB.app
|
||||
expire_in: 30 days
|
||||
|
||||
rules:
|
||||
- !reference [.upstream_rules, rules]
|
||||
|
||||
"MacOS Intel":
|
||||
tags:
|
||||
- macos
|
||||
stage: build
|
||||
script:
|
||||
- eval $(/usr/local/bin/brew shellenv)
|
||||
- arch -x86_64 /usr/local/bin/qmake OpenRGB.pro
|
||||
- arch -x86_64 make -j16
|
||||
- arch -x86_64 macdeployqt OpenRGB.app -codesign=OpenRGB
|
||||
- ./scripts/build-macos.sh qt6 intel
|
||||
|
||||
artifacts:
|
||||
name: "${CI_PROJECT_NAME}_MacOS_Intel_${CI_COMMIT_SHORT_SHA}"
|
||||
@@ -647,17 +577,27 @@ before_script:
|
||||
expire_in: 30 days
|
||||
|
||||
rules:
|
||||
- if: '$CI_PROJECT_PATH == "CalcProgrammer1/OpenRGB"'
|
||||
when: on_success
|
||||
- if: '$BUILD_MACOS =~ /.+/'
|
||||
when: on_success
|
||||
- if: $CI_PIPELINE_SOURCE == "push"
|
||||
when: manual
|
||||
allow_failure: true
|
||||
- !reference [.upstream_rules, rules]
|
||||
|
||||
#-----------------------------------------------------------------------#
|
||||
# Windows (64-bit) MSI Target #
|
||||
#-----------------------------------------------------------------------#
|
||||
"MacOS Intel Qt5":
|
||||
tags:
|
||||
- macos
|
||||
stage: build
|
||||
script:
|
||||
- ./scripts/build-macos.sh qt5 intel
|
||||
|
||||
artifacts:
|
||||
name: "${CI_PROJECT_NAME}_MacOS_Intel_Qt5_${CI_COMMIT_SHORT_SHA}"
|
||||
paths:
|
||||
- OpenRGB.app
|
||||
expire_in: 30 days
|
||||
|
||||
rules:
|
||||
- !reference [.upstream_rules, rules]
|
||||
|
||||
#-----------------------------------------------------------#
|
||||
# Windows (64-bit) MSI Target #
|
||||
#-----------------------------------------------------------#
|
||||
"Windows 64 MSI":
|
||||
image: registry.gitlab.com/openrgbdevelopers/openrgb-linux-ci-deb-builder:bookworm-i386
|
||||
stage: deploy
|
||||
|
||||
+1
-2
@@ -22,13 +22,12 @@ CODEOWNERS @Calcprogrammer1
|
||||
/Controllers/BlinkyTapeController/
|
||||
/Controllers/CoolerMasterController/ @Dr_No
|
||||
/Controllers/CorsairCommanderCoreController/
|
||||
/Controllers/CorsairDominatorPlatinumController/
|
||||
/Controllers/CorsairDRAMController/
|
||||
/Controllers/CorsairHydroController/
|
||||
/Controllers/CorsairHydroPlatinumController/
|
||||
/Controllers/CorsairLightingNodeController/
|
||||
/Controllers/CorsairPeripheralController/
|
||||
/Controllers/CorsairVengeanceController/
|
||||
/Controllers/CorsairVengeanceProController/
|
||||
/Controllers/CorsairWirelessController/
|
||||
/Controllers/CreativeController/
|
||||
/Controllers/CrucialController/
|
||||
|
||||
@@ -23,7 +23,7 @@ Please add a link to the manufacturer's product page beneath this line
|
||||
~"DeviceType::IDK" <!-- I Don't know -->
|
||||
~"DeviceType::USB" <!-- The device connects to an internal header or external usb port -->
|
||||
~"DeviceType::GPU::AMD" <!-- The device is an AMD GPU -->
|
||||
~"DeviceType::GPU::Nvidia" <!-- The device is a Nvidia GPU -->
|
||||
~"DeviceType::GPU::NVidia" <!-- The device is a Nvidia GPU -->
|
||||
~"DeviceType::SMBus" <!-- The device is connected to the SMBus eg. RAM -->
|
||||
~"DeviceType::WMI" <!-- The device is controlled through Windows Management Instrumentation -->
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
| Autostart implementation for FreeBSD |
|
||||
| |
|
||||
| This file is part of the OpenRGB project |
|
||||
| SPDX-License-Identifier: GPL-2.0-only |
|
||||
| SPDX-License-Identifier: GPL-2.0-or-later |
|
||||
\*---------------------------------------------------------*/
|
||||
|
||||
#include <fstream>
|
||||
@@ -26,21 +26,21 @@ bool AutoStart::DisableAutoStart()
|
||||
std::error_code autostart_file_remove_errcode;
|
||||
bool success = false;
|
||||
|
||||
/*-------------------------------------------------*\
|
||||
| Check if the filename is valid |
|
||||
\*-------------------------------------------------*/
|
||||
/*-----------------------------------------------------*\
|
||||
| Check if the filename is valid |
|
||||
\*-----------------------------------------------------*/
|
||||
if(autostart_file != "")
|
||||
{
|
||||
/*---------------------------------------------*\
|
||||
| If file doesn't exist, disable is successful |
|
||||
\*---------------------------------------------*/
|
||||
/*-------------------------------------------------*\
|
||||
| If file doesn't exist, disable is successful |
|
||||
\*-------------------------------------------------*/
|
||||
if(!filesystem::exists(autostart_file))
|
||||
{
|
||||
success = true;
|
||||
}
|
||||
/*---------------------------------------------*\
|
||||
| Otherwise, delete the file |
|
||||
\*---------------------------------------------*/
|
||||
/*-------------------------------------------------*\
|
||||
| Otherwise, delete the file |
|
||||
\*-------------------------------------------------*/
|
||||
else
|
||||
{
|
||||
success = filesystem::remove(autostart_file, autostart_file_remove_errcode);
|
||||
@@ -63,27 +63,26 @@ bool AutoStart::EnableAutoStart(AutoStartInfo autostart_info)
|
||||
{
|
||||
bool success = false;
|
||||
|
||||
/*-------------------------------------------------*\
|
||||
| Check if the filename is valid |
|
||||
\*-------------------------------------------------*/
|
||||
/*-----------------------------------------------------*\
|
||||
| Check if the filename is valid |
|
||||
\*-----------------------------------------------------*/
|
||||
if(autostart_file != "")
|
||||
{
|
||||
std::ofstream autostart_file_stream(autostart_file, std::ios::out | std::ios::trunc);
|
||||
|
||||
/*---------------------------------------------*\
|
||||
| Error out if the file could not be opened |
|
||||
\*---------------------------------------------*/
|
||||
/*-------------------------------------------------*\
|
||||
| Error out if the file could not be opened |
|
||||
\*-------------------------------------------------*/
|
||||
if(!autostart_file_stream)
|
||||
{
|
||||
LOG_ERROR("[AutoStart] Could not open %s for writing.", autostart_file.c_str());
|
||||
success = false;
|
||||
}
|
||||
/*---------------------------------------------*\
|
||||
| Otherwise, write the file |
|
||||
\*---------------------------------------------*/
|
||||
/*-------------------------------------------------*\
|
||||
| Otherwise, write the file |
|
||||
\*-------------------------------------------------*/
|
||||
else
|
||||
{
|
||||
//autostart_file_stream << desktop_file;
|
||||
autostart_file_stream.close();
|
||||
success = !autostart_file_stream.fail();
|
||||
|
||||
@@ -103,9 +102,9 @@ bool AutoStart::EnableAutoStart(AutoStartInfo autostart_info)
|
||||
|
||||
bool AutoStart::IsAutoStartEnabled()
|
||||
{
|
||||
/*-------------------------------------------------*\
|
||||
| Check if the filename is valid |
|
||||
\*-------------------------------------------------*/
|
||||
/*-----------------------------------------------------*\
|
||||
| Check if the filename is valid |
|
||||
\*-----------------------------------------------------*/
|
||||
if(autostart_file != "")
|
||||
{
|
||||
return(filesystem::exists(autostart_file));
|
||||
@@ -118,9 +117,9 @@ bool AutoStart::IsAutoStartEnabled()
|
||||
|
||||
std::string AutoStart::GetExePath()
|
||||
{
|
||||
/*-------------------------------------------------*\
|
||||
| Create the OpenRGB executable path |
|
||||
\*-------------------------------------------------*/
|
||||
/*-----------------------------------------------------*\
|
||||
| Create the OpenRGB executable path |
|
||||
\*-----------------------------------------------------*/
|
||||
char exepath[ PATH_MAX ];
|
||||
|
||||
ssize_t count = readlink("/proc/self/exe", exepath, PATH_MAX);
|
||||
@@ -134,16 +133,16 @@ void AutoStart::InitAutoStart(std::string name)
|
||||
|
||||
autostart_name = name;
|
||||
|
||||
/*-------------------------------------------------*\
|
||||
| Get home and config paths |
|
||||
\*-------------------------------------------------*/
|
||||
/*-----------------------------------------------------*\
|
||||
| Get home and config paths |
|
||||
\*-----------------------------------------------------*/
|
||||
const char *xdg_config_home = getenv("XDG_CONFIG_HOME");
|
||||
const char *home = getenv("HOME");
|
||||
|
||||
/*-------------------------------------------------*\
|
||||
| Determine where the autostart .desktop files are |
|
||||
| kept |
|
||||
\*-------------------------------------------------*/
|
||||
/*-----------------------------------------------------*\
|
||||
| Determine where the autostart .desktop files are |
|
||||
| kept |
|
||||
\*-----------------------------------------------------*/
|
||||
if(xdg_config_home != NULL)
|
||||
{
|
||||
autostart_dir = xdg_config_home;
|
||||
@@ -155,9 +154,9 @@ void AutoStart::InitAutoStart(std::string name)
|
||||
autostart_dir = autostart_dir + "/.config/autostart/";
|
||||
}
|
||||
|
||||
/*-------------------------------------------------*\
|
||||
| Check if the filename is valid |
|
||||
\*-------------------------------------------------*/
|
||||
/*-----------------------------------------------------*\
|
||||
| Check if the filename is valid |
|
||||
\*-----------------------------------------------------*/
|
||||
if(autostart_dir != "")
|
||||
{
|
||||
std::error_code ec;
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
| Autostart implementation for FreeBSD |
|
||||
| |
|
||||
| This file is part of the OpenRGB project |
|
||||
| SPDX-License-Identifier: GPL-2.0-only |
|
||||
| SPDX-License-Identifier: GPL-2.0-or-later |
|
||||
\*---------------------------------------------------------*/
|
||||
|
||||
#pragma once
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
| Autostart implementation for Linux |
|
||||
| |
|
||||
| This file is part of the OpenRGB project |
|
||||
| SPDX-License-Identifier: GPL-2.0-only |
|
||||
| SPDX-License-Identifier: GPL-2.0-or-later |
|
||||
\*---------------------------------------------------------*/
|
||||
|
||||
#include <fstream>
|
||||
@@ -26,21 +26,21 @@ bool AutoStart::DisableAutoStart()
|
||||
std::error_code autostart_file_remove_errcode;
|
||||
bool success = false;
|
||||
|
||||
/*-------------------------------------------------*\
|
||||
| Check if the filename is valid |
|
||||
\*-------------------------------------------------*/
|
||||
/*-----------------------------------------------------*\
|
||||
| Check if the filename is valid |
|
||||
\*-----------------------------------------------------*/
|
||||
if(autostart_file != "")
|
||||
{
|
||||
/*---------------------------------------------*\
|
||||
| If file doesn't exist, disable is successful |
|
||||
\*---------------------------------------------*/
|
||||
/*-------------------------------------------------*\
|
||||
| If file doesn't exist, disable is successful |
|
||||
\*-------------------------------------------------*/
|
||||
if(!filesystem::exists(autostart_file))
|
||||
{
|
||||
success = true;
|
||||
}
|
||||
/*---------------------------------------------*\
|
||||
| Otherwise, delete the file |
|
||||
\*---------------------------------------------*/
|
||||
/*-------------------------------------------------*\
|
||||
| Otherwise, delete the file |
|
||||
\*-------------------------------------------------*/
|
||||
else
|
||||
{
|
||||
success = filesystem::remove(autostart_file, autostart_file_remove_errcode);
|
||||
@@ -63,25 +63,25 @@ bool AutoStart::EnableAutoStart(AutoStartInfo autostart_info)
|
||||
{
|
||||
bool success = false;
|
||||
|
||||
/*-------------------------------------------------*\
|
||||
| Check if the filename is valid |
|
||||
\*-------------------------------------------------*/
|
||||
/*-----------------------------------------------------*\
|
||||
| Check if the filename is valid |
|
||||
\*-----------------------------------------------------*/
|
||||
if(autostart_file != "")
|
||||
{
|
||||
std::string desktop_file = GenerateDesktopFile(autostart_info);
|
||||
std::ofstream autostart_file_stream(autostart_file, std::ios::out | std::ios::trunc);
|
||||
|
||||
/*---------------------------------------------*\
|
||||
| Error out if the file could not be opened |
|
||||
\*---------------------------------------------*/
|
||||
/*-------------------------------------------------*\
|
||||
| Error out if the file could not be opened |
|
||||
\*-------------------------------------------------*/
|
||||
if(!autostart_file_stream)
|
||||
{
|
||||
LOG_ERROR("[AutoStart] Could not open %s for writing.", autostart_file.c_str());
|
||||
success = false;
|
||||
}
|
||||
/*---------------------------------------------*\
|
||||
| Otherwise, write the file |
|
||||
\*---------------------------------------------*/
|
||||
/*-------------------------------------------------*\
|
||||
| Otherwise, write the file |
|
||||
\*-------------------------------------------------*/
|
||||
else
|
||||
{
|
||||
autostart_file_stream << desktop_file;
|
||||
@@ -104,9 +104,9 @@ bool AutoStart::EnableAutoStart(AutoStartInfo autostart_info)
|
||||
|
||||
bool AutoStart::IsAutoStartEnabled()
|
||||
{
|
||||
/*-------------------------------------------------*\
|
||||
| Check if the filename is valid |
|
||||
\*-------------------------------------------------*/
|
||||
/*-----------------------------------------------------*\
|
||||
| Check if the filename is valid |
|
||||
\*-----------------------------------------------------*/
|
||||
if(autostart_file != "")
|
||||
{
|
||||
return(filesystem::exists(autostart_file));
|
||||
@@ -119,9 +119,9 @@ bool AutoStart::IsAutoStartEnabled()
|
||||
|
||||
std::string AutoStart::GetExePath()
|
||||
{
|
||||
/*-------------------------------------------------*\
|
||||
| Create the OpenRGB executable path |
|
||||
\*-------------------------------------------------*/
|
||||
/*-----------------------------------------------------*\
|
||||
| Create the OpenRGB executable path |
|
||||
\*-----------------------------------------------------*/
|
||||
char exepath[ PATH_MAX ];
|
||||
|
||||
ssize_t count = readlink("/proc/self/exe", exepath, PATH_MAX);
|
||||
@@ -129,17 +129,17 @@ std::string AutoStart::GetExePath()
|
||||
return(std::string(exepath, (count > 0) ? count : 0));
|
||||
}
|
||||
|
||||
/*-----------------------------------------------------*\
|
||||
| Linux AutoStart Implementation |
|
||||
| Private Methods |
|
||||
\*-----------------------------------------------------*/
|
||||
/*---------------------------------------------------------*\
|
||||
| Linux AutoStart Implementation |
|
||||
| Private Methods |
|
||||
\*---------------------------------------------------------*/
|
||||
|
||||
std::string AutoStart::GenerateDesktopFile(AutoStartInfo autostart_info)
|
||||
{
|
||||
/*-------------------------------------------------*\
|
||||
| Generate a .desktop file from the AutoStart |
|
||||
| parameters |
|
||||
\*-------------------------------------------------*/
|
||||
/*-----------------------------------------------------*\
|
||||
| Generate a .desktop file from the AutoStart |
|
||||
| parameters |
|
||||
\*-----------------------------------------------------*/
|
||||
std::stringstream fileContents;
|
||||
|
||||
fileContents << "[Desktop Entry]" << std::endl;
|
||||
@@ -151,9 +151,9 @@ std::string AutoStart::GenerateDesktopFile(AutoStartInfo autostart_info)
|
||||
fileContents << "Terminal=false" << std::endl;
|
||||
fileContents << "Type=Application" << std::endl;
|
||||
|
||||
/*-------------------------------------------------*\
|
||||
| Add the executable path and arguments |
|
||||
\*-------------------------------------------------*/
|
||||
/*-----------------------------------------------------*\
|
||||
| Add the executable path and arguments |
|
||||
\*-----------------------------------------------------*/
|
||||
fileContents << "Exec=" << autostart_info.path;
|
||||
|
||||
if (autostart_info.args != "")
|
||||
@@ -172,16 +172,16 @@ void AutoStart::InitAutoStart(std::string name)
|
||||
|
||||
autostart_name = name;
|
||||
|
||||
/*-------------------------------------------------*\
|
||||
| Get home and config paths |
|
||||
\*-------------------------------------------------*/
|
||||
/*-----------------------------------------------------*\
|
||||
| Get home and config paths |
|
||||
\*-----------------------------------------------------*/
|
||||
const char *xdg_config_home = getenv("XDG_CONFIG_HOME");
|
||||
const char *home = getenv("HOME");
|
||||
|
||||
/*-------------------------------------------------*\
|
||||
| Determine where the autostart .desktop files are |
|
||||
| kept |
|
||||
\*-------------------------------------------------*/
|
||||
/*-----------------------------------------------------*\
|
||||
| Determine where the autostart .desktop files are |
|
||||
| kept |
|
||||
\*-----------------------------------------------------*/
|
||||
if(xdg_config_home != NULL)
|
||||
{
|
||||
autostart_dir = xdg_config_home;
|
||||
@@ -193,9 +193,9 @@ void AutoStart::InitAutoStart(std::string name)
|
||||
autostart_dir = autostart_dir + "/.config/autostart/";
|
||||
}
|
||||
|
||||
/*-------------------------------------------------*\
|
||||
| Check if the filename is valid |
|
||||
\*-------------------------------------------------*/
|
||||
/*-----------------------------------------------------*\
|
||||
| Check if the filename is valid |
|
||||
\*-----------------------------------------------------*/
|
||||
if(autostart_dir != "")
|
||||
{
|
||||
std::error_code ec;
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
| Autostart implementation for Linux |
|
||||
| |
|
||||
| This file is part of the OpenRGB project |
|
||||
| SPDX-License-Identifier: GPL-2.0-only |
|
||||
| SPDX-License-Identifier: GPL-2.0-or-later |
|
||||
\*---------------------------------------------------------*/
|
||||
|
||||
#pragma once
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
| Autostart implementation for MacOS |
|
||||
| |
|
||||
| This file is part of the OpenRGB project |
|
||||
| SPDX-License-Identifier: GPL-2.0-only |
|
||||
| SPDX-License-Identifier: GPL-2.0-or-later |
|
||||
\*---------------------------------------------------------*/
|
||||
|
||||
#include <fstream>
|
||||
@@ -26,21 +26,21 @@ bool AutoStart::DisableAutoStart()
|
||||
std::error_code autostart_file_remove_errcode;
|
||||
bool success = false;
|
||||
|
||||
/*-------------------------------------------------*\
|
||||
| Check if the filename is valid |
|
||||
\*-------------------------------------------------*/
|
||||
/*-----------------------------------------------------*\
|
||||
| Check if the filename is valid |
|
||||
\*-----------------------------------------------------*/
|
||||
if(autostart_file != "")
|
||||
{
|
||||
/*---------------------------------------------*\
|
||||
| If file doesn't exist, disable is successful |
|
||||
\*---------------------------------------------*/
|
||||
/*-------------------------------------------------*\
|
||||
| If file doesn't exist, disable is successful |
|
||||
\*-------------------------------------------------*/
|
||||
if(!filesystem::exists(autostart_file))
|
||||
{
|
||||
success = true;
|
||||
}
|
||||
/*---------------------------------------------*\
|
||||
| Otherwise, delete the file |
|
||||
\*---------------------------------------------*/
|
||||
/*-------------------------------------------------*\
|
||||
| Otherwise, delete the file |
|
||||
\*-------------------------------------------------*/
|
||||
else
|
||||
{
|
||||
success = filesystem::remove(autostart_file, autostart_file_remove_errcode);
|
||||
@@ -63,25 +63,25 @@ bool AutoStart::EnableAutoStart(AutoStartInfo autostart_info)
|
||||
{
|
||||
bool success = false;
|
||||
|
||||
/*-------------------------------------------------*\
|
||||
| Check if the filename is valid |
|
||||
\*-------------------------------------------------*/
|
||||
/*-----------------------------------------------------*\
|
||||
| Check if the filename is valid |
|
||||
\*-----------------------------------------------------*/
|
||||
if(autostart_file != "")
|
||||
{
|
||||
std::string desktop_file = GenerateLaunchAgentFile(autostart_info);
|
||||
std::ofstream autostart_file_stream(autostart_file, std::ios::out | std::ios::trunc);
|
||||
|
||||
/*---------------------------------------------*\
|
||||
| Error out if the file could not be opened |
|
||||
\*---------------------------------------------*/
|
||||
/*-------------------------------------------------*\
|
||||
| Error out if the file could not be opened |
|
||||
\*-------------------------------------------------*/
|
||||
if(!autostart_file_stream)
|
||||
{
|
||||
LOG_ERROR("[AutoStart] Could not open %s for writing.", autostart_file.c_str());
|
||||
success = false;
|
||||
}
|
||||
/*---------------------------------------------*\
|
||||
| Otherwise, write the file |
|
||||
\*---------------------------------------------*/
|
||||
/*-------------------------------------------------*\
|
||||
| Otherwise, write the file |
|
||||
\*-------------------------------------------------*/
|
||||
else
|
||||
{
|
||||
autostart_file_stream << desktop_file;
|
||||
@@ -104,9 +104,9 @@ bool AutoStart::EnableAutoStart(AutoStartInfo autostart_info)
|
||||
|
||||
bool AutoStart::IsAutoStartEnabled()
|
||||
{
|
||||
/*-------------------------------------------------*\
|
||||
| Check if the filename is valid |
|
||||
\*-------------------------------------------------*/
|
||||
/*-----------------------------------------------------*\
|
||||
| Check if the filename is valid |
|
||||
\*-----------------------------------------------------*/
|
||||
if(autostart_file != "")
|
||||
{
|
||||
return(filesystem::exists(autostart_file));
|
||||
@@ -119,9 +119,9 @@ bool AutoStart::IsAutoStartEnabled()
|
||||
|
||||
std::string AutoStart::GetExePath()
|
||||
{
|
||||
/*-------------------------------------------------*\
|
||||
| Create the OpenRGB executable path |
|
||||
\*-------------------------------------------------*/
|
||||
/*-----------------------------------------------------*\
|
||||
| Create the OpenRGB executable path |
|
||||
\*-----------------------------------------------------*/
|
||||
char exepath[ PATH_MAX ];
|
||||
uint32_t exesize = PATH_MAX;
|
||||
|
||||
@@ -132,17 +132,17 @@ std::string AutoStart::GetExePath()
|
||||
return("");
|
||||
}
|
||||
|
||||
/*-----------------------------------------------------*\
|
||||
| MacOS AutoStart Implementation |
|
||||
| Private Methods |
|
||||
\*-----------------------------------------------------*/
|
||||
/*---------------------------------------------------------*\
|
||||
| MacOS AutoStart Implementation |
|
||||
| Private Methods |
|
||||
\*---------------------------------------------------------*/
|
||||
|
||||
std::string AutoStart::GenerateLaunchAgentFile(AutoStartInfo autostart_info)
|
||||
{
|
||||
/*-------------------------------------------------*\
|
||||
| Generate a .plist file from the AutoStart |
|
||||
| parameters |
|
||||
\*-------------------------------------------------*/
|
||||
/*-----------------------------------------------------*\
|
||||
| Generate a .plist file from the AutoStart |
|
||||
| parameters |
|
||||
\*-----------------------------------------------------*/
|
||||
std::stringstream fileContents;
|
||||
|
||||
fileContents << "<?xml version=\"1.0\" encoding=\"UTF-8\"?>" << std::endl;
|
||||
@@ -180,16 +180,16 @@ void AutoStart::InitAutoStart(std::string name)
|
||||
|
||||
autostart_name = name;
|
||||
|
||||
/*-------------------------------------------------*\
|
||||
| Determine where the autostart .desktop files are |
|
||||
| kept |
|
||||
\*-------------------------------------------------*/
|
||||
/*-----------------------------------------------------*\
|
||||
| Determine where the autostart .desktop files are |
|
||||
| kept |
|
||||
\*-----------------------------------------------------*/
|
||||
autostart_dir = getenv("HOME");
|
||||
autostart_dir = autostart_dir + "/Library/LaunchAgents/";
|
||||
|
||||
/*-------------------------------------------------*\
|
||||
| Check if the filename is valid |
|
||||
\*-------------------------------------------------*/
|
||||
/*-----------------------------------------------------*\
|
||||
| Check if the filename is valid |
|
||||
\*-----------------------------------------------------*/
|
||||
if(autostart_dir != "")
|
||||
{
|
||||
std::error_code ec;
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
| Autostart implementation for MacOS |
|
||||
| |
|
||||
| This file is part of the OpenRGB project |
|
||||
| SPDX-License-Identifier: GPL-2.0-only |
|
||||
| SPDX-License-Identifier: GPL-2.0-or-later |
|
||||
\*---------------------------------------------------------*/
|
||||
|
||||
#pragma once
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
| Autostart implementation for Windows |
|
||||
| |
|
||||
| This file is part of the OpenRGB project |
|
||||
| SPDX-License-Identifier: GPL-2.0-only |
|
||||
| SPDX-License-Identifier: GPL-2.0-or-later |
|
||||
\*---------------------------------------------------------*/
|
||||
|
||||
#include <fstream>
|
||||
@@ -25,21 +25,21 @@ bool AutoStart::DisableAutoStart()
|
||||
std::error_code autostart_file_remove_errcode;
|
||||
bool success = false;
|
||||
|
||||
/*-------------------------------------------------*\
|
||||
| Check if the filename is valid |
|
||||
\*-------------------------------------------------*/
|
||||
/*-----------------------------------------------------*\
|
||||
| Check if the filename is valid |
|
||||
\*-----------------------------------------------------*/
|
||||
if(autostart_file != "")
|
||||
{
|
||||
/*---------------------------------------------*\
|
||||
| If file doesn't exist, disable is successful |
|
||||
\*---------------------------------------------*/
|
||||
/*-------------------------------------------------*\
|
||||
| If file doesn't exist, disable is successful |
|
||||
\*-------------------------------------------------*/
|
||||
if(!filesystem::exists(autostart_file))
|
||||
{
|
||||
success = true;
|
||||
}
|
||||
/*---------------------------------------------*\
|
||||
| Otherwise, delete the file |
|
||||
\*---------------------------------------------*/
|
||||
/*-------------------------------------------------*\
|
||||
| Otherwise, delete the file |
|
||||
\*-------------------------------------------------*/
|
||||
else
|
||||
{
|
||||
success = filesystem::remove(autostart_file, autostart_file_remove_errcode);
|
||||
@@ -62,9 +62,9 @@ bool AutoStart::EnableAutoStart(AutoStartInfo autostart_info)
|
||||
{
|
||||
bool success = false;
|
||||
|
||||
/*-------------------------------------------------*\
|
||||
| Check if the filename is valid |
|
||||
\*-------------------------------------------------*/
|
||||
/*-----------------------------------------------------*\
|
||||
| Check if the filename is valid |
|
||||
\*-----------------------------------------------------*/
|
||||
if(autostart_file != "")
|
||||
{
|
||||
bool weInitialised = false;
|
||||
@@ -79,9 +79,9 @@ bool AutoStart::EnableAutoStart(AutoStartInfo autostart_info)
|
||||
|
||||
result = CoCreateInstance(CLSID_ShellLink, NULL, CLSCTX_ALL, IID_IShellLinkW, (void**)&shellLink);
|
||||
|
||||
/*---------------------------------------------*\
|
||||
| If not initialized, initialize |
|
||||
\*---------------------------------------------*/
|
||||
/*-------------------------------------------------*\
|
||||
| If not initialized, initialize |
|
||||
\*-------------------------------------------------*/
|
||||
if(result == CO_E_NOTINITIALIZED)
|
||||
{
|
||||
weInitialised = true;
|
||||
@@ -89,10 +89,10 @@ bool AutoStart::EnableAutoStart(AutoStartInfo autostart_info)
|
||||
result = CoCreateInstance(CLSID_ShellLink, NULL, CLSCTX_ALL, IID_IShellLinkW, (void**)&shellLink);
|
||||
}
|
||||
|
||||
/*---------------------------------------------*\
|
||||
| If successfully initialized, save a shortcut |
|
||||
| from the AutoStart parameters |
|
||||
\*---------------------------------------------*/
|
||||
/*-------------------------------------------------*\
|
||||
| If successfully initialized, save a shortcut |
|
||||
| from the AutoStart parameters |
|
||||
\*-------------------------------------------------*/
|
||||
if(SUCCEEDED(result))
|
||||
{
|
||||
shellLink->SetPath(exepathw.c_str());
|
||||
@@ -114,9 +114,9 @@ bool AutoStart::EnableAutoStart(AutoStartInfo autostart_info)
|
||||
shellLink->Release();
|
||||
}
|
||||
|
||||
/*---------------------------------------------*\
|
||||
| Uninitialize when done |
|
||||
\*---------------------------------------------*/
|
||||
/*-------------------------------------------------*\
|
||||
| Uninitialize when done |
|
||||
\*-------------------------------------------------*/
|
||||
if(weInitialised)
|
||||
{
|
||||
CoUninitialize();
|
||||
@@ -132,9 +132,9 @@ bool AutoStart::EnableAutoStart(AutoStartInfo autostart_info)
|
||||
|
||||
bool AutoStart::IsAutoStartEnabled()
|
||||
{
|
||||
/*-------------------------------------------------*\
|
||||
| Check if the filename is valid |
|
||||
\*-------------------------------------------------*/
|
||||
/*-----------------------------------------------------*\
|
||||
| Check if the filename is valid |
|
||||
\*-----------------------------------------------------*/
|
||||
if(autostart_file != "")
|
||||
{
|
||||
return(filesystem::exists(autostart_file));
|
||||
@@ -147,9 +147,9 @@ bool AutoStart::IsAutoStartEnabled()
|
||||
|
||||
std::string AutoStart::GetExePath()
|
||||
{
|
||||
/*-------------------------------------------------*\
|
||||
| Create the OpenRGB executable path |
|
||||
\*-------------------------------------------------*/
|
||||
/*-----------------------------------------------------*\
|
||||
| Create the OpenRGB executable path |
|
||||
\*-----------------------------------------------------*/
|
||||
char exepath[MAX_PATH] = "";
|
||||
|
||||
DWORD count = GetModuleFileNameA(NULL, exepath, MAX_PATH);
|
||||
@@ -157,10 +157,10 @@ std::string AutoStart::GetExePath()
|
||||
return(std::string(exepath, (count > 0) ? count : 0));
|
||||
}
|
||||
|
||||
/*-----------------------------------------------------*\
|
||||
| Windows AutoStart Implementation |
|
||||
| Private Methods |
|
||||
\*-----------------------------------------------------*/
|
||||
/*---------------------------------------------------------*\
|
||||
| Windows AutoStart Implementation |
|
||||
| Private Methods |
|
||||
\*---------------------------------------------------------*/
|
||||
|
||||
void AutoStart::InitAutoStart(std::string name)
|
||||
{
|
||||
@@ -168,9 +168,9 @@ void AutoStart::InitAutoStart(std::string name)
|
||||
|
||||
autostart_name = name;
|
||||
|
||||
/*-------------------------------------------------*\
|
||||
| Get startup applications path |
|
||||
\*-------------------------------------------------*/
|
||||
/*-----------------------------------------------------*\
|
||||
| Get startup applications path |
|
||||
\*-----------------------------------------------------*/
|
||||
HRESULT result = SHGetFolderPathA(NULL, CSIDL_PROGRAMS, NULL, 0, startMenuPath);
|
||||
|
||||
if(SUCCEEDED(result))
|
||||
@@ -185,10 +185,10 @@ void AutoStart::InitAutoStart(std::string name)
|
||||
}
|
||||
}
|
||||
|
||||
/*-----------------------------------------------------*\
|
||||
| Convert an UTF8 string to a wide Unicode String |
|
||||
| (from wmi.cpp) |
|
||||
\*-----------------------------------------------------*/
|
||||
/*---------------------------------------------------------*\
|
||||
| Convert an UTF8 string to a wide Unicode String |
|
||||
| (from wmi.cpp) |
|
||||
\*---------------------------------------------------------*/
|
||||
std::wstring AutoStart::utf8_decode(const std::string& str)
|
||||
{
|
||||
if(str.empty())
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
| Autostart implementation for Windows |
|
||||
| |
|
||||
| This file is part of the OpenRGB project |
|
||||
| SPDX-License-Identifier: GPL-2.0-only |
|
||||
| SPDX-License-Identifier: GPL-2.0-or-later |
|
||||
\*---------------------------------------------------------*/
|
||||
|
||||
#pragma once
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
| Autostart common implementation |
|
||||
| |
|
||||
| This file is part of the OpenRGB project |
|
||||
| SPDX-License-Identifier: GPL-2.0-only |
|
||||
| SPDX-License-Identifier: GPL-2.0-or-later |
|
||||
\*---------------------------------------------------------*/
|
||||
|
||||
#include "AutoStart.h"
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
| Autostart common implementation |
|
||||
| |
|
||||
| This file is part of the OpenRGB project |
|
||||
| SPDX-License-Identifier: GPL-2.0-only |
|
||||
| SPDX-License-Identifier: GPL-2.0-or-later |
|
||||
\*---------------------------------------------------------*/
|
||||
|
||||
#pragma once
|
||||
|
||||
+19
-13
@@ -8,18 +8,14 @@ To create a merge request, log into GitLab and fork the OpenRGB project. Push y
|
||||
|
||||
* Please keep the scope of each merge request limited to one functional area. If you wish to add a new device controller, for instance, don't also do code cleanup in another controller as part of the same merge request.
|
||||
* Explain what your merge request is changing, why you feel the change is necessary, and add any additional information you feel is needed to best understand your change in the merge request description.
|
||||
* Mark your merge request as a draft (start title with "Draft:") until it has been tested and verified working.
|
||||
* Mark your merge request as a Draft (start title with "Draft:") until it has been fully developed and ideally tested and verified working. Remove Draft status when you are ready for the code to be reviewed and merged. I typically do not look at or review Draft merge requests.
|
||||
* Follow the Style Guidelines below when making your code changes.
|
||||
* Avoid using `git merge` when updating your fork. The OpenRGB project uses a linear git history, meaning all changes are rebased onto the tip of master. By using `git rebase` to update your fork, you will make it easier to accept merge requests.
|
||||
* Avoid using `git merge` when updating your fork. The OpenRGB project uses a linear git history, meaning all changes are rebased onto the tip of master. By using `git rebase` to update your fork, you will make it easier to accept merge requests. I also recommend squashing your commits, though GitLab will do this as part of the merge process if you don't.
|
||||
* Do not submit a merge request using your fork's `master` branch as the source. The `master` branch is protected by default when creating a fork and I cannot manually rebase a protected branch before merging. If you submit a merge request with a protected `master` branch as the source, it may not get merged until you unprotect it.
|
||||
|
||||
### Pipelines, Shared Runners and Quotas
|
||||
### Pipelines, Shared Runners, Quotas, and Accepting Merge Requests
|
||||
|
||||
Since mid 2022 Gitlab has limited the usage of shared runners to all projects and whilst quite geneorous quotas are allowed
|
||||
for open source projects it is possible to exhaust them. With that in mind not all jobs within the pipeline build are
|
||||
triggered to automatically run with every push to your branch with the exception of the Windows 64bit and Linux Appimage 64bit
|
||||
jobs. If you need to test or share another build you can still start it manually from your pipeline queue.
|
||||
Once a merge request is created all architectures and platforms will be compiled to ensure that they are ready to merge.
|
||||
Since mid 2022, GitLab has severely limited the usage of shared runners to all free users. With that in mind, most pipeline jobs are skipped on forked copies of the project. Only the Windows 64bit and Linux AppImage amd64 jobs are run on forks, and only if you have permission and available CI minutes on your account. Unfortunately, with the ever tightening restrictions GitLab has on free CI usage, even to public projects with an open source license, you likely will not be able to utilize the CI builds for your own fork unless you set up your own runners. Because of this, I no longer require a successful CI run in order to accept a merge request as it is an unreasonable ask given the current CI situation. If your merge request requires additional verification, I may choose to merge it into a branch instead of into `master` so that my own runners can run the full set of jobs and then I will pull it into master after any verification or changes. This also means that any build breakages inadvertently caused by merging a merge request may result in the merge being backed out, in which case I will either fix it myself or leave a message on the merge request to rework and resubmit a fixed version.
|
||||
|
||||
Please refer to the following link for [further information relating to minutes and quotas](https://docs.gitlab.com/ee/ci/pipelines/cicd_minutes.html).
|
||||
|
||||
@@ -58,12 +54,22 @@ OpenRGB is written in C++, uses the Qt framework for UI, and uses the QMake buil
|
||||
* Capitalize hexadecimal literals (`0xFF` not `0xff`) except in the udev rules file (which must be lowercase to work)
|
||||
* No space between keyword and open parenthesis (`if(TRUE)` not `if (TRUE)`). There are some instances of this that haven't been cleaned up in the code.
|
||||
* Generally, `snake_case` is used for variable names and `CamelCase` is used for function and class names
|
||||
* Add a header comment to new files with the filename, description, original author, and date (this is missing on most Detect files)
|
||||
* Line up `=` when doing a lot of assignments together
|
||||
* Add a header comment to new files with the filename, description, original author, date, and SPDX license identifier. You can copy one from an existing file to preserve formatting.
|
||||
* Line up `=` on a tab stop when doing a lot of assignments together
|
||||
* Use this comment box style when adding comments:
|
||||
* Try to start the comment box on the same column as the code directly beneath it and end on column 61 if possible. See the example below:
|
||||
|
||||
```
|
||||
/*--------------------------------*\
|
||||
| This is a comment |
|
||||
\*_-------------------------------*/
|
||||
/*---------------------------------------------------------*\
|
||||
| This is a comment |
|
||||
\*---------------------------------------------------------*/
|
||||
```
|
||||
|
||||
## Translating
|
||||
|
||||
Translation files are located in [`OpenRGB/qt/i18n/`](https://gitlab.com/CalcProgrammer1/OpenRGB/-/tree/master/qt/i18n), where languages are formatted using ISO 639-1 format: `OpenRGB_xx_XX.ts` — `xx_XX` representing the language code.
|
||||
In order to translate a file, you need to [fork](https://gitlab.com/CalcProgrammer1/OpenRGB/-/forks/new) the project, create a new file for your language with `lupdate` (or edit an exisiting one), edit the file with `qtlinguist`, commit, push, and create a merge request.
|
||||
|
||||
## AI Guidelines
|
||||
|
||||
OpenRGB is an open source project developed by humans for humans. As a general rule, AI generated submissions are not permitted. The licensing behind AI generated code is problematic. If you choose to use AI for assistance in your development process, we can't stop you, but do not credit the AI in commits (no AI authorship/co-authorship). Ultimately, you as a human developer are responsible for the code you submit and it is expected that any code you submit you fully understand and have manually vetted before submission. Merge requests that appear to be straight from an AI output, commits with AI tool authorship or co-authorship tags, or otherwise AI generated submissions are subject to closure.
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
| List of named color constants |
|
||||
| |
|
||||
| This file is part of the OpenRGB project |
|
||||
| SPDX-License-Identifier: GPL-2.0-only |
|
||||
| SPDX-License-Identifier: GPL-2.0-or-later |
|
||||
\*---------------------------------------------------------*/
|
||||
|
||||
#ifndef COLORS_H
|
||||
|
||||
@@ -1,63 +0,0 @@
|
||||
/*---------------------------------------------------------*\
|
||||
| A4TechDetector.cpp |
|
||||
| |
|
||||
| Detector for A4Tech Devices |
|
||||
| |
|
||||
| Chris M (Dr_No) 30 Jun 2022 |
|
||||
| Mohammed Julfikar Ali Mahbub (o-julfikar) 01 Apr 2024 |
|
||||
| |
|
||||
| This file is part of the OpenRGB project |
|
||||
| SPDX-License-Identifier: GPL-2.0-only |
|
||||
\*---------------------------------------------------------*/
|
||||
|
||||
/*-----------------------------------------------------*\
|
||||
| OpenRGB includes |
|
||||
\*-----------------------------------------------------*/
|
||||
#include <hidapi.h>
|
||||
#include "Detector.h"
|
||||
|
||||
/*-----------------------------------------------------*\
|
||||
| A4 Tech specific includes |
|
||||
\*-----------------------------------------------------*/
|
||||
#include "RGBController_BloodyMouse.h"
|
||||
#include "RGBController_BloodyB820R.h"
|
||||
|
||||
/*-----------------------------------------------------*\
|
||||
| A4 Tech USB vendor ID |
|
||||
\*-----------------------------------------------------*/
|
||||
#define A4_TECH_VID 0x09DA
|
||||
|
||||
void DetectA4TechMouseControllers(hid_device_info* info, const std::string& name)
|
||||
{
|
||||
hid_device* dev = hid_open_path(info->path);
|
||||
|
||||
if(dev)
|
||||
{
|
||||
BloodyMouseController* controller = new BloodyMouseController(dev, info->path, info->product_id);
|
||||
RGBController_BloodyMouse* rgb_controller = new RGBController_BloodyMouse(controller);
|
||||
rgb_controller->name = name;
|
||||
|
||||
ResourceManager::get()->RegisterRGBController(rgb_controller);
|
||||
}
|
||||
}
|
||||
|
||||
void DetectBloodyB820R(hid_device_info* info, const std::string& name)
|
||||
{
|
||||
hid_device* dev = hid_open_path(info->path);
|
||||
|
||||
if(dev)
|
||||
{
|
||||
BloodyB820RController* controller = new BloodyB820RController(dev, info->path);
|
||||
RGBController_BloodyB820R* rgb_controller = new RGBController_BloodyB820R(controller);
|
||||
rgb_controller->name = name;
|
||||
|
||||
ResourceManager::get()->RegisterRGBController(rgb_controller);
|
||||
}
|
||||
}
|
||||
|
||||
REGISTER_HID_DETECTOR_IPU("Bloody W60 Pro", DetectA4TechMouseControllers, A4_TECH_VID, BLOODY_W60_PRO_PID, 2, 0xFF33, 0x0529);
|
||||
REGISTER_HID_DETECTOR_IPU("Bloody W70 Max", DetectA4TechMouseControllers, A4_TECH_VID, BLOODY_W70_MAX_PID, 2, 0xFF33, 0x0518);
|
||||
REGISTER_HID_DETECTOR_IPU("Bloody W90 Max", DetectA4TechMouseControllers, A4_TECH_VID, BLOODY_W90_MAX_PID, 2, 0xFF33, 0x053D);
|
||||
REGISTER_HID_DETECTOR_IPU("Bloody W90 Pro", DetectA4TechMouseControllers, A4_TECH_VID, BLOODY_W90_PRO_PID, 2, 0xFF33, 0x054D);
|
||||
REGISTER_HID_DETECTOR_IPU("Bloody MP 50RS", DetectA4TechMouseControllers, A4_TECH_VID, BLOODY_MP_50RS_PID, 2, 0xFFF2, 0x6009);
|
||||
REGISTER_HID_DETECTOR_IPU("Bloody B820R", DetectBloodyB820R, A4_TECH_VID, BLOODY_B820R_PID, 2, 0xFF52, 0x0210);
|
||||
@@ -6,7 +6,7 @@
|
||||
| Mohammed Julfikar Ali Mahbub (o-julfikar) 01 Apr 2024 |
|
||||
| |
|
||||
| This file is part of the OpenRGB project |
|
||||
| SPDX-License-Identifier: GPL-2.0-only |
|
||||
| SPDX-License-Identifier: GPL-2.0-or-later |
|
||||
\*---------------------------------------------------------*/
|
||||
|
||||
#include "BloodyB820RController.h"
|
||||
@@ -20,10 +20,11 @@
|
||||
| the second packet. |
|
||||
\*-------------------------------------------------------------------------------------*/
|
||||
|
||||
BloodyB820RController::BloodyB820RController(hid_device* dev_handle, const char* path)
|
||||
BloodyB820RController::BloodyB820RController(hid_device* dev_handle, const char* path, std::string dev_name)
|
||||
{
|
||||
dev = dev_handle;
|
||||
location = path;
|
||||
name = dev_name;
|
||||
|
||||
SendControlPacket(BLOODY_B820R_GAIN_CONTROL);
|
||||
}
|
||||
@@ -52,6 +53,11 @@ std::string BloodyB820RController::GetLocation()
|
||||
return("HID: " + location);
|
||||
}
|
||||
|
||||
std::string BloodyB820RController::GetName()
|
||||
{
|
||||
return(name);
|
||||
}
|
||||
|
||||
void BloodyB820RController::SendControlPacket(uint8_t data)
|
||||
{
|
||||
uint8_t buffer[BLOODY_B820R_PACKET_SIZE] = { 0x07, 0x03, 0x06, 0x01, 0x00, 0x00, 0x00, 0x00 };
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
| Mohammed Julfikar Ali Mahbub (o-julfikar) 01 Apr 2024 |
|
||||
| |
|
||||
| This file is part of the OpenRGB project |
|
||||
| SPDX-License-Identifier: GPL-2.0-only |
|
||||
| SPDX-License-Identifier: GPL-2.0-or-later |
|
||||
\*---------------------------------------------------------*/
|
||||
|
||||
#pragma once
|
||||
@@ -39,15 +39,17 @@ enum
|
||||
class BloodyB820RController
|
||||
{
|
||||
public:
|
||||
BloodyB820RController(hid_device* dev_handle, const char* path);
|
||||
BloodyB820RController(hid_device* dev_handle, const char* path, std::string dev_name);
|
||||
~BloodyB820RController();
|
||||
|
||||
std::string GetSerial();
|
||||
std::string GetLocation();
|
||||
std::string GetName();
|
||||
|
||||
void SetLEDDirect(std::vector<RGBColor> colors);
|
||||
void SendControlPacket(uint8_t data);
|
||||
private:
|
||||
std::string location;
|
||||
std::string name;
|
||||
hid_device* dev;
|
||||
};
|
||||
|
||||
@@ -0,0 +1,40 @@
|
||||
/*---------------------------------------------------------*\
|
||||
| BloodyB820RControllerDetect.cpp |
|
||||
| |
|
||||
| Detector for Bloody B820R Devices |
|
||||
| |
|
||||
| Mohammed Julfikar Ali Mahbub (o-julfikar) 01 Apr 2024 |
|
||||
| |
|
||||
| This file is part of the OpenRGB project |
|
||||
| SPDX-License-Identifier: GPL-2.0-or-later |
|
||||
\*---------------------------------------------------------*/
|
||||
|
||||
#include <hidapi.h>
|
||||
#include "BloodyB820RController.h"
|
||||
#include "DetectionManager.h"
|
||||
#include "RGBController_BloodyB820R.h"
|
||||
|
||||
/*---------------------------------------------------------*\
|
||||
| A4 Tech USB vendor ID |
|
||||
\*---------------------------------------------------------*/
|
||||
#define A4_TECH_VID 0x09DA
|
||||
|
||||
DetectedControllers DetectBloodyB820R(hid_device_info* info, const std::string& name)
|
||||
{
|
||||
DetectedControllers detected_controllers;
|
||||
hid_device* dev;
|
||||
|
||||
dev = hid_open_path(info->path);
|
||||
|
||||
if(dev)
|
||||
{
|
||||
BloodyB820RController* controller = new BloodyB820RController(dev, info->path, name);
|
||||
RGBController_BloodyB820R* rgb_controller = new RGBController_BloodyB820R(controller);
|
||||
|
||||
detected_controllers.push_back(rgb_controller);
|
||||
}
|
||||
|
||||
return(detected_controllers);
|
||||
}
|
||||
|
||||
REGISTER_HID_DETECTOR_IPU("Bloody B820R", DetectBloodyB820R, A4_TECH_VID, BLOODY_B820R_PID, 2, 0xFF52, 0x0210);
|
||||
@@ -6,7 +6,7 @@
|
||||
| Mohammed Julfikar Ali Mahbub (o-julfikar) 01 Apr 2024 |
|
||||
| |
|
||||
| This file is part of the OpenRGB project |
|
||||
| SPDX-License-Identifier: GPL-2.0-only |
|
||||
| SPDX-License-Identifier: GPL-2.0-or-later |
|
||||
\*---------------------------------------------------------*/
|
||||
|
||||
#include "RGBControllerKeyNames.h"
|
||||
@@ -154,7 +154,7 @@ RGBController_BloodyB820R::RGBController_BloodyB820R(BloodyB820RController *cont
|
||||
{
|
||||
controller = controller_ptr;
|
||||
|
||||
name = "Bloody B820R";
|
||||
name = controller->GetName();
|
||||
vendor = "A4Tech";
|
||||
type = DEVICE_TYPE_KEYBOARD;
|
||||
description = "A4Tech Bloody Keyboard";
|
||||
@@ -173,6 +173,8 @@ RGBController_BloodyB820R::RGBController_BloodyB820R(BloodyB820RController *cont
|
||||
|
||||
RGBController_BloodyB820R::~RGBController_BloodyB820R()
|
||||
{
|
||||
Shutdown();
|
||||
|
||||
delete controller;
|
||||
}
|
||||
|
||||
@@ -187,11 +189,7 @@ void RGBController_BloodyB820R::SetupZones()
|
||||
KB_zone.leds_min = BLOODY_B820R_KEYCOUNT;
|
||||
KB_zone.leds_max = BLOODY_B820R_KEYCOUNT;
|
||||
KB_zone.leds_count = BLOODY_B820R_KEYCOUNT;
|
||||
|
||||
KB_zone.matrix_map = new matrix_map_type;
|
||||
KB_zone.matrix_map->height = 6;
|
||||
KB_zone.matrix_map->width = 21;
|
||||
KB_zone.matrix_map->map = (unsigned int *)&matrix_map;
|
||||
KB_zone.matrix_map.Set(6, 21, (unsigned int *)&matrix_map);
|
||||
zones.push_back(KB_zone);
|
||||
|
||||
/*-------------------------------------------------*\
|
||||
@@ -214,20 +212,12 @@ void RGBController_BloodyB820R::SetupZones()
|
||||
SetupColors();
|
||||
}
|
||||
|
||||
void RGBController_BloodyB820R::ResizeZone(int /*zone*/, int /*new_size*/)
|
||||
{
|
||||
/*---------------------------------------------------------*\
|
||||
| This device does not support resizing zones |
|
||||
\*---------------------------------------------------------*/
|
||||
}
|
||||
|
||||
|
||||
void RGBController_BloodyB820R::DeviceUpdateLEDs()
|
||||
{
|
||||
controller->SetLEDDirect(colors);
|
||||
}
|
||||
|
||||
void RGBController_BloodyB820R::UpdateZoneLEDs(int zone)
|
||||
void RGBController_BloodyB820R::DeviceUpdateZoneLEDs(int zone)
|
||||
{
|
||||
std::vector<RGBColor> colour;
|
||||
|
||||
@@ -239,7 +229,7 @@ void RGBController_BloodyB820R::UpdateZoneLEDs(int zone)
|
||||
controller->SetLEDDirect(colour);
|
||||
}
|
||||
|
||||
void RGBController_BloodyB820R::UpdateSingleLED(int led)
|
||||
void RGBController_BloodyB820R::DeviceUpdateSingleLED(int led)
|
||||
{
|
||||
std::vector<RGBColor> colour;
|
||||
colour.push_back(colors[led]);
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
| Mohammed Julfikar Ali Mahbub (o-julfikar) 01 Apr 2024 |
|
||||
| |
|
||||
| This file is part of the OpenRGB project |
|
||||
| SPDX-License-Identifier: GPL-2.0-only |
|
||||
| SPDX-License-Identifier: GPL-2.0-or-later |
|
||||
\*---------------------------------------------------------*/
|
||||
|
||||
#pragma once
|
||||
@@ -22,11 +22,10 @@ public:
|
||||
~RGBController_BloodyB820R();
|
||||
|
||||
void SetupZones();
|
||||
void ResizeZone(int zone, int new_size);
|
||||
|
||||
void DeviceUpdateLEDs();
|
||||
void UpdateZoneLEDs(int zone);
|
||||
void UpdateSingleLED(int led);
|
||||
void DeviceUpdateZoneLEDs(int zone);
|
||||
void DeviceUpdateSingleLED(int led);
|
||||
|
||||
void DeviceUpdateMode();
|
||||
|
||||
|
||||
@@ -6,17 +6,18 @@
|
||||
| Chris M (Dr_No) 30 Jun 2022 |
|
||||
| |
|
||||
| This file is part of the OpenRGB project |
|
||||
| SPDX-License-Identifier: GPL-2.0-only |
|
||||
| SPDX-License-Identifier: GPL-2.0-or-later |
|
||||
\*---------------------------------------------------------*/
|
||||
|
||||
#include "BloodyMouseController.h"
|
||||
#include "StringUtils.h"
|
||||
|
||||
BloodyMouseController::BloodyMouseController(hid_device* dev_handle, const char* path, uint16_t product_id)
|
||||
BloodyMouseController::BloodyMouseController(hid_device* dev_handle, const char* path, uint16_t product_id, std::string dev_name)
|
||||
{
|
||||
dev = dev_handle;
|
||||
location = path;
|
||||
pid = product_id;
|
||||
name = dev_name;
|
||||
|
||||
InitDevice();
|
||||
}
|
||||
@@ -49,6 +50,11 @@ std::string BloodyMouseController::GetLocation()
|
||||
return("HID: " + location);
|
||||
}
|
||||
|
||||
std::string BloodyMouseController::GetName()
|
||||
{
|
||||
return(name);
|
||||
}
|
||||
|
||||
void BloodyMouseController::InitDevice()
|
||||
{
|
||||
uint8_t buffer[BLOODYMOUSE_WRITE_PACKET_SIZE] = { 0x07, 0x03, 0x06, 0x01, 0x00, 0x00, 0x00, 0x00 };
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
| Chris M (Dr_No) 30 Jun 2022 |
|
||||
| |
|
||||
| This file is part of the OpenRGB project |
|
||||
| SPDX-License-Identifier: GPL-2.0-only |
|
||||
| SPDX-License-Identifier: GPL-2.0-or-later |
|
||||
\*---------------------------------------------------------*/
|
||||
|
||||
#pragma once
|
||||
@@ -50,18 +50,20 @@ enum
|
||||
class BloodyMouseController
|
||||
{
|
||||
public:
|
||||
BloodyMouseController(hid_device* dev_handle, const char* path, uint16_t product_id);
|
||||
BloodyMouseController(hid_device* dev_handle, const char* path, uint16_t product_id, std::string dev_name);
|
||||
~BloodyMouseController();
|
||||
|
||||
uint16_t GetPid();
|
||||
std::string GetSerial();
|
||||
std::string GetLocation();
|
||||
std::string GetName();
|
||||
|
||||
void SetLedsDirect(std::vector<RGBColor> colors);
|
||||
|
||||
private:
|
||||
uint16_t pid;
|
||||
std::string location;
|
||||
std::string name;
|
||||
hid_device* dev;
|
||||
|
||||
void InitDevice();
|
||||
|
||||
@@ -0,0 +1,44 @@
|
||||
/*---------------------------------------------------------*\
|
||||
| BloodyMouseControllerDetect.cpp |
|
||||
| |
|
||||
| Detector for Bloody Mouse Devices |
|
||||
| |
|
||||
| Chris M (Dr_No) 30 Jun 2022 |
|
||||
| |
|
||||
| This file is part of the OpenRGB project |
|
||||
| SPDX-License-Identifier: GPL-2.0-or-later |
|
||||
\*---------------------------------------------------------*/
|
||||
|
||||
#include <hidapi.h>
|
||||
#include "BloodyMouseController.h"
|
||||
#include "DetectionManager.h"
|
||||
#include "RGBController_BloodyMouse.h"
|
||||
|
||||
/*---------------------------------------------------------*\
|
||||
| A4 Tech USB vendor ID |
|
||||
\*---------------------------------------------------------*/
|
||||
#define A4_TECH_VID 0x09DA
|
||||
|
||||
DetectedControllers DetectBloodyMouseControllers(hid_device_info* info, const std::string& name)
|
||||
{
|
||||
DetectedControllers detected_controllers;
|
||||
hid_device* dev;
|
||||
|
||||
dev = hid_open_path(info->path);
|
||||
|
||||
if(dev)
|
||||
{
|
||||
BloodyMouseController* controller = new BloodyMouseController(dev, info->path, info->product_id, name);
|
||||
RGBController_BloodyMouse* rgb_controller = new RGBController_BloodyMouse(controller);
|
||||
|
||||
detected_controllers.push_back(rgb_controller);
|
||||
}
|
||||
|
||||
return(detected_controllers);
|
||||
}
|
||||
|
||||
REGISTER_HID_DETECTOR_IPU("Bloody W60 Pro", DetectBloodyMouseControllers, A4_TECH_VID, BLOODY_W60_PRO_PID, 2, 0xFF33, 0x0529);
|
||||
REGISTER_HID_DETECTOR_IPU("Bloody W70 Max", DetectBloodyMouseControllers, A4_TECH_VID, BLOODY_W70_MAX_PID, 2, 0xFF33, 0x0518);
|
||||
REGISTER_HID_DETECTOR_IPU("Bloody W90 Max", DetectBloodyMouseControllers, A4_TECH_VID, BLOODY_W90_MAX_PID, 2, 0xFF33, 0x053D);
|
||||
REGISTER_HID_DETECTOR_IPU("Bloody W90 Pro", DetectBloodyMouseControllers, A4_TECH_VID, BLOODY_W90_PRO_PID, 2, 0xFF33, 0x054D);
|
||||
REGISTER_HID_DETECTOR_IPU("Bloody MP 50RS", DetectBloodyMouseControllers, A4_TECH_VID, BLOODY_MP_50RS_PID, 2, 0xFFF2, 0x6009);
|
||||
@@ -6,7 +6,7 @@
|
||||
| Chris M (Dr_No) 30 Jun 2022 |
|
||||
| |
|
||||
| This file is part of the OpenRGB project |
|
||||
| SPDX-License-Identifier: GPL-2.0-only |
|
||||
| SPDX-License-Identifier: GPL-2.0-or-later |
|
||||
\*---------------------------------------------------------*/
|
||||
|
||||
#include "RGBController_BloodyMouse.h"
|
||||
@@ -71,6 +71,7 @@ RGBController_BloodyMouse::RGBController_BloodyMouse(BloodyMouseController *cont
|
||||
type = DEVICE_TYPE_MOUSE;
|
||||
}
|
||||
|
||||
name = controller->GetName();
|
||||
vendor = "Bloody";
|
||||
description = "Controller compatible with the Bloody W60 Pro and MP 50RS";
|
||||
serial = controller->GetSerial();
|
||||
@@ -88,6 +89,8 @@ RGBController_BloodyMouse::RGBController_BloodyMouse(BloodyMouseController *cont
|
||||
|
||||
RGBController_BloodyMouse::~RGBController_BloodyMouse()
|
||||
{
|
||||
Shutdown();
|
||||
|
||||
delete controller;
|
||||
}
|
||||
|
||||
@@ -133,7 +136,6 @@ void RGBController_BloodyMouse::SetupZones()
|
||||
new_zone.leds_max = new_zone.leds_min;
|
||||
new_zone.leds_count = new_zone.leds_min;
|
||||
new_zone.type = bool_single ? ZONE_TYPE_SINGLE : ZONE_TYPE_LINEAR;
|
||||
new_zone.matrix_map = NULL;
|
||||
zones.push_back(new_zone);
|
||||
|
||||
for(unsigned int lp_idx = 0; lp_idx < zones[zone_idx].leds_count; lp_idx++)
|
||||
@@ -159,13 +161,6 @@ void RGBController_BloodyMouse::SetupZones()
|
||||
SetupColors();
|
||||
}
|
||||
|
||||
void RGBController_BloodyMouse::ResizeZone(int /*zone*/, int /*new_size*/)
|
||||
{
|
||||
/*---------------------------------------------------------*\
|
||||
| This device does not support resizing zones |
|
||||
\*---------------------------------------------------------*/
|
||||
}
|
||||
|
||||
void RGBController_BloodyMouse::DeviceUpdateLEDs()
|
||||
{
|
||||
std::vector<RGBColor> colour;
|
||||
@@ -178,12 +173,12 @@ void RGBController_BloodyMouse::DeviceUpdateLEDs()
|
||||
controller->SetLedsDirect(colour);
|
||||
}
|
||||
|
||||
void RGBController_BloodyMouse::UpdateZoneLEDs(int /*zone*/)
|
||||
void RGBController_BloodyMouse::DeviceUpdateZoneLEDs(int /*zone*/)
|
||||
{
|
||||
DeviceUpdateLEDs();
|
||||
}
|
||||
|
||||
void RGBController_BloodyMouse::UpdateSingleLED(int /*led*/)
|
||||
void RGBController_BloodyMouse::DeviceUpdateSingleLED(int /*led*/)
|
||||
{
|
||||
DeviceUpdateLEDs();
|
||||
}
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
| Chris M (Dr_No) 30 Jun 2022 |
|
||||
| |
|
||||
| This file is part of the OpenRGB project |
|
||||
| SPDX-License-Identifier: GPL-2.0-only |
|
||||
| SPDX-License-Identifier: GPL-2.0-or-later |
|
||||
\*---------------------------------------------------------*/
|
||||
|
||||
#pragma once
|
||||
@@ -30,11 +30,10 @@ public:
|
||||
~RGBController_BloodyMouse();
|
||||
|
||||
void SetupZones();
|
||||
void ResizeZone(int zone, int new_size);
|
||||
|
||||
void DeviceUpdateLEDs();
|
||||
void UpdateZoneLEDs(int zone);
|
||||
void UpdateSingleLED(int led);
|
||||
void DeviceUpdateZoneLEDs(int zone);
|
||||
void DeviceUpdateSingleLED(int led);
|
||||
|
||||
void DeviceUpdateMode();
|
||||
|
||||
|
||||
@@ -0,0 +1,195 @@
|
||||
/*---------------------------------------------------------*\
|
||||
| AMBXController.cpp |
|
||||
| |
|
||||
| Driver for Philips amBX Gaming lights |
|
||||
| |
|
||||
| This file is part of the OpenRGB project |
|
||||
| SPDX-License-Identifier: GPL-2.0-or-later |
|
||||
\*---------------------------------------------------------*/
|
||||
|
||||
#include "AMBXController.h"
|
||||
#include "LogManager.h"
|
||||
#include "StringUtils.h"
|
||||
#include <cstring>
|
||||
#include <thread>
|
||||
#include <chrono>
|
||||
|
||||
AMBXController::AMBXController(const char* path)
|
||||
{
|
||||
initialized = false;
|
||||
usb_context = nullptr;
|
||||
dev_handle = nullptr;
|
||||
|
||||
location = "USB: ";
|
||||
location += path;
|
||||
|
||||
// Initialize libusb in this instance
|
||||
if(libusb_init(&usb_context) < 0)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
// Get the device list
|
||||
libusb_device** device_list;
|
||||
ssize_t device_count = libusb_get_device_list(usb_context, &device_list);
|
||||
|
||||
if(device_count < 0)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
for(ssize_t i = 0; i < device_count; i++)
|
||||
{
|
||||
libusb_device* device = device_list[i];
|
||||
struct libusb_device_descriptor desc;
|
||||
|
||||
if(libusb_get_device_descriptor(device, &desc) != LIBUSB_SUCCESS)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
if(desc.idVendor == AMBX_VID && desc.idProduct == AMBX_PID)
|
||||
{
|
||||
uint8_t bus = libusb_get_bus_number(device);
|
||||
uint8_t address = libusb_get_device_address(device);
|
||||
|
||||
char current_path[32];
|
||||
snprintf(current_path, sizeof(current_path), "%d-%d", bus, address);
|
||||
|
||||
if(strcmp(path, current_path) == 0)
|
||||
{
|
||||
// Try to open this device
|
||||
if(libusb_open(device, &dev_handle) != LIBUSB_SUCCESS)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
// Try to detach the kernel driver if attached
|
||||
if(libusb_kernel_driver_active(dev_handle, 0))
|
||||
{
|
||||
libusb_detach_kernel_driver(dev_handle, 0);
|
||||
}
|
||||
|
||||
// Set auto-detach for Windows compatibility
|
||||
libusb_set_auto_detach_kernel_driver(dev_handle, 1);
|
||||
|
||||
// Claim the interface
|
||||
if(libusb_claim_interface(dev_handle, 0) != LIBUSB_SUCCESS)
|
||||
{
|
||||
libusb_close(dev_handle);
|
||||
dev_handle = nullptr;
|
||||
continue;
|
||||
}
|
||||
|
||||
// Get string descriptor for serial number if available
|
||||
if(desc.iSerialNumber != 0)
|
||||
{
|
||||
unsigned char serial_str[256];
|
||||
int serial_result = libusb_get_string_descriptor_ascii(dev_handle, desc.iSerialNumber,
|
||||
serial_str, sizeof(serial_str));
|
||||
if(serial_result > 0)
|
||||
{
|
||||
serial = std::string(reinterpret_cast<char*>(serial_str), serial_result);
|
||||
}
|
||||
}
|
||||
|
||||
// Successfully opened and claimed the device
|
||||
initialized = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
libusb_free_device_list(device_list, 1);
|
||||
}
|
||||
|
||||
AMBXController::~AMBXController()
|
||||
{
|
||||
if(initialized)
|
||||
{
|
||||
// Turn off all lights before closing
|
||||
unsigned int led_ids[5] =
|
||||
{
|
||||
AMBX_LIGHT_LEFT,
|
||||
AMBX_LIGHT_RIGHT,
|
||||
AMBX_LIGHT_WALL_LEFT,
|
||||
AMBX_LIGHT_WALL_CENTER,
|
||||
AMBX_LIGHT_WALL_RIGHT
|
||||
};
|
||||
|
||||
RGBColor colors[5] = { 0, 0, 0, 0, 0 };
|
||||
SetLEDColors(led_ids, colors, 5);
|
||||
}
|
||||
|
||||
if(dev_handle != nullptr)
|
||||
{
|
||||
// Release the interface
|
||||
libusb_release_interface(dev_handle, 0);
|
||||
|
||||
// Close the device
|
||||
libusb_close(dev_handle);
|
||||
dev_handle = nullptr;
|
||||
}
|
||||
|
||||
if(usb_context != nullptr)
|
||||
{
|
||||
libusb_exit(usb_context);
|
||||
usb_context = nullptr;
|
||||
}
|
||||
}
|
||||
|
||||
std::string AMBXController::GetDeviceLocation()
|
||||
{
|
||||
return location;
|
||||
}
|
||||
|
||||
std::string AMBXController::GetSerialString()
|
||||
{
|
||||
return serial;
|
||||
}
|
||||
|
||||
bool AMBXController::IsInitialized()
|
||||
{
|
||||
return initialized;
|
||||
}
|
||||
|
||||
void AMBXController::SendPacket(unsigned char* packet, unsigned int size)
|
||||
{
|
||||
if(!initialized || dev_handle == nullptr)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
int actual_length = 0;
|
||||
libusb_interrupt_transfer(dev_handle, AMBX_ENDPOINT_OUT, packet, size, &actual_length, 100);
|
||||
}
|
||||
|
||||
void AMBXController::SetLEDColor(unsigned int led, RGBColor color)
|
||||
{
|
||||
if(!initialized)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
unsigned char color_buf[6] =
|
||||
{
|
||||
AMBX_PACKET_HEADER,
|
||||
static_cast<unsigned char>(led),
|
||||
AMBX_SET_COLOR,
|
||||
(unsigned char)RGBGetRValue(color),
|
||||
(unsigned char)RGBGetGValue(color),
|
||||
(unsigned char)RGBGetBValue(color)
|
||||
};
|
||||
|
||||
SendPacket(color_buf, 6);
|
||||
|
||||
std::this_thread::sleep_for(std::chrono::milliseconds(2));
|
||||
}
|
||||
|
||||
void AMBXController::SetLEDColors(unsigned int* leds, RGBColor* colors, unsigned int count)
|
||||
{
|
||||
for(unsigned int i = 0; i < count; i++)
|
||||
{
|
||||
SetLEDColor(leds[i], colors[i]);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,57 @@
|
||||
/*---------------------------------------------------------*\
|
||||
| AMBXController.h |
|
||||
| |
|
||||
| Driver for Philips amBX Gaming lights |
|
||||
| |
|
||||
| This file is part of the OpenRGB project |
|
||||
| SPDX-License-Identifier: GPL-2.0-or-later |
|
||||
\*---------------------------------------------------------*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "RGBController.h"
|
||||
#include <string>
|
||||
|
||||
#ifdef _WIN32
|
||||
#include "dependencies/libusb-1.0.27/include/libusb.h"
|
||||
#else
|
||||
#include <libusb.h>
|
||||
#endif
|
||||
|
||||
#define AMBX_VID 0x0471
|
||||
#define AMBX_PID 0x083F
|
||||
#define AMBX_ENDPOINT_OUT 0x02
|
||||
#define AMBX_PACKET_HEADER 0xA1
|
||||
#define AMBX_SET_COLOR 0x03
|
||||
|
||||
enum
|
||||
{
|
||||
AMBX_LIGHT_LEFT = 0x0B,
|
||||
AMBX_LIGHT_RIGHT = 0x1B,
|
||||
AMBX_LIGHT_WALL_LEFT = 0x2B,
|
||||
AMBX_LIGHT_WALL_CENTER = 0x3B,
|
||||
AMBX_LIGHT_WALL_RIGHT = 0x4B
|
||||
};
|
||||
|
||||
class AMBXController
|
||||
{
|
||||
public:
|
||||
AMBXController(const char* path);
|
||||
~AMBXController();
|
||||
|
||||
std::string GetDeviceLocation();
|
||||
std::string GetSerialString();
|
||||
|
||||
bool IsInitialized();
|
||||
void SetLEDColor(unsigned int led, RGBColor color);
|
||||
void SetLEDColors(unsigned int* leds, RGBColor* colors, unsigned int count);
|
||||
|
||||
private:
|
||||
libusb_context* usb_context;
|
||||
libusb_device_handle* dev_handle;
|
||||
std::string location;
|
||||
std::string serial;
|
||||
bool initialized;
|
||||
|
||||
void SendPacket(unsigned char* packet, unsigned int size);
|
||||
};
|
||||
@@ -0,0 +1,77 @@
|
||||
/*---------------------------------------------------------*\
|
||||
| AMBXControllerDetect.cpp |
|
||||
| |
|
||||
| Detector for Philips amBX Gaming lights |
|
||||
| |
|
||||
| This file is part of the OpenRGB project |
|
||||
| SPDX-License-Identifier: GPL-2.0-or-later |
|
||||
\*---------------------------------------------------------*/
|
||||
|
||||
#include "AMBXController.h"
|
||||
#include "DetectionManager.h"
|
||||
#include "RGBController.h"
|
||||
#include "RGBController_AMBX.h"
|
||||
|
||||
#ifdef _WIN32
|
||||
#include "dependencies/libusb-1.0.27/include/libusb.h"
|
||||
#else
|
||||
#include <libusb.h>
|
||||
#endif
|
||||
|
||||
DetectedControllers DetectAMBXControllers()
|
||||
{
|
||||
DetectedControllers detected_controllers;
|
||||
libusb_context* ctx = NULL;
|
||||
|
||||
if(libusb_init(&ctx) >= 0)
|
||||
{
|
||||
libusb_device** devs;
|
||||
ssize_t num_devs = libusb_get_device_list(ctx, &devs);
|
||||
|
||||
if(num_devs > 0)
|
||||
{
|
||||
for(ssize_t i = 0; i < num_devs; i++)
|
||||
{
|
||||
libusb_device* dev = devs[i];
|
||||
libusb_device_descriptor desc;
|
||||
|
||||
if(libusb_get_device_descriptor(dev, &desc) != 0)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
if(desc.idVendor == AMBX_VID && desc.idProduct == AMBX_PID)
|
||||
{
|
||||
uint8_t bus = libusb_get_bus_number(dev);
|
||||
uint8_t address = libusb_get_device_address(dev);
|
||||
char device_path[32];
|
||||
snprintf(device_path, sizeof(device_path), "%d-%d", bus, address);
|
||||
|
||||
// Use the AMBXController to handle opening and initializing
|
||||
AMBXController* controller = new AMBXController(device_path);
|
||||
|
||||
if(controller->IsInitialized())
|
||||
{
|
||||
RGBController_AMBX* rgb_controller = new RGBController_AMBX(controller);
|
||||
detected_controllers.push_back(rgb_controller);
|
||||
}
|
||||
else
|
||||
{
|
||||
delete controller;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
libusb_free_device_list(devs, 1);
|
||||
libusb_exit(ctx);
|
||||
}
|
||||
else
|
||||
{
|
||||
libusb_exit(ctx);
|
||||
}
|
||||
}
|
||||
|
||||
return(detected_controllers);
|
||||
}
|
||||
|
||||
REGISTER_DETECTOR("Philips amBX", DetectAMBXControllers);
|
||||
@@ -0,0 +1,174 @@
|
||||
/*---------------------------------------------------------*\
|
||||
| RGBController_AMBX.cpp |
|
||||
| |
|
||||
| RGB Controller for Philips amBX Gaming lights |
|
||||
| |
|
||||
| This file is part of the OpenRGB project |
|
||||
| SPDX-License-Identifier: GPL-2.0-or-later |
|
||||
\*---------------------------------------------------------*/
|
||||
|
||||
#include "RGBController_AMBX.h"
|
||||
|
||||
/**------------------------------------------------------------------*\
|
||||
@name Philips amBX
|
||||
@category Accessory
|
||||
@type USB
|
||||
@save :x:
|
||||
@direct :white_check_mark:
|
||||
@effects :x:
|
||||
@detectors DetectAMBXControllers
|
||||
@comment The Philips amBX Gaming lights system includes left and right
|
||||
lights and a wall-washer bar with three zones.
|
||||
\*-------------------------------------------------------------------*/
|
||||
|
||||
RGBController_AMBX::RGBController_AMBX(AMBXController* controller_ptr)
|
||||
{
|
||||
controller = controller_ptr;
|
||||
|
||||
name = "Philips amBX";
|
||||
vendor = "Philips";
|
||||
type = DEVICE_TYPE_ACCESSORY;
|
||||
description = "Philips amBX Gaming Device";
|
||||
location = controller->GetDeviceLocation();
|
||||
serial = controller->GetSerialString();
|
||||
|
||||
mode Direct;
|
||||
Direct.name = "Direct";
|
||||
Direct.value = 0;
|
||||
Direct.flags = MODE_FLAG_HAS_PER_LED_COLOR;
|
||||
Direct.color_mode = MODE_COLORS_PER_LED;
|
||||
modes.push_back(Direct);
|
||||
|
||||
SetupZones();
|
||||
}
|
||||
|
||||
RGBController_AMBX::~RGBController_AMBX()
|
||||
{
|
||||
Shutdown();
|
||||
|
||||
delete controller;
|
||||
}
|
||||
|
||||
void RGBController_AMBX::SetupZones()
|
||||
{
|
||||
// Set up zones
|
||||
zone side_lights_zone;
|
||||
side_lights_zone.name = "Side Lights";
|
||||
side_lights_zone.type = ZONE_TYPE_LINEAR;
|
||||
side_lights_zone.leds_min = 2;
|
||||
side_lights_zone.leds_max = 2;
|
||||
side_lights_zone.leds_count = 2;
|
||||
zones.push_back(side_lights_zone);
|
||||
|
||||
zone wallwasher_zone;
|
||||
wallwasher_zone.name = "Wallwasher";
|
||||
wallwasher_zone.type = ZONE_TYPE_LINEAR;
|
||||
wallwasher_zone.leds_min = 3;
|
||||
wallwasher_zone.leds_max = 3;
|
||||
wallwasher_zone.leds_count = 3;
|
||||
zones.push_back(wallwasher_zone);
|
||||
|
||||
// Set up LEDs
|
||||
led left_light;
|
||||
left_light.name = "Left";
|
||||
left_light.value = AMBX_LIGHT_LEFT;
|
||||
leds.push_back(left_light);
|
||||
|
||||
led right_light;
|
||||
right_light.name = "Right";
|
||||
right_light.value = AMBX_LIGHT_RIGHT;
|
||||
leds.push_back(right_light);
|
||||
|
||||
led wall_left;
|
||||
wall_left.name = "Wall Left";
|
||||
wall_left.value = AMBX_LIGHT_WALL_LEFT;
|
||||
leds.push_back(wall_left);
|
||||
|
||||
led wall_center;
|
||||
wall_center.name = "Wall Center";
|
||||
wall_center.value = AMBX_LIGHT_WALL_CENTER;
|
||||
leds.push_back(wall_center);
|
||||
|
||||
led wall_right;
|
||||
wall_right.name = "Wall Right";
|
||||
wall_right.value = AMBX_LIGHT_WALL_RIGHT;
|
||||
leds.push_back(wall_right);
|
||||
|
||||
SetupColors();
|
||||
}
|
||||
|
||||
void RGBController_AMBX::DeviceUpdateLEDs()
|
||||
{
|
||||
if(!controller->IsInitialized())
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
unsigned int led_values[5];
|
||||
RGBColor led_colors[5];
|
||||
|
||||
for(unsigned int led_idx = 0; led_idx < leds.size(); led_idx++)
|
||||
{
|
||||
led_values[led_idx] = leds[led_idx].value;
|
||||
led_colors[led_idx] = colors[led_idx];
|
||||
}
|
||||
|
||||
controller->SetLEDColors(led_values, led_colors, static_cast<unsigned int>(leds.size()));
|
||||
}
|
||||
|
||||
void RGBController_AMBX::DeviceUpdateZoneLEDs(int zone)
|
||||
{
|
||||
if(!controller->IsInitialized())
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
unsigned int start_idx = 0;
|
||||
unsigned int zone_size = 0;
|
||||
|
||||
// Calculate start index and size
|
||||
for(unsigned int z_idx = 0; z_idx < zones.size(); z_idx++)
|
||||
{
|
||||
if(z_idx == (unsigned int)zone)
|
||||
{
|
||||
zone_size = zones[z_idx].leds_count;
|
||||
break;
|
||||
}
|
||||
|
||||
start_idx += zones[z_idx].leds_count;
|
||||
}
|
||||
|
||||
unsigned int led_values[5];
|
||||
RGBColor led_colors[5];
|
||||
|
||||
for(unsigned int led_idx = 0; led_idx < zone_size; led_idx++)
|
||||
{
|
||||
unsigned int current_idx = start_idx + led_idx;
|
||||
led_values[led_idx] = leds[current_idx].value;
|
||||
led_colors[led_idx] = colors[current_idx];
|
||||
}
|
||||
|
||||
controller->SetLEDColors(led_values, led_colors, zone_size);
|
||||
}
|
||||
|
||||
void RGBController_AMBX::DeviceUpdateSingleLED(int led)
|
||||
{
|
||||
if(!controller->IsInitialized())
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
unsigned int led_value = leds[led].value;
|
||||
RGBColor color = colors[led];
|
||||
controller->SetLEDColor(led_value, color);
|
||||
}
|
||||
|
||||
void RGBController_AMBX::DeviceUpdateMode()
|
||||
{
|
||||
if(!controller->IsInitialized())
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
DeviceUpdateLEDs();
|
||||
}
|
||||
@@ -0,0 +1,31 @@
|
||||
/*---------------------------------------------------------*\
|
||||
| RGBController_AMBX.h |
|
||||
| |
|
||||
| RGB Controller for Philips amBX Gaming lights |
|
||||
| |
|
||||
| This file is part of the OpenRGB project |
|
||||
| SPDX-License-Identifier: GPL-2.0-or-later |
|
||||
\*---------------------------------------------------------*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "RGBController.h"
|
||||
#include "AMBXController.h"
|
||||
|
||||
class RGBController_AMBX : public RGBController
|
||||
{
|
||||
public:
|
||||
RGBController_AMBX(AMBXController* controller_ptr);
|
||||
~RGBController_AMBX();
|
||||
|
||||
void SetupZones();
|
||||
|
||||
void DeviceUpdateLEDs();
|
||||
void DeviceUpdateZoneLEDs(int zone);
|
||||
void DeviceUpdateSingleLED(int led);
|
||||
|
||||
void DeviceUpdateMode();
|
||||
|
||||
private:
|
||||
AMBXController* controller;
|
||||
};
|
||||
@@ -6,7 +6,7 @@
|
||||
| Adam Honse (CalcProgrammer1) 06 Dec 2019 |
|
||||
| |
|
||||
| This file is part of the OpenRGB project |
|
||||
| SPDX-License-Identifier: GPL-2.0-only |
|
||||
| SPDX-License-Identifier: GPL-2.0-or-later |
|
||||
\*---------------------------------------------------------*/
|
||||
|
||||
#include <cstring>
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
| Adam Honse (CalcProgrammer1) 06 Dec 2019 |
|
||||
| |
|
||||
| This file is part of the OpenRGB project |
|
||||
| SPDX-License-Identifier: GPL-2.0-only |
|
||||
| SPDX-License-Identifier: GPL-2.0-or-later |
|
||||
\*---------------------------------------------------------*/
|
||||
|
||||
#pragma once
|
||||
|
||||
@@ -6,12 +6,12 @@
|
||||
| Adam Honse (CalcProgrammer1) 06 Dec 2019 |
|
||||
| |
|
||||
| This file is part of the OpenRGB project |
|
||||
| SPDX-License-Identifier: GPL-2.0-only |
|
||||
| SPDX-License-Identifier: GPL-2.0-or-later |
|
||||
\*---------------------------------------------------------*/
|
||||
|
||||
#include <hidapi.h>
|
||||
#include "Detector.h"
|
||||
#include "AMDWraithPrismController.h"
|
||||
#include "DetectionManager.h"
|
||||
#include "RGBController_AMDWraithPrism.h"
|
||||
|
||||
/*---------------------------------------------------------*\
|
||||
@@ -24,24 +24,22 @@
|
||||
\*---------------------------------------------------------*/
|
||||
#define AMD_WRAITH_PRISM_PID 0x0051
|
||||
|
||||
/******************************************************************************************\
|
||||
* *
|
||||
* DetectAMDWraithPrismControllers *
|
||||
* *
|
||||
* Tests the USB address to see if an AMD Wraith Prism controller exists there. *
|
||||
* *
|
||||
\******************************************************************************************/
|
||||
|
||||
void DetectAMDWraithPrismControllers(hid_device_info* info, const std::string&)
|
||||
DetectedControllers DetectAMDWraithPrismControllers(hid_device_info* info, const std::string&)
|
||||
{
|
||||
hid_device* dev = hid_open_path(info->path);
|
||||
if( dev )
|
||||
DetectedControllers detected_controllers;
|
||||
hid_device* dev;
|
||||
|
||||
dev = hid_open_path(info->path);
|
||||
|
||||
if(dev)
|
||||
{
|
||||
AMDWraithPrismController* controller = new AMDWraithPrismController(dev, info->path);
|
||||
RGBController_AMDWraithPrism* rgb_controller = new RGBController_AMDWraithPrism(controller);
|
||||
// Constructor sets the name
|
||||
ResourceManager::get()->RegisterRGBController(rgb_controller);
|
||||
|
||||
detected_controllers.push_back(rgb_controller);
|
||||
}
|
||||
|
||||
return(detected_controllers);
|
||||
}
|
||||
|
||||
REGISTER_HID_DETECTOR_IP("AMD Wraith Prism", DetectAMDWraithPrismControllers, AMD_WRAITH_PRISM_VID, AMD_WRAITH_PRISM_PID, 1, 0xFF00);
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
| Adam Honse (CalcProgrammer1) 25 Dec 2019 |
|
||||
| |
|
||||
| This file is part of the OpenRGB project |
|
||||
| SPDX-License-Identifier: GPL-2.0-only |
|
||||
| SPDX-License-Identifier: GPL-2.0-or-later |
|
||||
\*---------------------------------------------------------*/
|
||||
|
||||
#include "RGBController_AMDWraithPrism.h"
|
||||
@@ -132,29 +132,30 @@ RGBController_AMDWraithPrism::RGBController_AMDWraithPrism(AMDWraithPrismControl
|
||||
|
||||
RGBController_AMDWraithPrism::~RGBController_AMDWraithPrism()
|
||||
{
|
||||
Shutdown();
|
||||
|
||||
delete controller;
|
||||
}
|
||||
|
||||
void RGBController_AMDWraithPrism::SetupZones()
|
||||
{
|
||||
/*---------------------------------------------------------*\
|
||||
| LED maps |
|
||||
\*---------------------------------------------------------*/
|
||||
/*-----------------------------------------------------*\
|
||||
| LED maps |
|
||||
\*-----------------------------------------------------*/
|
||||
const unsigned int logo_leds[1] = { 0x00 };
|
||||
const unsigned int fan_leds[1] = { 0x01 };
|
||||
const unsigned int ring_leds[14] = { 0x07, 0x06, 0x05, 0x04, 0x03, 0x02, 0x10, 0x0F,
|
||||
0x0E, 0x0D, 0x0C, 0x0B, 0x0A, 0x09 };
|
||||
const unsigned int ring_leds[15] = { 0x08, 0x07, 0x06, 0x05, 0x04, 0x03, 0x02, 0x10,
|
||||
0x0F, 0x0E, 0x0D, 0x0C, 0x0B, 0x0A, 0x09 };
|
||||
|
||||
/*---------------------------------------------------------*\
|
||||
| Set up zones |
|
||||
\*---------------------------------------------------------*/
|
||||
/*-----------------------------------------------------*\
|
||||
| Set up zones |
|
||||
\*-----------------------------------------------------*/
|
||||
zone logo_zone;
|
||||
logo_zone.name = "Logo";
|
||||
logo_zone.type = ZONE_TYPE_SINGLE;
|
||||
logo_zone.leds_min = 1;
|
||||
logo_zone.leds_max = 1;
|
||||
logo_zone.leds_count = 1;
|
||||
logo_zone.matrix_map = NULL;
|
||||
zones.push_back(logo_zone);
|
||||
|
||||
zone fan_zone;
|
||||
@@ -163,21 +164,19 @@ void RGBController_AMDWraithPrism::SetupZones()
|
||||
fan_zone.leds_min = 1;
|
||||
fan_zone.leds_max = 1;
|
||||
fan_zone.leds_count = 1;
|
||||
fan_zone.matrix_map = NULL;
|
||||
zones.push_back(fan_zone);
|
||||
|
||||
zone ring_zone;
|
||||
ring_zone.name = "Ring";
|
||||
ring_zone.type = ZONE_TYPE_LINEAR;
|
||||
ring_zone.leds_min = 14;
|
||||
ring_zone.leds_max = 14;
|
||||
ring_zone.leds_count = 14;
|
||||
ring_zone.matrix_map = NULL;
|
||||
ring_zone.leds_min = 15;
|
||||
ring_zone.leds_max = 15;
|
||||
ring_zone.leds_count = 15;
|
||||
zones.push_back(ring_zone);
|
||||
|
||||
/*---------------------------------------------------------*\
|
||||
| Set up LEDs |
|
||||
\*---------------------------------------------------------*/
|
||||
/*-----------------------------------------------------*\
|
||||
| Set up LEDs |
|
||||
\*-----------------------------------------------------*/
|
||||
for(unsigned int led_idx = 0; led_idx < 1; led_idx++)
|
||||
{
|
||||
led logo_led;
|
||||
@@ -194,7 +193,7 @@ void RGBController_AMDWraithPrism::SetupZones()
|
||||
leds.push_back(fan_led);
|
||||
}
|
||||
|
||||
for(unsigned int led_idx = 0; led_idx < 14; led_idx++)
|
||||
for(unsigned int led_idx = 0; led_idx < 15; led_idx++)
|
||||
{
|
||||
led ring_led;
|
||||
ring_led.name = "Ring LED";
|
||||
@@ -205,39 +204,39 @@ void RGBController_AMDWraithPrism::SetupZones()
|
||||
SetupColors();
|
||||
}
|
||||
|
||||
void RGBController_AMDWraithPrism::ResizeZone(int /*zone*/, int /*new_size*/)
|
||||
{
|
||||
/*---------------------------------------------------------*\
|
||||
| This device does not support resizing zones |
|
||||
\*---------------------------------------------------------*/
|
||||
}
|
||||
|
||||
void RGBController_AMDWraithPrism::DeviceUpdateLEDs()
|
||||
{
|
||||
if(modes[active_mode].color_mode == MODE_COLORS_PER_LED)
|
||||
{
|
||||
unsigned char led_ids[15];
|
||||
RGBColor color_buf[15];
|
||||
unsigned int leds_count = 0;
|
||||
unsigned char led_ids[17];
|
||||
RGBColor color_buf[17];
|
||||
unsigned int leds_count;
|
||||
|
||||
for(unsigned int led_idx = 0; led_idx < colors.size(); led_idx++)
|
||||
/*-------------------------------------------------*\
|
||||
| Send logo and fan LEDs in the first packet |
|
||||
\*-------------------------------------------------*/
|
||||
leds_count = 0;
|
||||
for(std::size_t led_idx = 0; led_idx < 2; led_idx++)
|
||||
{
|
||||
led_ids[leds_count] = (unsigned char)leds[led_idx].value;
|
||||
color_buf[leds_count] = colors[led_idx];
|
||||
|
||||
leds_count++;
|
||||
|
||||
if(leds_count >= 15)
|
||||
{
|
||||
controller->SendDirectPacket(15, led_ids, color_buf);
|
||||
leds_count = 0;
|
||||
}
|
||||
}
|
||||
controller->SendDirectPacket(leds_count, led_ids, color_buf);
|
||||
|
||||
if(leds_count > 0)
|
||||
/*-------------------------------------------------*\
|
||||
| Send all ring LEDs in the second packet |
|
||||
\*-------------------------------------------------*/
|
||||
leds_count = 0;
|
||||
for(std::size_t led_idx = 0; led_idx < ( colors.size() - 2 ); led_idx++)
|
||||
{
|
||||
controller->SendDirectPacket(leds_count, led_ids, color_buf);
|
||||
led_ids[leds_count] = (unsigned char)leds[led_idx + 2].value;
|
||||
color_buf[leds_count] = colors[led_idx + 2];
|
||||
|
||||
leds_count++;
|
||||
}
|
||||
controller->SendDirectPacket(leds_count, led_ids, color_buf);
|
||||
}
|
||||
else if(modes[active_mode].color_mode == MODE_COLORS_MODE_SPECIFIC)
|
||||
{
|
||||
@@ -264,12 +263,12 @@ void RGBController_AMDWraithPrism::DeviceUpdateLEDs()
|
||||
}
|
||||
}
|
||||
|
||||
void RGBController_AMDWraithPrism::UpdateZoneLEDs(int /*zone*/)
|
||||
void RGBController_AMDWraithPrism::DeviceUpdateZoneLEDs(int /*zone*/)
|
||||
{
|
||||
DeviceUpdateLEDs();
|
||||
}
|
||||
|
||||
void RGBController_AMDWraithPrism::UpdateSingleLED(int /*led*/)
|
||||
void RGBController_AMDWraithPrism::DeviceUpdateSingleLED(int /*led*/)
|
||||
{
|
||||
DeviceUpdateLEDs();
|
||||
}
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
| Adam Honse (CalcProgrammer1) 25 Dec 2019 |
|
||||
| |
|
||||
| This file is part of the OpenRGB project |
|
||||
| SPDX-License-Identifier: GPL-2.0-only |
|
||||
| SPDX-License-Identifier: GPL-2.0-or-later |
|
||||
\*---------------------------------------------------------*/
|
||||
|
||||
#pragma once
|
||||
@@ -22,11 +22,9 @@ public:
|
||||
|
||||
void SetupZones();
|
||||
|
||||
void ResizeZone(int zone, int new_size);
|
||||
|
||||
void DeviceUpdateLEDs();
|
||||
void UpdateZoneLEDs(int zone);
|
||||
void UpdateSingleLED(int led);
|
||||
void DeviceUpdateZoneLEDs(int zone);
|
||||
void DeviceUpdateSingleLED(int led);
|
||||
|
||||
void DeviceUpdateMode();
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
| Adam Honse (CalcProgrammer1) 10 May 2023 |
|
||||
| |
|
||||
| This file is part of the OpenRGB project |
|
||||
| SPDX-License-Identifier: GPL-2.0-only |
|
||||
| SPDX-License-Identifier: GPL-2.0-or-later |
|
||||
\*---------------------------------------------------------*/
|
||||
|
||||
#include <chrono>
|
||||
@@ -17,10 +17,11 @@
|
||||
|
||||
using namespace std::chrono_literals;
|
||||
|
||||
AOCKeyboardController::AOCKeyboardController(hid_device* dev_handle, const char* path)
|
||||
AOCKeyboardController::AOCKeyboardController(hid_device* dev_handle, const char* path, std::string dev_name)
|
||||
{
|
||||
dev = dev_handle;
|
||||
location = path;
|
||||
name = dev_name;
|
||||
}
|
||||
|
||||
AOCKeyboardController::~AOCKeyboardController()
|
||||
@@ -30,7 +31,12 @@ AOCKeyboardController::~AOCKeyboardController()
|
||||
|
||||
std::string AOCKeyboardController::GetDeviceLocation()
|
||||
{
|
||||
return("HID " + location);
|
||||
return("HID: " + location);
|
||||
}
|
||||
|
||||
std::string AOCKeyboardController::GetDeviceName()
|
||||
{
|
||||
return(name);
|
||||
}
|
||||
|
||||
std::string AOCKeyboardController::GetSerialString()
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
| Adam Honse (CalcProgrammer1) 10 May 2023 |
|
||||
| |
|
||||
| This file is part of the OpenRGB project |
|
||||
| SPDX-License-Identifier: GPL-2.0-only |
|
||||
| SPDX-License-Identifier: GPL-2.0-or-later |
|
||||
\*---------------------------------------------------------*/
|
||||
|
||||
#pragma once
|
||||
@@ -64,10 +64,11 @@ enum
|
||||
class AOCKeyboardController
|
||||
{
|
||||
public:
|
||||
AOCKeyboardController(hid_device* dev_handle, const char* path);
|
||||
AOCKeyboardController(hid_device* dev_handle, const char* path, std::string dev_name);
|
||||
~AOCKeyboardController();
|
||||
|
||||
std::string GetDeviceLocation();
|
||||
std::string GetDeviceName();
|
||||
std::string GetSerialString();
|
||||
|
||||
void SetLightingConfig
|
||||
@@ -88,6 +89,7 @@ public:
|
||||
private:
|
||||
hid_device* dev;
|
||||
std::string location;
|
||||
std::string name;
|
||||
|
||||
void SendStartPacket();
|
||||
void SendEndPacket();
|
||||
|
||||
@@ -6,40 +6,36 @@
|
||||
| Adam Honse (CalcProgrammer1) 10 May 2023 |
|
||||
| |
|
||||
| This file is part of the OpenRGB project |
|
||||
| SPDX-License-Identifier: GPL-2.0-only |
|
||||
| SPDX-License-Identifier: GPL-2.0-or-later |
|
||||
\*---------------------------------------------------------*/
|
||||
|
||||
#include "Detector.h"
|
||||
#include "DetectionManager.h"
|
||||
#include "AOCKeyboardController.h"
|
||||
#include "RGBController_AOCKeyboard.h"
|
||||
|
||||
/*-----------------------------------------------------*\
|
||||
| AOC Keyboard IDs |
|
||||
\*-----------------------------------------------------*/
|
||||
/*---------------------------------------------------------*\
|
||||
| AOC Keyboard IDs |
|
||||
\*---------------------------------------------------------*/
|
||||
#define AOC_VID 0x3938
|
||||
#define AOC_GK500_PID 0x1178
|
||||
#define AOC_GK500_PID_2 0x1229
|
||||
|
||||
/******************************************************************************************\
|
||||
* *
|
||||
* DetectAOCKeyboardControllers *
|
||||
* *
|
||||
* Tests the USB address to see if an AOC Keyboard controller exists there. *
|
||||
* *
|
||||
\******************************************************************************************/
|
||||
|
||||
void DetectAOCKeyboardControllers(hid_device_info* info, const std::string& name)
|
||||
DetectedControllers DetectAOCKeyboardControllers(hid_device_info* info, const std::string& name)
|
||||
{
|
||||
hid_device* dev = hid_open_path(info->path);
|
||||
DetectedControllers detected_controllers;
|
||||
hid_device* dev;
|
||||
|
||||
dev = hid_open_path(info->path);
|
||||
|
||||
if(dev)
|
||||
{
|
||||
AOCKeyboardController* controller = new AOCKeyboardController(dev, info->path);
|
||||
AOCKeyboardController* controller = new AOCKeyboardController(dev, info->path, name);
|
||||
RGBController_AOCKeyboard* rgb_controller = new RGBController_AOCKeyboard(controller);
|
||||
rgb_controller->name = name;
|
||||
|
||||
ResourceManager::get()->RegisterRGBController(rgb_controller);
|
||||
detected_controllers.push_back(rgb_controller);
|
||||
}
|
||||
|
||||
return(detected_controllers);
|
||||
}
|
||||
|
||||
REGISTER_HID_DETECTOR_PU("AOC GK500", DetectAOCKeyboardControllers, AOC_VID, AOC_GK500_PID, 0xFF19, 0xFF19);
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
| Adam Honse (CalcProgrammer1) 10 May 2023 |
|
||||
| |
|
||||
| This file is part of the OpenRGB project |
|
||||
| SPDX-License-Identifier: GPL-2.0-only |
|
||||
| SPDX-License-Identifier: GPL-2.0-or-later |
|
||||
\*---------------------------------------------------------*/
|
||||
|
||||
#include "RGBController_AOCKeyboard.h"
|
||||
@@ -52,7 +52,7 @@ RGBController_AOCKeyboard::RGBController_AOCKeyboard(AOCKeyboardController* cont
|
||||
{
|
||||
controller = controller_ptr;
|
||||
|
||||
name = "AOC Keyboard Device";
|
||||
name = controller->GetDeviceName();
|
||||
vendor = "AOC";
|
||||
type = DEVICE_TYPE_KEYBOARD;
|
||||
description = "AOC Keyboard Device";
|
||||
@@ -257,35 +257,25 @@ RGBController_AOCKeyboard::RGBController_AOCKeyboard(AOCKeyboardController* cont
|
||||
|
||||
RGBController_AOCKeyboard::~RGBController_AOCKeyboard()
|
||||
{
|
||||
Shutdown();
|
||||
|
||||
delete controller;
|
||||
}
|
||||
|
||||
void RGBController_AOCKeyboard::SetupZones()
|
||||
{
|
||||
KeyboardLayoutManager new_kb(KEYBOARD_LAYOUT_ANSI_QWERTY, KEYBOARD_SIZE_FULL, aoc_keyboard_offset_values);
|
||||
|
||||
/*---------------------------------------------------------*\
|
||||
| Create the keyboard zone usiung Keyboard Layout Manager |
|
||||
\*---------------------------------------------------------*/
|
||||
zone new_zone;
|
||||
new_zone.name = ZONE_EN_KEYBOARD;
|
||||
new_zone.type = ZONE_TYPE_MATRIX;
|
||||
|
||||
KeyboardLayoutManager new_kb(KEYBOARD_LAYOUT_ANSI_QWERTY, KEYBOARD_SIZE_FULL, aoc_keyboard_offset_values);
|
||||
|
||||
matrix_map_type * new_map = new matrix_map_type;
|
||||
new_zone.matrix_map = new_map;
|
||||
new_zone.matrix_map->height = new_kb.GetRowCount();
|
||||
new_zone.matrix_map->width = new_kb.GetColumnCount();
|
||||
|
||||
new_zone.matrix_map->map = new unsigned int[new_map->height * new_map->width];
|
||||
new_zone.leds_count = new_kb.GetKeyCount();
|
||||
new_zone.leds_min = new_zone.leds_count;
|
||||
new_zone.leds_max = new_zone.leds_count;
|
||||
|
||||
/*---------------------------------------------------------*\
|
||||
| Matrix map still uses declared zone rows and columns |
|
||||
| as the packet structure depends on the matrix map |
|
||||
\*---------------------------------------------------------*/
|
||||
new_kb.GetKeyMap(new_map->map, KEYBOARD_MAP_FILL_TYPE_COUNT, new_map->height, new_map->width);
|
||||
new_zone.name = ZONE_EN_KEYBOARD;
|
||||
new_zone.type = ZONE_TYPE_MATRIX;
|
||||
new_zone.leds_count = new_kb.GetKeyCount();
|
||||
new_zone.leds_min = new_zone.leds_count;
|
||||
new_zone.leds_max = new_zone.leds_count;
|
||||
new_zone.matrix_map = new_kb.GetKeyMap(KEYBOARD_MAP_FILL_TYPE_COUNT);
|
||||
|
||||
/*---------------------------------------------------------*\
|
||||
| Create LEDs for the Matrix zone |
|
||||
@@ -305,13 +295,6 @@ void RGBController_AOCKeyboard::SetupZones()
|
||||
SetupColors();
|
||||
}
|
||||
|
||||
void RGBController_AOCKeyboard::ResizeZone(int /*zone*/, int /*new_size*/)
|
||||
{
|
||||
/*---------------------------------------------------------*\
|
||||
| This device does not support resizing zones |
|
||||
\*---------------------------------------------------------*/
|
||||
}
|
||||
|
||||
void RGBController_AOCKeyboard::DeviceUpdateLEDs()
|
||||
{
|
||||
if(modes[active_mode].value == AOC_KEYBOARD_MODE_CUSTOM)
|
||||
@@ -331,12 +314,12 @@ void RGBController_AOCKeyboard::DeviceUpdateLEDs()
|
||||
}
|
||||
}
|
||||
|
||||
void RGBController_AOCKeyboard::UpdateZoneLEDs(int /*zone*/)
|
||||
void RGBController_AOCKeyboard::DeviceUpdateZoneLEDs(int /*zone*/)
|
||||
{
|
||||
DeviceUpdateLEDs();
|
||||
}
|
||||
|
||||
void RGBController_AOCKeyboard::UpdateSingleLED(int /*led*/)
|
||||
void RGBController_AOCKeyboard::DeviceUpdateSingleLED(int /*led*/)
|
||||
{
|
||||
DeviceUpdateLEDs();
|
||||
}
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
| Adam Honse (CalcProgrammer1) 10 May 2023 |
|
||||
| |
|
||||
| This file is part of the OpenRGB project |
|
||||
| SPDX-License-Identifier: GPL-2.0-only |
|
||||
| SPDX-License-Identifier: GPL-2.0-or-later |
|
||||
\*---------------------------------------------------------*/
|
||||
|
||||
#pragma once
|
||||
@@ -22,11 +22,9 @@ public:
|
||||
|
||||
void SetupZones();
|
||||
|
||||
void ResizeZone(int zone, int new_size);
|
||||
|
||||
void DeviceUpdateLEDs();
|
||||
void UpdateZoneLEDs(int zone);
|
||||
void UpdateSingleLED(int led);
|
||||
void DeviceUpdateZoneLEDs(int zone);
|
||||
void DeviceUpdateSingleLED(int led);
|
||||
|
||||
void DeviceUpdateMode();
|
||||
|
||||
|
||||
@@ -6,17 +6,18 @@
|
||||
| Adam Honse (CalcProgrammer1) 20 Apr 2023 |
|
||||
| |
|
||||
| This file is part of the OpenRGB project |
|
||||
| SPDX-License-Identifier: GPL-2.0-only |
|
||||
| SPDX-License-Identifier: GPL-2.0-or-later |
|
||||
\*---------------------------------------------------------*/
|
||||
|
||||
#include <cstring>
|
||||
#include "AOCMouseController.h"
|
||||
#include "StringUtils.h"
|
||||
|
||||
AOCMouseController::AOCMouseController(hid_device* dev_handle, const char* path)
|
||||
AOCMouseController::AOCMouseController(hid_device* dev_handle, const char* path, std::string dev_name)
|
||||
{
|
||||
dev = dev_handle;
|
||||
location = path;
|
||||
name = dev_name;
|
||||
}
|
||||
|
||||
AOCMouseController::~AOCMouseController()
|
||||
@@ -26,7 +27,12 @@ AOCMouseController::~AOCMouseController()
|
||||
|
||||
std::string AOCMouseController::GetDeviceLocation()
|
||||
{
|
||||
return("HID " + location);
|
||||
return("HID: " + location);
|
||||
}
|
||||
|
||||
std::string AOCMouseController::GetDeviceName()
|
||||
{
|
||||
return(name);
|
||||
}
|
||||
|
||||
std::string AOCMouseController::GetSerialString()
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
| Adam Honse (CalcProgrammer1) 20 Apr 2023 |
|
||||
| |
|
||||
| This file is part of the OpenRGB project |
|
||||
| SPDX-License-Identifier: GPL-2.0-only |
|
||||
| SPDX-License-Identifier: GPL-2.0-or-later |
|
||||
\*---------------------------------------------------------*/
|
||||
|
||||
#pragma once
|
||||
@@ -56,10 +56,11 @@ enum
|
||||
class AOCMouseController
|
||||
{
|
||||
public:
|
||||
AOCMouseController(hid_device* dev_handle, const char* path);
|
||||
AOCMouseController(hid_device* dev_handle, const char* path, std::string dev_name);
|
||||
~AOCMouseController();
|
||||
|
||||
std::string GetDeviceLocation();
|
||||
std::string GetDeviceName();
|
||||
std::string GetSerialString();
|
||||
|
||||
void SendDirect
|
||||
@@ -79,4 +80,5 @@ public:
|
||||
private:
|
||||
hid_device* dev;
|
||||
std::string location;
|
||||
std::string name;
|
||||
};
|
||||
|
||||
@@ -6,39 +6,35 @@
|
||||
| Adam Honse (CalcProgrammer1) 20 Apr 2023 |
|
||||
| |
|
||||
| This file is part of the OpenRGB project |
|
||||
| SPDX-License-Identifier: GPL-2.0-only |
|
||||
| SPDX-License-Identifier: GPL-2.0-or-later |
|
||||
\*---------------------------------------------------------*/
|
||||
|
||||
#include "Detector.h"
|
||||
#include "DetectionManager.h"
|
||||
#include "AOCMouseController.h"
|
||||
#include "RGBController_AOCMouse.h"
|
||||
|
||||
/*-----------------------------------------------------*\
|
||||
| AOC Mouse IDs |
|
||||
\*-----------------------------------------------------*/
|
||||
/*---------------------------------------------------------*\
|
||||
| AOC Mouse IDs |
|
||||
\*---------------------------------------------------------*/
|
||||
#define AOC_VID 0x3938
|
||||
#define AOC_GM500_PID 0x1179
|
||||
|
||||
/******************************************************************************************\
|
||||
* *
|
||||
* DetectAOCMouseControllers *
|
||||
* *
|
||||
* Tests the USB address to see if an AOC Mouse controller exists there. *
|
||||
* *
|
||||
\******************************************************************************************/
|
||||
|
||||
void DetectAOCMouseControllers(hid_device_info* info, const std::string& name)
|
||||
DetectedControllers DetectAOCMouseControllers(hid_device_info* info, const std::string& name)
|
||||
{
|
||||
hid_device* dev = hid_open_path(info->path);
|
||||
DetectedControllers detected_controllers;
|
||||
hid_device* dev;
|
||||
|
||||
dev = hid_open_path(info->path);
|
||||
|
||||
if(dev)
|
||||
{
|
||||
AOCMouseController* controller = new AOCMouseController(dev, info->path);
|
||||
AOCMouseController* controller = new AOCMouseController(dev, info->path, name);
|
||||
RGBController_AOCMouse* rgb_controller = new RGBController_AOCMouse(controller);
|
||||
rgb_controller->name = name;
|
||||
|
||||
ResourceManager::get()->RegisterRGBController(rgb_controller);
|
||||
detected_controllers.push_back(rgb_controller);
|
||||
}
|
||||
|
||||
return(detected_controllers);
|
||||
}
|
||||
|
||||
REGISTER_HID_DETECTOR_IPU("AOC GM500", DetectAOCMouseControllers, AOC_VID, AOC_GM500_PID, 1, 0xFF19, 0xFF19);
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
| Adam Honse (CalcProgrammer1) 20 Apr 2023 |
|
||||
| |
|
||||
| This file is part of the OpenRGB project |
|
||||
| SPDX-License-Identifier: GPL-2.0-only |
|
||||
| SPDX-License-Identifier: GPL-2.0-or-later |
|
||||
\*---------------------------------------------------------*/
|
||||
|
||||
#include "RGBController_AOCMouse.h"
|
||||
@@ -26,7 +26,7 @@ RGBController_AOCMouse::RGBController_AOCMouse(AOCMouseController* controller_pt
|
||||
{
|
||||
controller = controller_ptr;
|
||||
|
||||
name = "AOC Mouse Device";
|
||||
name = controller->GetDeviceName();
|
||||
vendor = "AOC";
|
||||
type = DEVICE_TYPE_MOUSE;
|
||||
description = "AOC Mouse Device";
|
||||
@@ -123,6 +123,8 @@ RGBController_AOCMouse::RGBController_AOCMouse(AOCMouseController* controller_pt
|
||||
|
||||
RGBController_AOCMouse::~RGBController_AOCMouse()
|
||||
{
|
||||
Shutdown();
|
||||
|
||||
delete controller;
|
||||
}
|
||||
|
||||
@@ -134,7 +136,6 @@ void RGBController_AOCMouse::SetupZones()
|
||||
logo_zone.leds_min = 1;
|
||||
logo_zone.leds_max = 1;
|
||||
logo_zone.leds_count = 1;
|
||||
logo_zone.matrix_map = NULL;
|
||||
zones.push_back(logo_zone);
|
||||
|
||||
led logo_led;
|
||||
@@ -147,7 +148,6 @@ void RGBController_AOCMouse::SetupZones()
|
||||
scroll_wheel_zone.leds_min = 1;
|
||||
scroll_wheel_zone.leds_max = 1;
|
||||
scroll_wheel_zone.leds_count = 1;
|
||||
scroll_wheel_zone.matrix_map = NULL;
|
||||
zones.push_back(scroll_wheel_zone);
|
||||
|
||||
led scroll_wheel_led;
|
||||
@@ -157,24 +157,17 @@ void RGBController_AOCMouse::SetupZones()
|
||||
SetupColors();
|
||||
}
|
||||
|
||||
void RGBController_AOCMouse::ResizeZone(int /*zone*/, int /*new_size*/)
|
||||
{
|
||||
/*---------------------------------------------------------*\
|
||||
| This device does not support resizing zones |
|
||||
\*---------------------------------------------------------*/
|
||||
}
|
||||
|
||||
void RGBController_AOCMouse::DeviceUpdateLEDs()
|
||||
{
|
||||
DeviceUpdateMode();
|
||||
}
|
||||
|
||||
void RGBController_AOCMouse::UpdateZoneLEDs(int /*zone*/)
|
||||
void RGBController_AOCMouse::DeviceUpdateZoneLEDs(int /*zone*/)
|
||||
{
|
||||
DeviceUpdateLEDs();
|
||||
}
|
||||
|
||||
void RGBController_AOCMouse::UpdateSingleLED(int /*led*/)
|
||||
void RGBController_AOCMouse::DeviceUpdateSingleLED(int /*led*/)
|
||||
{
|
||||
DeviceUpdateLEDs();
|
||||
}
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
| Adam Honse (CalcProgrammer1) 20 Apr 2023 |
|
||||
| |
|
||||
| This file is part of the OpenRGB project |
|
||||
| SPDX-License-Identifier: GPL-2.0-only |
|
||||
| SPDX-License-Identifier: GPL-2.0-or-later |
|
||||
\*---------------------------------------------------------*/
|
||||
|
||||
#pragma once
|
||||
@@ -22,11 +22,9 @@ public:
|
||||
|
||||
void SetupZones();
|
||||
|
||||
void ResizeZone(int zone, int new_size);
|
||||
|
||||
void DeviceUpdateLEDs();
|
||||
void UpdateZoneLEDs(int zone);
|
||||
void UpdateSingleLED(int led);
|
||||
void DeviceUpdateZoneLEDs(int zone);
|
||||
void DeviceUpdateSingleLED(int led);
|
||||
|
||||
void DeviceUpdateMode();
|
||||
|
||||
|
||||
@@ -6,17 +6,18 @@
|
||||
| Adam Honse (CalcProgrammer1) 15 Apr 2023 |
|
||||
| |
|
||||
| This file is part of the OpenRGB project |
|
||||
| SPDX-License-Identifier: GPL-2.0-only |
|
||||
| SPDX-License-Identifier: GPL-2.0-or-later |
|
||||
\*---------------------------------------------------------*/
|
||||
|
||||
#include <cstring>
|
||||
#include "AOCMousematController.h"
|
||||
#include "StringUtils.h"
|
||||
|
||||
AOCMousematController::AOCMousematController(hid_device* dev_handle, const char* path)
|
||||
AOCMousematController::AOCMousematController(hid_device* dev_handle, const char* path, std::string dev_name)
|
||||
{
|
||||
dev = dev_handle;
|
||||
location = path;
|
||||
name = dev_name;
|
||||
}
|
||||
|
||||
AOCMousematController::~AOCMousematController()
|
||||
@@ -26,7 +27,12 @@ AOCMousematController::~AOCMousematController()
|
||||
|
||||
std::string AOCMousematController::GetDeviceLocation()
|
||||
{
|
||||
return("HID " + location);
|
||||
return("HID: " + location);
|
||||
}
|
||||
|
||||
std::string AOCMousematController::GetDeviceName()
|
||||
{
|
||||
return(name);
|
||||
}
|
||||
|
||||
std::string AOCMousematController::GetSerialString()
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
| Adam Honse (CalcProgrammer1) 15 Apr 2023 |
|
||||
| |
|
||||
| This file is part of the OpenRGB project |
|
||||
| SPDX-License-Identifier: GPL-2.0-only |
|
||||
| SPDX-License-Identifier: GPL-2.0-or-later |
|
||||
\*---------------------------------------------------------*/
|
||||
|
||||
#pragma once
|
||||
@@ -55,10 +55,11 @@ enum
|
||||
class AOCMousematController
|
||||
{
|
||||
public:
|
||||
AOCMousematController(hid_device* dev_handle, const char* path);
|
||||
AOCMousematController(hid_device* dev_handle, const char* path, std::string dev_name);
|
||||
~AOCMousematController();
|
||||
|
||||
std::string GetDeviceLocation();
|
||||
std::string GetDeviceName();
|
||||
std::string GetSerialString();
|
||||
|
||||
void SendDirect
|
||||
@@ -78,4 +79,5 @@ public:
|
||||
private:
|
||||
hid_device* dev;
|
||||
std::string location;
|
||||
std::string name;
|
||||
};
|
||||
|
||||
@@ -6,39 +6,35 @@
|
||||
| Adam Honse (CalcProgrammer1) 15 Apr 2023 |
|
||||
| |
|
||||
| This file is part of the OpenRGB project |
|
||||
| SPDX-License-Identifier: GPL-2.0-only |
|
||||
| SPDX-License-Identifier: GPL-2.0-or-later |
|
||||
\*---------------------------------------------------------*/
|
||||
|
||||
#include "Detector.h"
|
||||
#include "DetectionManager.h"
|
||||
#include "AOCMousematController.h"
|
||||
#include "RGBController_AOCMousemat.h"
|
||||
|
||||
/*-----------------------------------------------------*\
|
||||
| AOC Mousemat IDs |
|
||||
\*-----------------------------------------------------*/
|
||||
/*---------------------------------------------------------*\
|
||||
| AOC Mousemat IDs |
|
||||
\*---------------------------------------------------------*/
|
||||
#define AOC_VID 0x3938
|
||||
#define AOC_AMM700_PID 0x1162
|
||||
|
||||
/******************************************************************************************\
|
||||
* *
|
||||
* DetectAOCMousematControllers *
|
||||
* *
|
||||
* Tests the USB address to see if an AOC Mousemat controller exists there. *
|
||||
* *
|
||||
\******************************************************************************************/
|
||||
|
||||
void DetectAOCMousematControllers(hid_device_info* info, const std::string& name)
|
||||
DetectedControllers DetectAOCMousematControllers(hid_device_info* info, const std::string& name)
|
||||
{
|
||||
hid_device* dev = hid_open_path(info->path);
|
||||
DetectedControllers detected_controllers;
|
||||
hid_device* dev;
|
||||
|
||||
dev = hid_open_path(info->path);
|
||||
|
||||
if(dev)
|
||||
{
|
||||
AOCMousematController* controller = new AOCMousematController(dev, info->path);
|
||||
AOCMousematController* controller = new AOCMousematController(dev, info->path, name);
|
||||
RGBController_AOCMousemat* rgb_controller = new RGBController_AOCMousemat(controller);
|
||||
rgb_controller->name = name;
|
||||
|
||||
ResourceManager::get()->RegisterRGBController(rgb_controller);
|
||||
detected_controllers.push_back(rgb_controller);
|
||||
}
|
||||
|
||||
return(detected_controllers);
|
||||
}
|
||||
|
||||
REGISTER_HID_DETECTOR_IPU("AOC AGON AMM700", DetectAOCMousematControllers, AOC_VID, AOC_AMM700_PID, 1, 0xFF19, 0xFF19);
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
| Adam Honse (CalcProgrammer1) 15 Apr 2023 |
|
||||
| |
|
||||
| This file is part of the OpenRGB project |
|
||||
| SPDX-License-Identifier: GPL-2.0-only |
|
||||
| SPDX-License-Identifier: GPL-2.0-or-later |
|
||||
\*---------------------------------------------------------*/
|
||||
|
||||
#include "RGBController_AOCMousemat.h"
|
||||
@@ -26,7 +26,7 @@ RGBController_AOCMousemat::RGBController_AOCMousemat(AOCMousematController* cont
|
||||
{
|
||||
controller = controller_ptr;
|
||||
|
||||
name = "AOC Mousemat Device";
|
||||
name = controller->GetDeviceName();
|
||||
vendor = "AOC";
|
||||
type = DEVICE_TYPE_MOUSEMAT;
|
||||
description = "AOC Mousemat Device";
|
||||
@@ -113,6 +113,8 @@ RGBController_AOCMousemat::RGBController_AOCMousemat(AOCMousematController* cont
|
||||
|
||||
RGBController_AOCMousemat::~RGBController_AOCMousemat()
|
||||
{
|
||||
Shutdown();
|
||||
|
||||
delete controller;
|
||||
}
|
||||
|
||||
@@ -124,7 +126,6 @@ void RGBController_AOCMousemat::SetupZones()
|
||||
mousemat_zone.leds_min = 1;
|
||||
mousemat_zone.leds_max = 1;
|
||||
mousemat_zone.leds_count = 1;
|
||||
mousemat_zone.matrix_map = NULL;
|
||||
zones.push_back(mousemat_zone);
|
||||
|
||||
led mousemat_led;
|
||||
@@ -134,24 +135,17 @@ void RGBController_AOCMousemat::SetupZones()
|
||||
SetupColors();
|
||||
}
|
||||
|
||||
void RGBController_AOCMousemat::ResizeZone(int /*zone*/, int /*new_size*/)
|
||||
{
|
||||
/*---------------------------------------------------------*\
|
||||
| This device does not support resizing zones |
|
||||
\*---------------------------------------------------------*/
|
||||
}
|
||||
|
||||
void RGBController_AOCMousemat::DeviceUpdateLEDs()
|
||||
{
|
||||
DeviceUpdateMode();
|
||||
}
|
||||
|
||||
void RGBController_AOCMousemat::UpdateZoneLEDs(int /*zone*/)
|
||||
void RGBController_AOCMousemat::DeviceUpdateZoneLEDs(int /*zone*/)
|
||||
{
|
||||
DeviceUpdateLEDs();
|
||||
}
|
||||
|
||||
void RGBController_AOCMousemat::UpdateSingleLED(int /*led*/)
|
||||
void RGBController_AOCMousemat::DeviceUpdateSingleLED(int /*led*/)
|
||||
{
|
||||
DeviceUpdateLEDs();
|
||||
}
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
| Adam Honse (CalcProgrammer1) 15 Apr 2023 |
|
||||
| |
|
||||
| This file is part of the OpenRGB project |
|
||||
| SPDX-License-Identifier: GPL-2.0-only |
|
||||
| SPDX-License-Identifier: GPL-2.0-or-later |
|
||||
\*---------------------------------------------------------*/
|
||||
|
||||
#pragma once
|
||||
@@ -22,11 +22,9 @@ public:
|
||||
|
||||
void SetupZones();
|
||||
|
||||
void ResizeZone(int zone, int new_size);
|
||||
|
||||
void DeviceUpdateLEDs();
|
||||
void UpdateZoneLEDs(int zone);
|
||||
void UpdateSingleLED(int led);
|
||||
void DeviceUpdateZoneLEDs(int zone);
|
||||
void DeviceUpdateSingleLED(int led);
|
||||
|
||||
void DeviceUpdateMode();
|
||||
|
||||
|
||||
@@ -7,16 +7,16 @@
|
||||
| Shady Nawara (ShadyNawara) 16 Jan 2023 |
|
||||
| |
|
||||
| This file is part of the OpenRGB project |
|
||||
| SPDX-License-Identifier: GPL-2.0-only |
|
||||
| SPDX-License-Identifier: GPL-2.0-or-later |
|
||||
\*---------------------------------------------------------*/
|
||||
|
||||
#include <cstring>
|
||||
#include "RGBController.h"
|
||||
#include "ResourceManager.h"
|
||||
#include "SettingsManager.h"
|
||||
#include "StringUtils.h"
|
||||
#include "ASRockPolychromeUSBController.h"
|
||||
#include "dmiinfo.h"
|
||||
#include "ResourceManager.h"
|
||||
#include "RGBController.h"
|
||||
#include "SettingsManager.h"
|
||||
#include "StringUtils.h"
|
||||
|
||||
#define POLYCHROME_USB_READ_ZONE_CONFIG 0x11
|
||||
#define POLYCHROME_USB_READ_HEADER 0x14
|
||||
@@ -191,7 +191,7 @@ void PolychromeUSBController::SetDeviceInfo()
|
||||
WriteRGSwap(rgswap_final[0], rgswap_final[1], rgswap_final[2], rgswap_final[3], rgswap_final[4], rgswap_final[5], rgswap_final[6], rgswap_final[7]);
|
||||
}
|
||||
|
||||
void PolychromeUSBController::ResizeZone(int zone, int new_size)
|
||||
void PolychromeUSBController::SetZoneSize(int zone, int new_size)
|
||||
{
|
||||
unsigned char zonecfg[POLYCHROME_USB_ZONE_MAX_NUM];
|
||||
|
||||
@@ -324,6 +324,7 @@ void PolychromeUSBController::WriteAllZones
|
||||
| Send packet |
|
||||
\*-----------------------------------------------------*/
|
||||
hid_write(dev, usb_buf, 65);
|
||||
hid_read(dev, usb_buf, 64);
|
||||
|
||||
/*-----------------------------------------------------*\
|
||||
| Zero out buffer |
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
| Shady Nawara (ShadyNawara) 16 Jan 2023 |
|
||||
| |
|
||||
| This file is part of the OpenRGB project |
|
||||
| SPDX-License-Identifier: GPL-2.0-only |
|
||||
| SPDX-License-Identifier: GPL-2.0-or-later |
|
||||
\*---------------------------------------------------------*/
|
||||
|
||||
#pragma once
|
||||
@@ -135,7 +135,7 @@ public:
|
||||
unsigned int configsize
|
||||
);
|
||||
|
||||
void ResizeZone(int zone, int new_size);
|
||||
void SetZoneSize(int zone, int new_size);
|
||||
void SetRGSwap(bool reset);
|
||||
|
||||
protected:
|
||||
|
||||
@@ -7,12 +7,12 @@
|
||||
| Shady Nawara (ShadyNawara) 16 Jan 2023 |
|
||||
| |
|
||||
| This file is part of the OpenRGB project |
|
||||
| SPDX-License-Identifier: GPL-2.0-only |
|
||||
| SPDX-License-Identifier: GPL-2.0-or-later |
|
||||
\*---------------------------------------------------------*/
|
||||
|
||||
#include <hidapi.h>
|
||||
#include "Detector.h"
|
||||
#include "ASRockPolychromeUSBController.h"
|
||||
#include "DetectionManager.h"
|
||||
#include "RGBController_ASRockPolychromeUSB.h"
|
||||
|
||||
/*---------------------------------------------------------*\
|
||||
@@ -26,16 +26,22 @@
|
||||
#define ASROCK_MOTHERBOARD_1_PID 0x01A2
|
||||
#define ASROCK_DESKMINI_ADDRESSABLE_LED_STRIP_PID 0x01A6
|
||||
|
||||
void DetectPolychromeUSBControllers(hid_device_info* info, const std::string& /*name*/)
|
||||
DetectedControllers DetectPolychromeUSBControllers(hid_device_info* info, const std::string& /*name*/)
|
||||
{
|
||||
hid_device* dev = hid_open_path(info->path);
|
||||
DetectedControllers detected_controllers;
|
||||
hid_device* dev;
|
||||
|
||||
dev = hid_open_path(info->path);
|
||||
|
||||
if(dev)
|
||||
{
|
||||
PolychromeUSBController* controller = new PolychromeUSBController(dev, info->path);
|
||||
RGBController_PolychromeUSB* rgb_controller = new RGBController_PolychromeUSB(controller);
|
||||
ResourceManager::get()->RegisterRGBController(rgb_controller);
|
||||
|
||||
detected_controllers.push_back(rgb_controller);
|
||||
}
|
||||
|
||||
return(detected_controllers);
|
||||
}
|
||||
|
||||
REGISTER_HID_DETECTOR("ASRock Polychrome USB", DetectPolychromeUSBControllers, ASROCK_VID, ASROCK_MOTHERBOARD_1_PID);
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
| Shady Nawara (ShadyNawara) 16 Jan 2023 |
|
||||
| |
|
||||
| This file is part of the OpenRGB project |
|
||||
| SPDX-License-Identifier: GPL-2.0-only |
|
||||
| SPDX-License-Identifier: GPL-2.0-or-later |
|
||||
\*---------------------------------------------------------*/
|
||||
|
||||
#include <string.h>
|
||||
@@ -185,8 +185,25 @@ RGBController_PolychromeUSB::RGBController_PolychromeUSB(PolychromeUSBController
|
||||
SetupZones();
|
||||
}
|
||||
|
||||
RGBController_PolychromeUSB::~RGBController_PolychromeUSB()
|
||||
{
|
||||
Shutdown();
|
||||
|
||||
delete controller;
|
||||
}
|
||||
|
||||
void RGBController_PolychromeUSB::SetupZones()
|
||||
{
|
||||
/*-----------------------------------------------------*\
|
||||
| Only set LED count on the first run |
|
||||
\*-----------------------------------------------------*/
|
||||
bool first_run = false;
|
||||
|
||||
if(zones.size() == 0)
|
||||
{
|
||||
first_run = true;
|
||||
}
|
||||
|
||||
/*-------------------------------------------------*\
|
||||
| Clear any existing color/LED configuration |
|
||||
\*-------------------------------------------------*/
|
||||
@@ -197,40 +214,65 @@ void RGBController_PolychromeUSB::SetupZones()
|
||||
/*-------------------------------------------------*\
|
||||
| Set zones and leds |
|
||||
\*-------------------------------------------------*/
|
||||
for(unsigned int channel_idx = 0; channel_idx < zones.size(); channel_idx++)
|
||||
for(std::size_t channel_idx = 0; channel_idx < zones.size(); channel_idx++)
|
||||
{
|
||||
PolychromeDeviceInfo device_info = controller->GetPolychromeDevices()[channel_idx];
|
||||
|
||||
zones[channel_idx].type = ZONE_TYPE_LINEAR;
|
||||
|
||||
if(device_info.device_type== PolychromeDeviceType::ADDRESSABLE)
|
||||
{
|
||||
zones[channel_idx].name = polychrome_USB_zone_names[device_info.zone_type];
|
||||
zones[channel_idx].leds_min = 0;
|
||||
zones[channel_idx].leds_max = ASROCK_ADDRESSABLE_MAX_LEDS;
|
||||
zones[channel_idx].leds_count = device_info.num_leds;
|
||||
zones[channel_idx].leds_min = 0;
|
||||
zones[channel_idx].leds_max = ASROCK_ADDRESSABLE_MAX_LEDS;
|
||||
|
||||
if(first_run)
|
||||
{
|
||||
zones[channel_idx].flags = ZONE_FLAG_MANUALLY_CONFIGURABLE_SIZE
|
||||
| ZONE_FLAG_MANUALLY_CONFIGURABLE_NAME
|
||||
| ZONE_FLAG_MANUALLY_CONFIGURABLE_TYPE
|
||||
| ZONE_FLAG_MANUALLY_CONFIGURABLE_MATRIX_MAP
|
||||
| ZONE_FLAG_MANUALLY_CONFIGURABLE_SEGMENTS;
|
||||
}
|
||||
|
||||
if(!(zones[channel_idx].flags & ZONE_FLAG_MANUALLY_CONFIGURED_NAME))
|
||||
{
|
||||
zones[channel_idx].name = polychrome_USB_zone_names[device_info.zone_type];
|
||||
}
|
||||
|
||||
if(!(zones[channel_idx].flags & ZONE_FLAG_MANUALLY_CONFIGURED_SIZE))
|
||||
{
|
||||
zones[channel_idx].leds_count = device_info.num_leds;
|
||||
}
|
||||
|
||||
if(!(zones[channel_idx].flags & ZONE_FLAG_MANUALLY_CONFIGURED_TYPE))
|
||||
{
|
||||
zones[channel_idx].type = ZONE_TYPE_LINEAR;
|
||||
}
|
||||
|
||||
if(!(zones[channel_idx].flags & ZONE_FLAG_MANUALLY_CONFIGURED_MATRIX_MAP))
|
||||
{
|
||||
zones[channel_idx].matrix_map.width = 0;
|
||||
zones[channel_idx].matrix_map.height = 0;
|
||||
zones[channel_idx].matrix_map.map.resize(0);
|
||||
}
|
||||
}
|
||||
else if(device_info.device_type==PolychromeDeviceType::FIXED)
|
||||
{
|
||||
zones[channel_idx].name = polychrome_USB_zone_names[device_info.zone_type];
|
||||
zones[channel_idx].leds_min = device_info.num_leds;
|
||||
zones[channel_idx].leds_max = device_info.num_leds;
|
||||
zones[channel_idx].leds_count = device_info.num_leds;
|
||||
zones[channel_idx].name = polychrome_USB_zone_names[device_info.zone_type];
|
||||
zones[channel_idx].type = ZONE_TYPE_LINEAR;
|
||||
zones[channel_idx].leds_min = device_info.num_leds;
|
||||
zones[channel_idx].leds_max = device_info.num_leds;
|
||||
zones[channel_idx].leds_count = device_info.num_leds;
|
||||
}
|
||||
|
||||
|
||||
for(unsigned int led_ch_idx = 0; led_ch_idx < zones[channel_idx].leds_count; led_ch_idx++)
|
||||
{
|
||||
led new_led;
|
||||
new_led.name = zones[channel_idx].name;
|
||||
new_led.name.append(", LED ");
|
||||
new_led.name.append(std::to_string(led_ch_idx + 1));
|
||||
new_led.value = channel_idx;
|
||||
new_led.value = (unsigned int)channel_idx;
|
||||
|
||||
leds.push_back(new_led);
|
||||
}
|
||||
|
||||
zones[channel_idx].matrix_map = NULL;
|
||||
}
|
||||
|
||||
SetupColors();
|
||||
@@ -273,10 +315,14 @@ void RGBController_PolychromeUSB::SetupZones()
|
||||
}
|
||||
}
|
||||
|
||||
void RGBController_PolychromeUSB::ResizeZone(int zone, int new_size)
|
||||
void RGBController_PolychromeUSB::DeviceConfigureZone(int zone_idx)
|
||||
{
|
||||
zones[zone].leds_count = (unsigned char) new_size;
|
||||
controller->ResizeZone(zones_info[zone].zone, new_size);
|
||||
if((size_t)zone_idx < zones.size())
|
||||
{
|
||||
controller->SetZoneSize(zones_info[zone_idx].zone, zones[zone_idx].leds_count);
|
||||
|
||||
SetupZones();
|
||||
}
|
||||
}
|
||||
|
||||
void RGBController_PolychromeUSB::DeviceUpdateLEDs()
|
||||
@@ -288,9 +334,14 @@ void RGBController_PolychromeUSB::DeviceUpdateLEDs()
|
||||
}
|
||||
for(std::size_t zone_idx = 0; zone_idx < zones.size(); zone_idx++)
|
||||
{
|
||||
if(zones[zone_idx].leds_count == 0)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
unsigned char set_mode = zones_info[zone_idx].mode;
|
||||
|
||||
if (set_mode>modes.size())
|
||||
if(set_mode>modes.size())
|
||||
{
|
||||
set_mode = active_mode;
|
||||
}
|
||||
@@ -299,8 +350,13 @@ void RGBController_PolychromeUSB::DeviceUpdateLEDs()
|
||||
}
|
||||
}
|
||||
|
||||
void RGBController_PolychromeUSB::UpdateZoneLEDs(int zone)
|
||||
void RGBController_PolychromeUSB::DeviceUpdateZoneLEDs(int zone)
|
||||
{
|
||||
if(zones[zone].leds_count == 0)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
unsigned char set_mode=zones_info[zone].mode;
|
||||
|
||||
if(set_mode > modes.size())
|
||||
@@ -308,20 +364,25 @@ void RGBController_PolychromeUSB::UpdateZoneLEDs(int zone)
|
||||
set_mode = active_mode;
|
||||
}
|
||||
|
||||
controller->WriteZone(zone, set_mode, zones_info[zone].speed, zones[zone].colors[0], false);
|
||||
controller->WriteZone((unsigned char)zone, set_mode, zones_info[zone].speed, zones[zone].colors[0], false);
|
||||
}
|
||||
|
||||
void RGBController_PolychromeUSB::UpdateSingleLED(int led)
|
||||
void RGBController_PolychromeUSB::DeviceUpdateSingleLED(int led)
|
||||
{
|
||||
unsigned int channel = leds[led].value;
|
||||
unsigned char set_mode = zones_info[channel].mode;
|
||||
|
||||
if(zones[channel].leds_count == 0)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if(set_mode > modes.size())
|
||||
{
|
||||
set_mode = active_mode;
|
||||
}
|
||||
|
||||
controller->WriteZone(channel, set_mode, zones_info[channel].speed, zones[channel].colors[0], false);
|
||||
controller->WriteZone((unsigned char)channel, set_mode, zones_info[channel].speed, zones[channel].colors[0], false);
|
||||
}
|
||||
|
||||
unsigned char RGBController_PolychromeUSB::GetDeviceMode(unsigned char zone)
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
| Shady Nawara (ShadyNawara) 16 Jan 2023 |
|
||||
| |
|
||||
| This file is part of the OpenRGB project |
|
||||
| SPDX-License-Identifier: GPL-2.0-only |
|
||||
| SPDX-License-Identifier: GPL-2.0-or-later |
|
||||
\*---------------------------------------------------------*/
|
||||
|
||||
#pragma once
|
||||
@@ -19,14 +19,15 @@ class RGBController_PolychromeUSB : public RGBController
|
||||
{
|
||||
public:
|
||||
RGBController_PolychromeUSB(PolychromeUSBController* controller_ptr);
|
||||
~RGBController_PolychromeUSB();
|
||||
|
||||
void SetupZones();
|
||||
|
||||
void ResizeZone(int zone, int new_size);
|
||||
void DeviceConfigureZone(int zone_idx);
|
||||
|
||||
void DeviceUpdateLEDs();
|
||||
void UpdateZoneLEDs(int zone);
|
||||
void UpdateSingleLED(int led);
|
||||
void DeviceUpdateZoneLEDs(int zone);
|
||||
void DeviceUpdateSingleLED(int led);
|
||||
|
||||
void DeviceUpdateMode();
|
||||
|
||||
|
||||
+2
-2
@@ -6,7 +6,7 @@
|
||||
| Adam Honse (CalcProgrammer1) 14 Dec 2019 |
|
||||
| |
|
||||
| This file is part of the OpenRGB project |
|
||||
| SPDX-License-Identifier: GPL-2.0-only |
|
||||
| SPDX-License-Identifier: GPL-2.0-or-later |
|
||||
\*---------------------------------------------------------*/
|
||||
|
||||
#include "ASRockASRRGBSMBusController.h"
|
||||
@@ -36,7 +36,7 @@ ASRockASRRGBSMBusController::~ASRockASRRGBSMBusController()
|
||||
|
||||
std::string ASRockASRRGBSMBusController::GetDeviceLocation()
|
||||
{
|
||||
std::string return_string(bus->device_name);
|
||||
std::string return_string(bus->info.device_name);
|
||||
char addr[5];
|
||||
snprintf(addr, 5, "0x%02X", dev);
|
||||
return_string.append(", address ");
|
||||
|
||||
+1
-1
@@ -6,7 +6,7 @@
|
||||
| Adam Honse (CalcProgrammer1) 13 Dec 2019 |
|
||||
| |
|
||||
| This file is part of the OpenRGB project |
|
||||
| SPDX-License-Identifier: GPL-2.0-only |
|
||||
| SPDX-License-Identifier: GPL-2.0-or-later |
|
||||
\*---------------------------------------------------------*/
|
||||
|
||||
#pragma once
|
||||
|
||||
+6
-12
@@ -6,7 +6,7 @@
|
||||
| Adam Honse (CalcProgrammer1) 15 Dec 2019 |
|
||||
| |
|
||||
| This file is part of the OpenRGB project |
|
||||
| SPDX-License-Identifier: GPL-2.0-only |
|
||||
| SPDX-License-Identifier: GPL-2.0-or-later |
|
||||
\*---------------------------------------------------------*/
|
||||
|
||||
#include "RGBController_ASRockASRRGBSMBus.h"
|
||||
@@ -113,6 +113,8 @@ RGBController_ASRockASRRGBSMBus::RGBController_ASRockASRRGBSMBus(ASRockASRRGBSMB
|
||||
|
||||
RGBController_ASRockASRRGBSMBus::~RGBController_ASRockASRRGBSMBus()
|
||||
{
|
||||
Shutdown();
|
||||
|
||||
delete controller;
|
||||
}
|
||||
|
||||
@@ -135,7 +137,6 @@ void RGBController_ASRockASRRGBSMBus::SetupZones()
|
||||
new_zone->leds_min = 1;
|
||||
new_zone->leds_max = 1;
|
||||
new_zone->leds_count = 1;
|
||||
new_zone->matrix_map = NULL;
|
||||
|
||||
/*---------------------------------------------------------*\
|
||||
| Push new zone to zones vector |
|
||||
@@ -160,27 +161,20 @@ void RGBController_ASRockASRRGBSMBus::SetupZones()
|
||||
SetupColors();
|
||||
}
|
||||
|
||||
void RGBController_ASRockASRRGBSMBus::ResizeZone(int /*zone*/, int /*new_size*/)
|
||||
{
|
||||
/*---------------------------------------------------------*\
|
||||
| This device does not support resizing zones |
|
||||
\*---------------------------------------------------------*/
|
||||
}
|
||||
|
||||
void RGBController_ASRockASRRGBSMBus::DeviceUpdateLEDs()
|
||||
{
|
||||
for(unsigned int led = 0; led < colors.size(); led++)
|
||||
{
|
||||
UpdateSingleLED(led);
|
||||
DeviceUpdateSingleLED(led);
|
||||
}
|
||||
}
|
||||
|
||||
void RGBController_ASRockASRRGBSMBus::UpdateZoneLEDs(int /*zone*/)
|
||||
void RGBController_ASRockASRRGBSMBus::DeviceUpdateZoneLEDs(int /*zone*/)
|
||||
{
|
||||
DeviceUpdateLEDs();
|
||||
}
|
||||
|
||||
void RGBController_ASRockASRRGBSMBus::UpdateSingleLED(int led)
|
||||
void RGBController_ASRockASRRGBSMBus::DeviceUpdateSingleLED(int led)
|
||||
{
|
||||
unsigned char red = RGBGetRValue(colors[led]);
|
||||
unsigned char grn = RGBGetGValue(colors[led]);
|
||||
|
||||
+3
-5
@@ -6,7 +6,7 @@
|
||||
| Adam Honse (CalcProgrammer1) 15 Dec 2019 |
|
||||
| |
|
||||
| This file is part of the OpenRGB project |
|
||||
| SPDX-License-Identifier: GPL-2.0-only |
|
||||
| SPDX-License-Identifier: GPL-2.0-or-later |
|
||||
\*---------------------------------------------------------*/
|
||||
|
||||
#pragma once
|
||||
@@ -22,11 +22,9 @@ public:
|
||||
|
||||
void SetupZones();
|
||||
|
||||
void ResizeZone(int zone, int new_size);
|
||||
|
||||
void DeviceUpdateLEDs();
|
||||
void UpdateZoneLEDs(int zone);
|
||||
void UpdateSingleLED(int led);
|
||||
void DeviceUpdateZoneLEDs(int zone);
|
||||
void DeviceUpdateSingleLED(int led);
|
||||
|
||||
void DeviceUpdateMode();
|
||||
|
||||
|
||||
+2
-2
@@ -6,7 +6,7 @@
|
||||
| Adam Honse (CalcProgrammer1) 14 Dec 2019 |
|
||||
| |
|
||||
| This file is part of the OpenRGB project |
|
||||
| SPDX-License-Identifier: GPL-2.0-only |
|
||||
| SPDX-License-Identifier: GPL-2.0-or-later |
|
||||
\*---------------------------------------------------------*/
|
||||
|
||||
#include <cstring>
|
||||
@@ -36,7 +36,7 @@ ASRockPolychromeV1SMBusController::~ASRockPolychromeV1SMBusController()
|
||||
|
||||
std::string ASRockPolychromeV1SMBusController::GetDeviceLocation()
|
||||
{
|
||||
std::string return_string(bus->device_name);
|
||||
std::string return_string(bus->info.device_name);
|
||||
char addr[5];
|
||||
snprintf(addr, 5, "0x%02X", dev);
|
||||
return_string.append(", address ");
|
||||
|
||||
+1
-1
@@ -6,7 +6,7 @@
|
||||
| Adam Honse (CalcProgrammer1) 13 Dec 2019 |
|
||||
| |
|
||||
| This file is part of the OpenRGB project |
|
||||
| SPDX-License-Identifier: GPL-2.0-only |
|
||||
| SPDX-License-Identifier: GPL-2.0-or-later |
|
||||
\*---------------------------------------------------------*/
|
||||
|
||||
#pragma once
|
||||
|
||||
+11
-11
@@ -7,7 +7,7 @@
|
||||
| Adam Honse (CalcProgrammer1) 15 Dec 2019 |
|
||||
| |
|
||||
| This file is part of the OpenRGB project |
|
||||
| SPDX-License-Identifier: GPL-2.0-only |
|
||||
| SPDX-License-Identifier: GPL-2.0-or-later |
|
||||
\*---------------------------------------------------------*/
|
||||
|
||||
#include "LogManager.h"
|
||||
@@ -230,6 +230,8 @@ RGBController_ASRockPolychromeV1SMBus::RGBController_ASRockPolychromeV1SMBus(ASR
|
||||
|
||||
RGBController_ASRockPolychromeV1SMBus::~RGBController_ASRockPolychromeV1SMBus()
|
||||
{
|
||||
Shutdown();
|
||||
|
||||
delete controller;
|
||||
}
|
||||
|
||||
@@ -267,7 +269,6 @@ void RGBController_ASRockPolychromeV1SMBus::SetupZones()
|
||||
new_zone->leds_min = 1;
|
||||
new_zone->leds_max = 1;
|
||||
new_zone->leds_count = 1;
|
||||
new_zone->matrix_map = NULL;
|
||||
|
||||
if(zone_idx == POLYCHROME_V1_ZONE_ADDRESSABLE)
|
||||
{
|
||||
@@ -297,10 +298,9 @@ void RGBController_ASRockPolychromeV1SMBus::SetupZones()
|
||||
SetupColors();
|
||||
}
|
||||
|
||||
void RGBController_ASRockPolychromeV1SMBus::ResizeZone(int zone, int new_size)
|
||||
void RGBController_ASRockPolychromeV1SMBus::DeviceConfigureZone(int zone_idx)
|
||||
{
|
||||
LOG_TRACE("[%s] ResizeZone(%02X, %02X)", name.c_str(), zone, new_size);
|
||||
controller-> SetARGBSize(new_size & 0xFF);
|
||||
controller-> SetARGBSize(zones[zone_idx].leds_count & 0xFF);
|
||||
zones[POLYCHROME_V1_ZONE_ADDRESSABLE].leds_count = 1;
|
||||
}
|
||||
|
||||
@@ -309,19 +309,19 @@ void RGBController_ASRockPolychromeV1SMBus::DeviceUpdateLEDs()
|
||||
LOG_TRACE("[%s] DeviceUpdateLEDs()", name.c_str());
|
||||
for (uint8_t zone_idx = 0; zone_idx < zoneIndexMap.size(); zone_idx++)
|
||||
{
|
||||
UpdateSingleLED(zone_idx);
|
||||
DeviceUpdateSingleLED(zone_idx);
|
||||
}
|
||||
}
|
||||
|
||||
void RGBController_ASRockPolychromeV1SMBus::UpdateZoneLEDs(int /*zone*/)
|
||||
void RGBController_ASRockPolychromeV1SMBus::DeviceUpdateZoneLEDs(int /*zone*/)
|
||||
{
|
||||
LOG_TRACE("[%s] UpdateZoneLEDs()", name.c_str());
|
||||
LOG_TRACE("[%s] DeviceUpdateZoneLEDs()", name.c_str());
|
||||
DeviceUpdateLEDs();
|
||||
}
|
||||
|
||||
void RGBController_ASRockPolychromeV1SMBus::UpdateSingleLED(int zone)
|
||||
void RGBController_ASRockPolychromeV1SMBus::DeviceUpdateSingleLED(int zone)
|
||||
{
|
||||
LOG_TRACE("[%s] UpdateSingleLED(%02X)", name.c_str(), zone);
|
||||
LOG_TRACE("[%s] DeviceUpdateSingleLED(%02X)", name.c_str(), zone);
|
||||
|
||||
uint8_t red = RGBGetRValue(colors[zone]);
|
||||
uint8_t grn = RGBGetGValue(colors[zone]);
|
||||
@@ -338,7 +338,7 @@ void RGBController_ASRockPolychromeV1SMBus::DeviceUpdateMode()
|
||||
for(uint8_t zone_idx = 0; zone_idx < zoneIndexMap.size(); zone_idx++)
|
||||
{
|
||||
controller->SetMode(zoneIndexMap[zone_idx], modes[active_mode].value, modes[active_mode].speed);
|
||||
UpdateSingleLED(zone_idx);
|
||||
DeviceUpdateSingleLED(zone_idx);
|
||||
}
|
||||
}
|
||||
else
|
||||
|
||||
+4
-4
@@ -7,7 +7,7 @@
|
||||
| Adam Honse (CalcProgrammer1) 15 Dec 2019 |
|
||||
| |
|
||||
| This file is part of the OpenRGB project |
|
||||
| SPDX-License-Identifier: GPL-2.0-only |
|
||||
| SPDX-License-Identifier: GPL-2.0-or-later |
|
||||
\*---------------------------------------------------------*/
|
||||
|
||||
#pragma once
|
||||
@@ -23,11 +23,11 @@ public:
|
||||
|
||||
void SetupZones();
|
||||
|
||||
void ResizeZone(int zone, int new_size);
|
||||
void DeviceConfigureZone(int zone_idx);
|
||||
|
||||
void DeviceUpdateLEDs();
|
||||
void UpdateZoneLEDs(int zone);
|
||||
void UpdateSingleLED(int led);
|
||||
void DeviceUpdateZoneLEDs(int zone);
|
||||
void DeviceUpdateSingleLED(int led);
|
||||
|
||||
void DeviceUpdateMode();
|
||||
|
||||
|
||||
+2
-2
@@ -6,7 +6,7 @@
|
||||
| Adam Honse (CalcProgrammer1) 14 Dec 2019 |
|
||||
| |
|
||||
| This file is part of the OpenRGB project |
|
||||
| SPDX-License-Identifier: GPL-2.0-only |
|
||||
| SPDX-License-Identifier: GPL-2.0-or-later |
|
||||
\*---------------------------------------------------------*/
|
||||
|
||||
#include <cstring>
|
||||
@@ -37,7 +37,7 @@ ASRockPolychromeV2SMBusController::~ASRockPolychromeV2SMBusController()
|
||||
|
||||
std::string ASRockPolychromeV2SMBusController::GetDeviceLocation()
|
||||
{
|
||||
std::string return_string(bus->device_name);
|
||||
std::string return_string(bus->info.device_name);
|
||||
char addr[5];
|
||||
snprintf(addr, 5, "0x%02X", dev);
|
||||
return_string.append(", address ");
|
||||
|
||||
+1
-1
@@ -6,7 +6,7 @@
|
||||
| Adam Honse (CalcProgrammer1) 13 Dec 2019 |
|
||||
| |
|
||||
| This file is part of the OpenRGB project |
|
||||
| SPDX-License-Identifier: GPL-2.0-only |
|
||||
| SPDX-License-Identifier: GPL-2.0-or-later |
|
||||
\*---------------------------------------------------------*/
|
||||
|
||||
#pragma once
|
||||
|
||||
+7
-10
@@ -7,7 +7,7 @@
|
||||
| Adam Honse (CalcProgrammer1) 15 Dec 2019 |
|
||||
| |
|
||||
| This file is part of the OpenRGB project |
|
||||
| SPDX-License-Identifier: GPL-2.0-only |
|
||||
| SPDX-License-Identifier: GPL-2.0-or-later |
|
||||
\*---------------------------------------------------------*/
|
||||
|
||||
#include "RGBController_ASRockPolychromeV2SMBus.h"
|
||||
@@ -185,6 +185,8 @@ RGBController_ASRockPolychromeV2SMBus::RGBController_ASRockPolychromeV2SMBus(ASR
|
||||
|
||||
RGBController_ASRockPolychromeV2SMBus::~RGBController_ASRockPolychromeV2SMBus()
|
||||
{
|
||||
Shutdown();
|
||||
|
||||
delete controller;
|
||||
}
|
||||
|
||||
@@ -229,8 +231,6 @@ void RGBController_ASRockPolychromeV2SMBus::SetupZones()
|
||||
new_zone->type = ZONE_TYPE_SINGLE;
|
||||
}
|
||||
|
||||
new_zone->matrix_map = NULL;
|
||||
|
||||
/*---------------------------------------------------------*\
|
||||
| Push new zone to zones vector |
|
||||
\*---------------------------------------------------------*/
|
||||
@@ -238,7 +238,6 @@ void RGBController_ASRockPolychromeV2SMBus::SetupZones()
|
||||
}
|
||||
}
|
||||
|
||||
unsigned int led_count = 0;
|
||||
/*---------------------------------------------------------*\
|
||||
| Set up LEDs |
|
||||
\*---------------------------------------------------------*/
|
||||
@@ -268,8 +267,6 @@ void RGBController_ASRockPolychromeV2SMBus::SetupZones()
|
||||
\*---------------------------------------------------------*/
|
||||
leds.push_back(*new_led);
|
||||
|
||||
led_count++;
|
||||
|
||||
if(zone_idx == POLYCHROME_V2_ZONE_ADDRESSABLE)
|
||||
{
|
||||
break;
|
||||
@@ -281,7 +278,7 @@ void RGBController_ASRockPolychromeV2SMBus::SetupZones()
|
||||
SetupColors();
|
||||
}
|
||||
|
||||
void RGBController_ASRockPolychromeV2SMBus::ResizeZone(int /*zone*/, int /*new_size*/)
|
||||
void RGBController_ASRockPolychromeV2SMBus::DeviceConfigureZone(int /*zone_idx*/)
|
||||
{
|
||||
/*---------------------------------------------------------*\
|
||||
| This device does not support resizing zones |
|
||||
@@ -292,16 +289,16 @@ void RGBController_ASRockPolychromeV2SMBus::DeviceUpdateLEDs()
|
||||
{
|
||||
for(unsigned int led = 0; led < colors.size(); led++)
|
||||
{
|
||||
UpdateSingleLED(led);
|
||||
DeviceUpdateSingleLED(led);
|
||||
}
|
||||
}
|
||||
|
||||
void RGBController_ASRockPolychromeV2SMBus::UpdateZoneLEDs(int /*zone*/)
|
||||
void RGBController_ASRockPolychromeV2SMBus::DeviceUpdateZoneLEDs(int /*zone*/)
|
||||
{
|
||||
DeviceUpdateLEDs();
|
||||
}
|
||||
|
||||
void RGBController_ASRockPolychromeV2SMBus::UpdateSingleLED(int led)
|
||||
void RGBController_ASRockPolychromeV2SMBus::DeviceUpdateSingleLED(int led)
|
||||
{
|
||||
unsigned char red = RGBGetRValue(colors[led]);
|
||||
unsigned char grn = RGBGetGValue(colors[led]);
|
||||
|
||||
+4
-4
@@ -7,7 +7,7 @@
|
||||
| Adam Honse (CalcProgrammer1) 15 Dec 2019 |
|
||||
| |
|
||||
| This file is part of the OpenRGB project |
|
||||
| SPDX-License-Identifier: GPL-2.0-only |
|
||||
| SPDX-License-Identifier: GPL-2.0-or-later |
|
||||
\*---------------------------------------------------------*/
|
||||
|
||||
#pragma once
|
||||
@@ -23,11 +23,11 @@ public:
|
||||
|
||||
void SetupZones();
|
||||
|
||||
void ResizeZone(int zone, int new_size);
|
||||
void DeviceConfigureZone(int zone_idx);
|
||||
|
||||
void DeviceUpdateLEDs();
|
||||
void UpdateZoneLEDs(int zone);
|
||||
void UpdateSingleLED(int led);
|
||||
void DeviceUpdateZoneLEDs(int zone);
|
||||
void DeviceUpdateSingleLED(int led);
|
||||
|
||||
void DeviceUpdateMode();
|
||||
|
||||
|
||||
@@ -7,11 +7,11 @@
|
||||
| Adam Honse (CalcProgrammer1) 14 Dec 2019 |
|
||||
| |
|
||||
| This file is part of the OpenRGB project |
|
||||
| SPDX-License-Identifier: GPL-2.0-only |
|
||||
| SPDX-License-Identifier: GPL-2.0-or-later |
|
||||
\*---------------------------------------------------------*/
|
||||
|
||||
#include <vector>
|
||||
#include "Detector.h"
|
||||
#include "DetectionManager.h"
|
||||
#include "ASRockASRRGBSMBusController.h"
|
||||
#include "ASRockPolychromeV1SMBusController.h"
|
||||
#include "ASRockPolychromeV2SMBusController.h"
|
||||
@@ -22,15 +22,6 @@
|
||||
#include "i2c_smbus.h"
|
||||
#include "pci_ids.h"
|
||||
|
||||
/*******************************************************************************************\
|
||||
* *
|
||||
* TestForPolychromeSMBusController *
|
||||
* *
|
||||
* Tests the given address to see if an ASRock RGB controller exists there. *
|
||||
* First does a quick write to test for a response *
|
||||
* *
|
||||
\*******************************************************************************************/
|
||||
|
||||
#define ASROCK_DETECTOR_NAME "ASRock SMBus Detectector"
|
||||
#define VENDOR_NAME "ASRock"
|
||||
#define SMBUS_ADDRESS 0x6A
|
||||
@@ -67,7 +58,7 @@ bool TestForPolychromeSMBusController(i2c_smbus_interface* bus, uint8_t address)
|
||||
|
||||
return(pass);
|
||||
|
||||
} /* TestForPolychromeController() */
|
||||
}
|
||||
|
||||
uint16_t GetFirmwareVersion(i2c_smbus_interface* bus, uint8_t address)
|
||||
{
|
||||
@@ -94,64 +85,54 @@ uint16_t GetFirmwareVersion(i2c_smbus_interface* bus, uint8_t address)
|
||||
}
|
||||
}
|
||||
|
||||
/******************************************************************************************\
|
||||
* *
|
||||
* DetectPolychromeControllers *
|
||||
* *
|
||||
* Detect ASRock Polychrome RGB SMBus controllers on the enumerated I2C busses at *
|
||||
* address 0x6A. *
|
||||
* *
|
||||
* bus - pointer to i2c_smbus_interface where Polychrome device is connected *
|
||||
* dev - I2C address of Polychrome device *
|
||||
* *
|
||||
\******************************************************************************************/
|
||||
|
||||
void DetectASRockSMBusControllers(std::vector<i2c_smbus_interface*>& busses)
|
||||
DetectedControllers DetectASRockSMBusControllers(std::vector<i2c_smbus_interface*>& buses)
|
||||
{
|
||||
for(unsigned int bus = 0; bus < busses.size(); bus++)
|
||||
DetectedControllers detected_controllers;
|
||||
|
||||
for(unsigned int bus = 0; bus < buses.size(); bus++)
|
||||
{
|
||||
IF_MOBO_SMBUS(busses[bus]->pci_vendor, busses[bus]->pci_device)
|
||||
IF_MOBO_SMBUS(buses[bus]->info.pci_vendor, buses[bus]->info.pci_device)
|
||||
{
|
||||
if(busses[bus]->pci_subsystem_vendor == ASROCK_SUB_VEN)
|
||||
if(buses[bus]->info.pci_subsystem_vendor == ASROCK_SUB_VEN)
|
||||
{
|
||||
LOG_DEBUG(SMBUS_CHECK_DEVICE_MESSAGE_EN, ASROCK_DETECTOR_NAME, bus, VENDOR_NAME, SMBUS_ADDRESS);
|
||||
// Check for Polychrome controller at 0x6A
|
||||
if(TestForPolychromeSMBusController(busses[bus], SMBUS_ADDRESS))
|
||||
if(TestForPolychromeSMBusController(buses[bus], SMBUS_ADDRESS))
|
||||
{
|
||||
LOG_DEBUG("[%s] Detected a device at address 0x%02X, testing for a known controller", ASROCK_DETECTOR_NAME, SMBUS_ADDRESS);
|
||||
|
||||
u16_to_u8 version;
|
||||
version.u16 = GetFirmwareVersion(busses[bus], SMBUS_ADDRESS);
|
||||
version.u16 = GetFirmwareVersion(buses[bus], SMBUS_ADDRESS);
|
||||
|
||||
switch (version.msb)
|
||||
switch(version.msb)
|
||||
{
|
||||
case ASROCK_TYPE_ASRLED:
|
||||
{
|
||||
LOG_DEBUG("[%s] Found a ASR RGB LED Controller", ASROCK_DETECTOR_NAME);
|
||||
ASRockASRRGBSMBusController* controller = new ASRockASRRGBSMBusController(busses[bus], SMBUS_ADDRESS);
|
||||
ASRockASRRGBSMBusController* controller = new ASRockASRRGBSMBusController(buses[bus], SMBUS_ADDRESS);
|
||||
controller-> fw_version = version.u16;
|
||||
RGBController_ASRockASRRGBSMBus* rgb_controller = new RGBController_ASRockASRRGBSMBus(controller);
|
||||
ResourceManager::get()->RegisterRGBController(rgb_controller);
|
||||
detected_controllers.push_back(rgb_controller);
|
||||
}
|
||||
break;
|
||||
|
||||
case ASROCK_TYPE_POLYCHROME_V1:
|
||||
{
|
||||
LOG_DEBUG("[%s] Found a Polychrome v1 Controller", ASROCK_DETECTOR_NAME);
|
||||
ASRockPolychromeV1SMBusController* controller = new ASRockPolychromeV1SMBusController(busses[bus], SMBUS_ADDRESS);
|
||||
ASRockPolychromeV1SMBusController* controller = new ASRockPolychromeV1SMBusController(buses[bus], SMBUS_ADDRESS);
|
||||
controller-> fw_version = version.u16;
|
||||
RGBController_ASRockPolychromeV1SMBus* rgb_controller = new RGBController_ASRockPolychromeV1SMBus(controller);
|
||||
ResourceManager::get()->RegisterRGBController(rgb_controller);
|
||||
detected_controllers.push_back(rgb_controller);
|
||||
}
|
||||
break;
|
||||
|
||||
case ASROCK_TYPE_POLYCHROME_V2:
|
||||
{
|
||||
LOG_DEBUG("[%s] Found a Polychrome v2 Controller", ASROCK_DETECTOR_NAME);
|
||||
ASRockPolychromeV2SMBusController* controller = new ASRockPolychromeV2SMBusController(busses[bus], SMBUS_ADDRESS);
|
||||
ASRockPolychromeV2SMBusController* controller = new ASRockPolychromeV2SMBusController(buses[bus], SMBUS_ADDRESS);
|
||||
controller-> fw_version = version.u16;
|
||||
RGBController_ASRockPolychromeV2SMBus* rgb_controller = new RGBController_ASRockPolychromeV2SMBus(controller);
|
||||
ResourceManager::get()->RegisterRGBController(rgb_controller);
|
||||
detected_controllers.push_back(rgb_controller);
|
||||
}
|
||||
break;
|
||||
|
||||
@@ -172,6 +153,7 @@ void DetectASRockSMBusControllers(std::vector<i2c_smbus_interface*>& busses)
|
||||
}
|
||||
}
|
||||
|
||||
} /* DetectSMBusPolychromeControllers() */
|
||||
return(detected_controllers);
|
||||
}
|
||||
|
||||
REGISTER_I2C_DETECTOR("ASRock Motherboard SMBus Controllers", DetectASRockSMBusControllers);
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
| Gabriel Marcano (gemarcano) 21 Apr 2021 |
|
||||
| |
|
||||
| This file is part of the OpenRGB project |
|
||||
| SPDX-License-Identifier: GPL-2.0-only |
|
||||
| SPDX-License-Identifier: GPL-2.0-or-later |
|
||||
\*---------------------------------------------------------*/
|
||||
|
||||
#include <cstring>
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
| Gabriel Marcano (gemarcano) 19 Apr 2021 |
|
||||
| |
|
||||
| This file is part of the OpenRGB project |
|
||||
| SPDX-License-Identifier: GPL-2.0-only |
|
||||
| SPDX-License-Identifier: GPL-2.0-or-later |
|
||||
\*---------------------------------------------------------*/
|
||||
|
||||
#pragma once
|
||||
|
||||
@@ -4,11 +4,11 @@
|
||||
| Detector for Dell Alienware RGB USB controller |
|
||||
| |
|
||||
| This file is part of the OpenRGB project |
|
||||
| SPDX-License-Identifier: GPL-2.0-only |
|
||||
| SPDX-License-Identifier: GPL-2.0-or-later |
|
||||
\*---------------------------------------------------------*/
|
||||
|
||||
#include "Detector.h"
|
||||
#include "AlienwareController.h"
|
||||
#include "DetectionManager.h"
|
||||
#include "RGBController_Alienware.h"
|
||||
|
||||
/*---------------------------------------------------------*\
|
||||
@@ -22,17 +22,22 @@
|
||||
#define ALIENWARE_G_SERIES_PID1 0x0550
|
||||
#define ALIENWARE_G_SERIES_PID2 0x0551
|
||||
|
||||
void DetectAlienwareControllers(hid_device_info* info, const std::string& name)
|
||||
DetectedControllers DetectAlienwareControllers(hid_device_info* info, const std::string& name)
|
||||
{
|
||||
hid_device* dev = hid_open_path(info->path);
|
||||
DetectedControllers detected_controllers;
|
||||
hid_device* dev;
|
||||
|
||||
dev = hid_open_path(info->path);
|
||||
|
||||
if(dev)
|
||||
{
|
||||
AlienwareController* controller = new AlienwareController(dev, *info, name);
|
||||
RGBController_Alienware* rgb_controller = new RGBController_Alienware(controller);
|
||||
|
||||
ResourceManager::get()->RegisterRGBController(rgb_controller);
|
||||
detected_controllers.push_back(rgb_controller);
|
||||
}
|
||||
|
||||
return(detected_controllers);
|
||||
}
|
||||
|
||||
REGISTER_HID_DETECTOR("Dell G Series LED Controller", DetectAlienwareControllers, ALIENWARE_VID, ALIENWARE_G_SERIES_PID1);
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
| Gabriel Marcano (gemarcano) 19 Apr 2021 |
|
||||
| |
|
||||
| This file is part of the OpenRGB project |
|
||||
| SPDX-License-Identifier: GPL-2.0-only |
|
||||
| SPDX-License-Identifier: GPL-2.0-or-later |
|
||||
\*---------------------------------------------------------*/
|
||||
|
||||
#include <thread>
|
||||
@@ -125,6 +125,13 @@ RGBController_Alienware::RGBController_Alienware(AlienwareController* controller
|
||||
controller->UpdateDim();
|
||||
}
|
||||
|
||||
RGBController_Alienware::~RGBController_Alienware()
|
||||
{
|
||||
Shutdown();
|
||||
|
||||
delete controller;
|
||||
}
|
||||
|
||||
void RGBController_Alienware::SetupZones()
|
||||
{
|
||||
/*-------------------------------------------------*\
|
||||
@@ -141,7 +148,6 @@ void RGBController_Alienware::SetupZones()
|
||||
new_zone.leds_min = 1;
|
||||
new_zone.leds_max = 1;
|
||||
new_zone.leds_count = 1;
|
||||
new_zone.matrix_map = nullptr;
|
||||
|
||||
zones.emplace_back(new_zone);
|
||||
}
|
||||
@@ -158,26 +164,19 @@ void RGBController_Alienware::SetupZones()
|
||||
SetupColors();
|
||||
}
|
||||
|
||||
void RGBController_Alienware::ResizeZone(int /*zone*/, int /*new_size*/)
|
||||
{
|
||||
/*---------------------------------------------------------*\
|
||||
| This device does not support resizing zones |
|
||||
\*---------------------------------------------------------*/
|
||||
}
|
||||
|
||||
void RGBController_Alienware::DeviceUpdateLEDs()
|
||||
{
|
||||
DeviceUpdateMode();
|
||||
}
|
||||
|
||||
void RGBController_Alienware::UpdateZoneLEDs(int /*zone*/)
|
||||
void RGBController_Alienware::DeviceUpdateZoneLEDs(int /*zone*/)
|
||||
{
|
||||
DeviceUpdateLEDs();
|
||||
}
|
||||
|
||||
void RGBController_Alienware::UpdateSingleLED(int led)
|
||||
void RGBController_Alienware::DeviceUpdateSingleLED(int led)
|
||||
{
|
||||
UpdateZoneLEDs(led);
|
||||
DeviceUpdateZoneLEDs(led);
|
||||
}
|
||||
|
||||
static bool modes_eq(const mode& mode1, const mode& mode2)
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
| Gabriel Marcano (gemarcano) 19 Apr 2021 |
|
||||
| |
|
||||
| This file is part of the OpenRGB project |
|
||||
| SPDX-License-Identifier: GPL-2.0-only |
|
||||
| SPDX-License-Identifier: GPL-2.0-or-later |
|
||||
\*---------------------------------------------------------*/
|
||||
|
||||
#pragma once
|
||||
@@ -19,14 +19,13 @@ class RGBController_Alienware : public RGBController
|
||||
{
|
||||
public:
|
||||
RGBController_Alienware(AlienwareController* controller_ptr);
|
||||
~RGBController_Alienware();
|
||||
|
||||
void SetupZones();
|
||||
|
||||
void ResizeZone(int zone, int new_size);
|
||||
|
||||
void DeviceUpdateLEDs();
|
||||
void UpdateZoneLEDs(int zone);
|
||||
void UpdateSingleLED(int led);
|
||||
void DeviceUpdateZoneLEDs(int zone);
|
||||
void DeviceUpdateSingleLED(int led);
|
||||
|
||||
void DeviceUpdateMode();
|
||||
|
||||
|
||||
+9
-3
@@ -7,17 +7,18 @@
|
||||
| Dominik Mikolajczyk (dmiko) 23 Oct 2023 |
|
||||
| |
|
||||
| This file is part of the OpenRGB project |
|
||||
| SPDX-License-Identifier: GPL-2.0-only |
|
||||
| SPDX-License-Identifier: GPL-2.0-or-later |
|
||||
\*---------------------------------------------------------*/
|
||||
|
||||
#include <cstring>
|
||||
#include "AlienwareAW410KController.h"
|
||||
#include "StringUtils.h"
|
||||
|
||||
AlienwareAW410KController::AlienwareAW410KController(hid_device* dev_handle, const char* path)
|
||||
AlienwareAW410KController::AlienwareAW410KController(hid_device* dev_handle, const char* path, std::string dev_name)
|
||||
{
|
||||
dev = dev_handle;
|
||||
location = path;
|
||||
name = dev_name;
|
||||
|
||||
SendCommit();
|
||||
}
|
||||
@@ -32,6 +33,11 @@ std::string AlienwareAW410KController::GetDeviceLocation()
|
||||
return("HID: " + location);
|
||||
}
|
||||
|
||||
std::string AlienwareAW410KController::GetDeviceName()
|
||||
{
|
||||
return(name);
|
||||
}
|
||||
|
||||
std::string AlienwareAW410KController::GetSerialString()
|
||||
{
|
||||
wchar_t serial_string[128];
|
||||
@@ -313,7 +319,7 @@ void AlienwareAW410KController::SetMode
|
||||
SendCommit();
|
||||
}
|
||||
|
||||
void AlienwareAW410KController::UpdateSingleLED
|
||||
void AlienwareAW410KController::DeviceUpdateSingleLED
|
||||
(
|
||||
unsigned char led,
|
||||
unsigned char red,
|
||||
|
||||
+5
-3
@@ -7,7 +7,7 @@
|
||||
| Dominik Mikolajczyk (dmiko) 23 Oct 2023 |
|
||||
| |
|
||||
| This file is part of the OpenRGB project |
|
||||
| SPDX-License-Identifier: GPL-2.0-only |
|
||||
| SPDX-License-Identifier: GPL-2.0-or-later |
|
||||
\*---------------------------------------------------------*/
|
||||
|
||||
#pragma once
|
||||
@@ -75,10 +75,11 @@ struct SelectedButtons
|
||||
class AlienwareAW410KController
|
||||
{
|
||||
public:
|
||||
AlienwareAW410KController(hid_device* dev_handle, const char* path);
|
||||
AlienwareAW410KController(hid_device* dev_handle, const char* path, std::string dev_name);
|
||||
~AlienwareAW410KController();
|
||||
|
||||
std::string GetDeviceLocation();
|
||||
std::string GetDeviceName();
|
||||
std::string GetSerialString();
|
||||
|
||||
void SendInitialize();
|
||||
@@ -129,7 +130,7 @@ public:
|
||||
unsigned char blue2
|
||||
);
|
||||
|
||||
void UpdateSingleLED
|
||||
void DeviceUpdateSingleLED
|
||||
(
|
||||
unsigned char led,
|
||||
unsigned char red,
|
||||
@@ -140,6 +141,7 @@ public:
|
||||
private:
|
||||
hid_device* dev;
|
||||
std::string location;
|
||||
std::string name;
|
||||
|
||||
void SendMode
|
||||
(
|
||||
|
||||
+43
@@ -0,0 +1,43 @@
|
||||
/*---------------------------------------------------------*\
|
||||
| AlienwareAW410KControllerDetect.cpp |
|
||||
| |
|
||||
| Detector for Alienware AW410K Keyboard |
|
||||
| |
|
||||
| This file is part of the OpenRGB project |
|
||||
| SPDX-License-Identifier: GPL-2.0-or-later |
|
||||
\*---------------------------------------------------------*/
|
||||
|
||||
#include <hidapi.h>
|
||||
#include "DetectionManager.h"
|
||||
#include "AlienwareAW410KController.h"
|
||||
#include "RGBController_AlienwareAW410K.h"
|
||||
|
||||
/*---------------------------------------------------------*\
|
||||
| Alienware vendor ID |
|
||||
\*---------------------------------------------------------*/
|
||||
#define ALIENWARE_VID 0x04F2
|
||||
|
||||
/*---------------------------------------------------------*\
|
||||
| Keyboard product IDs |
|
||||
\*---------------------------------------------------------*/
|
||||
#define ALIENWARE_AW410K_PID 0x1968
|
||||
|
||||
DetectedControllers DetectAlienwareAW410KControllers(hid_device_info* info, const std::string& name)
|
||||
{
|
||||
DetectedControllers detected_controllers;
|
||||
hid_device* dev;
|
||||
|
||||
dev = hid_open_path(info->path);
|
||||
|
||||
if(dev)
|
||||
{
|
||||
AlienwareAW410KController* controller = new AlienwareAW410KController(dev, info->path, name);
|
||||
RGBController_AlienwareAW410K* rgb_controller = new RGBController_AlienwareAW410K(controller);
|
||||
|
||||
detected_controllers.push_back(rgb_controller);
|
||||
}
|
||||
|
||||
return(detected_controllers);
|
||||
}
|
||||
|
||||
REGISTER_HID_DETECTOR_IPU("Alienware AW410K", DetectAlienwareAW410KControllers, ALIENWARE_VID, ALIENWARE_AW410K_PID, 0x02, 0xFF00, 0x01);
|
||||
+8
-31
@@ -7,7 +7,7 @@
|
||||
| Dominik Mikolajczyk (dmiko) 23 Oct 2023 |
|
||||
| |
|
||||
| This file is part of the OpenRGB project |
|
||||
| SPDX-License-Identifier: GPL-2.0-only |
|
||||
| SPDX-License-Identifier: GPL-2.0-or-later |
|
||||
\*---------------------------------------------------------*/
|
||||
|
||||
#include <iterator>
|
||||
@@ -176,7 +176,7 @@ RGBController_AlienwareAW410K::RGBController_AlienwareAW410K(AlienwareAW410KCont
|
||||
{
|
||||
controller = controller_ptr;
|
||||
|
||||
name = "Alienware AW410K Keyboard Device";
|
||||
name = controller->GetDeviceName();
|
||||
vendor = "Alienware";
|
||||
type = DEVICE_TYPE_KEYBOARD;
|
||||
description = "Alienware AW410K Keyboard Device";
|
||||
@@ -278,16 +278,7 @@ RGBController_AlienwareAW410K::RGBController_AlienwareAW410K(AlienwareAW410KCont
|
||||
|
||||
RGBController_AlienwareAW410K::~RGBController_AlienwareAW410K()
|
||||
{
|
||||
/*---------------------------------------------------------*\
|
||||
| Delete the matrix map |
|
||||
\*---------------------------------------------------------*/
|
||||
for(unsigned int zone_index = 0; zone_index < zones.size(); zone_index++)
|
||||
{
|
||||
if(zones[zone_index].matrix_map != NULL)
|
||||
{
|
||||
delete zones[zone_index].matrix_map;
|
||||
}
|
||||
}
|
||||
Shutdown();
|
||||
|
||||
delete controller;
|
||||
}
|
||||
@@ -310,14 +301,7 @@ void RGBController_AlienwareAW410K::SetupZones()
|
||||
|
||||
if(zone_types[zone_idx] == ZONE_TYPE_MATRIX)
|
||||
{
|
||||
new_zone.matrix_map = new matrix_map_type;
|
||||
new_zone.matrix_map->height = 6;
|
||||
new_zone.matrix_map->width = 24;
|
||||
new_zone.matrix_map->map = (unsigned int *)&matrix_map;
|
||||
}
|
||||
else
|
||||
{
|
||||
new_zone.matrix_map = NULL;
|
||||
new_zone.matrix_map.Set(6, 24, (unsigned int *)&matrix_map);
|
||||
}
|
||||
|
||||
zones.push_back(new_zone);
|
||||
@@ -336,13 +320,6 @@ void RGBController_AlienwareAW410K::SetupZones()
|
||||
SetupColors();
|
||||
}
|
||||
|
||||
void RGBController_AlienwareAW410K::ResizeZone(int /*zone*/, int /*new_size*/)
|
||||
{
|
||||
/*---------------------------------------------------------*\
|
||||
| This device does not support resizing zones |
|
||||
\*---------------------------------------------------------*/
|
||||
}
|
||||
|
||||
void RGBController_AlienwareAW410K::DeviceUpdateLEDs()
|
||||
{
|
||||
std::vector<SelectedButtons> frame_buf_keys;
|
||||
@@ -374,21 +351,21 @@ void RGBController_AlienwareAW410K::DeviceUpdateLEDs()
|
||||
std::copy(new_colors.begin(), new_colors.end(),current_colors.begin());
|
||||
}
|
||||
|
||||
void RGBController_AlienwareAW410K::UpdateZoneLEDs(int zone)
|
||||
void RGBController_AlienwareAW410K::DeviceUpdateZoneLEDs(int zone)
|
||||
{
|
||||
controller->SetDirect((unsigned char) zone, RGBGetRValue(zones[zone].colors[0]), RGBGetGValue(zones[zone].colors[0]), RGBGetBValue(zones[zone].colors[0]));
|
||||
}
|
||||
|
||||
void RGBController_AlienwareAW410K::UpdateSingleLED(int led)
|
||||
void RGBController_AlienwareAW410K::DeviceUpdateSingleLED(int led)
|
||||
{
|
||||
controller->UpdateSingleLED(leds[led].value, RGBGetRValue(colors[led]), RGBGetGValue(colors[led]), RGBGetBValue(colors[led]));
|
||||
controller->DeviceUpdateSingleLED(leds[led].value, RGBGetRValue(colors[led]), RGBGetGValue(colors[led]), RGBGetBValue(colors[led]));
|
||||
}
|
||||
|
||||
void RGBController_AlienwareAW410K::DeviceUpdateMode()
|
||||
{
|
||||
if(active_mode == 0xFFFF)
|
||||
{
|
||||
UpdateLEDs();
|
||||
UpdateLEDsInternal();
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
+3
-5
@@ -7,7 +7,7 @@
|
||||
| Dominik Mikolajczyk (dmiko) 23 Oct 2023 |
|
||||
| |
|
||||
| This file is part of the OpenRGB project |
|
||||
| SPDX-License-Identifier: GPL-2.0-only |
|
||||
| SPDX-License-Identifier: GPL-2.0-or-later |
|
||||
\*---------------------------------------------------------*/
|
||||
|
||||
#pragma once
|
||||
@@ -23,11 +23,9 @@ public:
|
||||
|
||||
void SetupZones();
|
||||
|
||||
void ResizeZone(int zone, int new_size);
|
||||
|
||||
void DeviceUpdateLEDs();
|
||||
void UpdateZoneLEDs(int zone);
|
||||
void UpdateSingleLED(int led);
|
||||
void DeviceUpdateZoneLEDs(int zone);
|
||||
void DeviceUpdateSingleLED(int led);
|
||||
|
||||
void DeviceUpdateMode();
|
||||
|
||||
|
||||
+9
-3
@@ -6,17 +6,18 @@
|
||||
| Mohamad Sallal (msallal) 22 May 2021 |
|
||||
| |
|
||||
| This file is part of the OpenRGB project |
|
||||
| SPDX-License-Identifier: GPL-2.0-only |
|
||||
| SPDX-License-Identifier: GPL-2.0-or-later |
|
||||
\*---------------------------------------------------------*/
|
||||
|
||||
#include <cstring>
|
||||
#include "AlienwareAW510KController.h"
|
||||
#include "StringUtils.h"
|
||||
|
||||
AlienwareAW510KController::AlienwareAW510KController(hid_device* dev_handle, const char* path)
|
||||
AlienwareAW510KController::AlienwareAW510KController(hid_device* dev_handle, const char* path, std::string dev_name)
|
||||
{
|
||||
dev = dev_handle;
|
||||
location = path;
|
||||
name = dev_name;
|
||||
|
||||
SendCommit();
|
||||
}
|
||||
@@ -31,6 +32,11 @@ std::string AlienwareAW510KController::GetDeviceLocation()
|
||||
return("HID: " + location);
|
||||
}
|
||||
|
||||
std::string AlienwareAW510KController::GetDeviceName()
|
||||
{
|
||||
return(name);
|
||||
}
|
||||
|
||||
std::string AlienwareAW510KController::GetSerialString()
|
||||
{
|
||||
wchar_t serial_string[128];
|
||||
@@ -312,7 +318,7 @@ void AlienwareAW510KController::SetMode
|
||||
SendCommit();
|
||||
}
|
||||
|
||||
void AlienwareAW510KController::UpdateSingleLED
|
||||
void AlienwareAW510KController::DeviceUpdateSingleLED
|
||||
(
|
||||
unsigned char led,
|
||||
unsigned char red,
|
||||
|
||||
+5
-3
@@ -6,7 +6,7 @@
|
||||
| Mohamad Sallal (msallal) 22 May 2021 |
|
||||
| |
|
||||
| This file is part of the OpenRGB project |
|
||||
| SPDX-License-Identifier: GPL-2.0-only |
|
||||
| SPDX-License-Identifier: GPL-2.0-or-later |
|
||||
\*---------------------------------------------------------*/
|
||||
|
||||
#pragma once
|
||||
@@ -77,10 +77,11 @@ struct SelectedKeys
|
||||
class AlienwareAW510KController
|
||||
{
|
||||
public:
|
||||
AlienwareAW510KController(hid_device* dev_handle, const char* path);
|
||||
AlienwareAW510KController(hid_device* dev_handle, const char* path, std::string dev_name);
|
||||
~AlienwareAW510KController();
|
||||
|
||||
std::string GetDeviceLocation();
|
||||
std::string GetDeviceName();
|
||||
std::string GetSerialString();
|
||||
|
||||
void SendInitialize();
|
||||
@@ -131,7 +132,7 @@ public:
|
||||
unsigned char blue2
|
||||
);
|
||||
|
||||
void UpdateSingleLED
|
||||
void DeviceUpdateSingleLED
|
||||
(
|
||||
unsigned char led,
|
||||
unsigned char red,
|
||||
@@ -142,6 +143,7 @@ public:
|
||||
private:
|
||||
hid_device* dev;
|
||||
std::string location;
|
||||
std::string name;
|
||||
|
||||
void SendMode
|
||||
(
|
||||
|
||||
+43
@@ -0,0 +1,43 @@
|
||||
/*---------------------------------------------------------*\
|
||||
| AlienwareAW510KControllerDetect.cpp |
|
||||
| |
|
||||
| Detector for Alienware AW510K Keyboard |
|
||||
| |
|
||||
| This file is part of the OpenRGB project |
|
||||
| SPDX-License-Identifier: GPL-2.0-or-later |
|
||||
\*---------------------------------------------------------*/
|
||||
|
||||
#include <hidapi.h>
|
||||
#include "DetectionManager.h"
|
||||
#include "AlienwareAW510KController.h"
|
||||
#include "RGBController_AlienwareAW510K.h"
|
||||
|
||||
/*---------------------------------------------------------*\
|
||||
| Alienware vendor ID |
|
||||
\*---------------------------------------------------------*/
|
||||
#define ALIENWARE_VID 0x04F2
|
||||
|
||||
/*---------------------------------------------------------*\
|
||||
| Keyboard product IDs |
|
||||
\*---------------------------------------------------------*/
|
||||
#define ALIENWARE_AW510K_PID 0x1830
|
||||
|
||||
DetectedControllers DetectAlienwareAW510KControllers(hid_device_info* info, const std::string& name)
|
||||
{
|
||||
DetectedControllers detected_controllers;
|
||||
hid_device* dev;
|
||||
|
||||
dev = hid_open_path(info->path);
|
||||
|
||||
if(dev)
|
||||
{
|
||||
AlienwareAW510KController* controller = new AlienwareAW510KController(dev, info->path, name);
|
||||
RGBController_AlienwareAW510K* rgb_controller = new RGBController_AlienwareAW510K(controller);
|
||||
|
||||
detected_controllers.push_back(rgb_controller);
|
||||
}
|
||||
|
||||
return(detected_controllers);
|
||||
}
|
||||
|
||||
REGISTER_HID_DETECTOR_IPU("Alienware AW510K", DetectAlienwareAW510KControllers, ALIENWARE_VID, ALIENWARE_AW510K_PID, 0x02, 0xFF00, 0x01);
|
||||
+8
-31
@@ -6,7 +6,7 @@
|
||||
| Mohamad Sallal (msallal) 22 May 2021 |
|
||||
| |
|
||||
| This file is part of the OpenRGB project |
|
||||
| SPDX-License-Identifier: GPL-2.0-only |
|
||||
| SPDX-License-Identifier: GPL-2.0-or-later |
|
||||
\*---------------------------------------------------------*/
|
||||
|
||||
#include <iterator>
|
||||
@@ -175,7 +175,7 @@ RGBController_AlienwareAW510K::RGBController_AlienwareAW510K(AlienwareAW510KCont
|
||||
{
|
||||
controller = controller_ptr;
|
||||
|
||||
name = "Alienware AW510K Keyboard Device";
|
||||
name = controller->GetDeviceName();
|
||||
vendor = "Alienware";
|
||||
type = DEVICE_TYPE_KEYBOARD;
|
||||
description = "Alienware AW510K Keyboard Device";
|
||||
@@ -277,16 +277,7 @@ RGBController_AlienwareAW510K::RGBController_AlienwareAW510K(AlienwareAW510KCont
|
||||
|
||||
RGBController_AlienwareAW510K::~RGBController_AlienwareAW510K()
|
||||
{
|
||||
/*---------------------------------------------------------*\
|
||||
| Delete the matrix map |
|
||||
\*---------------------------------------------------------*/
|
||||
for(unsigned int zone_index = 0; zone_index < zones.size(); zone_index++)
|
||||
{
|
||||
if(zones[zone_index].matrix_map != NULL)
|
||||
{
|
||||
delete zones[zone_index].matrix_map;
|
||||
}
|
||||
}
|
||||
Shutdown();
|
||||
|
||||
delete controller;
|
||||
}
|
||||
@@ -309,14 +300,7 @@ void RGBController_AlienwareAW510K::SetupZones()
|
||||
|
||||
if(zone_types[zone_idx] == ZONE_TYPE_MATRIX)
|
||||
{
|
||||
new_zone.matrix_map = new matrix_map_type;
|
||||
new_zone.matrix_map->height = 7;
|
||||
new_zone.matrix_map->width = 24;
|
||||
new_zone.matrix_map->map = (unsigned int *)&matrix_map;
|
||||
}
|
||||
else
|
||||
{
|
||||
new_zone.matrix_map = NULL;
|
||||
new_zone.matrix_map.Set(7, 24, (unsigned int *)&matrix_map);
|
||||
}
|
||||
|
||||
zones.push_back(new_zone);
|
||||
@@ -335,13 +319,6 @@ void RGBController_AlienwareAW510K::SetupZones()
|
||||
SetupColors();
|
||||
}
|
||||
|
||||
void RGBController_AlienwareAW510K::ResizeZone(int /*zone*/, int /*new_size*/)
|
||||
{
|
||||
/*---------------------------------------------------------*\
|
||||
| This device does not support resizing zones |
|
||||
\*---------------------------------------------------------*/
|
||||
}
|
||||
|
||||
void RGBController_AlienwareAW510K::DeviceUpdateLEDs()
|
||||
{
|
||||
std::vector<SelectedKeys> frame_buf_keys;
|
||||
@@ -395,21 +372,21 @@ void RGBController_AlienwareAW510K::DeviceUpdateLEDs()
|
||||
std::copy(new_colors.begin(), new_colors.end(),current_colors.begin());
|
||||
}
|
||||
|
||||
void RGBController_AlienwareAW510K::UpdateZoneLEDs(int zone)
|
||||
void RGBController_AlienwareAW510K::DeviceUpdateZoneLEDs(int zone)
|
||||
{
|
||||
controller->SetDirect((unsigned char) zone, RGBGetRValue(zones[zone].colors[0]), RGBGetGValue(zones[zone].colors[0]), RGBGetBValue(zones[zone].colors[0]));
|
||||
}
|
||||
|
||||
void RGBController_AlienwareAW510K::UpdateSingleLED(int led)
|
||||
void RGBController_AlienwareAW510K::DeviceUpdateSingleLED(int led)
|
||||
{
|
||||
controller->UpdateSingleLED(leds[led].value, RGBGetRValue(colors[led]), RGBGetGValue(colors[led]), RGBGetBValue(colors[led]));
|
||||
controller->DeviceUpdateSingleLED(leds[led].value, RGBGetRValue(colors[led]), RGBGetGValue(colors[led]), RGBGetBValue(colors[led]));
|
||||
}
|
||||
|
||||
void RGBController_AlienwareAW510K::DeviceUpdateMode()
|
||||
{
|
||||
if(active_mode == 0xFFFF)
|
||||
{
|
||||
UpdateLEDs();
|
||||
UpdateLEDsInternal();
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
+3
-5
@@ -6,7 +6,7 @@
|
||||
| Mohamad Sallal (msallal) 22 May 2021 |
|
||||
| |
|
||||
| This file is part of the OpenRGB project |
|
||||
| SPDX-License-Identifier: GPL-2.0-only |
|
||||
| SPDX-License-Identifier: GPL-2.0-or-later |
|
||||
\*---------------------------------------------------------*/
|
||||
|
||||
#pragma once
|
||||
@@ -22,11 +22,9 @@ public:
|
||||
|
||||
void SetupZones();
|
||||
|
||||
void ResizeZone(int zone, int new_size);
|
||||
|
||||
void DeviceUpdateLEDs();
|
||||
void UpdateZoneLEDs(int zone);
|
||||
void UpdateSingleLED(int led);
|
||||
void DeviceUpdateZoneLEDs(int zone);
|
||||
void DeviceUpdateSingleLED(int led);
|
||||
|
||||
void DeviceUpdateMode();
|
||||
|
||||
|
||||
@@ -1,62 +0,0 @@
|
||||
/*---------------------------------------------------------*\
|
||||
| AlienwareKeyboardControllerDetect.cpp |
|
||||
| |
|
||||
| Detector for Alienware Keyboard |
|
||||
| |
|
||||
| This file is part of the OpenRGB project |
|
||||
| SPDX-License-Identifier: GPL-2.0-only |
|
||||
\*---------------------------------------------------------*/
|
||||
|
||||
#include <hidapi.h>
|
||||
#include "Detector.h"
|
||||
#include "AlienwareAW510KController.h"
|
||||
#include "AlienwareAW410KController.h"
|
||||
#include "RGBController_AlienwareAW510K.h"
|
||||
#include "RGBController_AlienwareAW410K.h"
|
||||
|
||||
/*-----------------------------------------------------*\
|
||||
| Alienware vendor ID |
|
||||
\*-----------------------------------------------------*/
|
||||
#define ALIENWARE_VID 0x04F2
|
||||
|
||||
/*-----------------------------------------------------*\
|
||||
| Keyboard product IDs |
|
||||
\*-----------------------------------------------------*/
|
||||
#define ALIENWARE_AW510K_PID 0x1830
|
||||
#define ALIENWARE_AW410K_PID 0x1968
|
||||
|
||||
/******************************************************************************************\
|
||||
* *
|
||||
* DetectAlienwareKeyboardControllers *
|
||||
* *
|
||||
* Tests the USB address to see if a Alienware RGB Keyboard controller exists there. *
|
||||
* *
|
||||
\******************************************************************************************/
|
||||
|
||||
void DetectAlienwareAW510KControllers(hid_device_info* info, const std::string& name)
|
||||
{
|
||||
hid_device* dev = hid_open_path(info->path);
|
||||
if( dev )
|
||||
{
|
||||
AlienwareAW510KController* controller = new AlienwareAW510KController(dev, info->path);
|
||||
RGBController_AlienwareAW510K* rgb_controller = new RGBController_AlienwareAW510K(controller);
|
||||
rgb_controller->name = name;
|
||||
ResourceManager::get()->RegisterRGBController(rgb_controller);
|
||||
}
|
||||
}
|
||||
|
||||
void DetectAlienwareAW410KControllers(hid_device_info* info, const std::string& name)
|
||||
{
|
||||
hid_device* dev = hid_open_path(info->path);
|
||||
if( dev )
|
||||
{
|
||||
AlienwareAW410KController* controller = new AlienwareAW410KController(dev, info->path);
|
||||
RGBController_AlienwareAW410K* rgb_controller = new RGBController_AlienwareAW410K(controller);
|
||||
rgb_controller->name = name;
|
||||
ResourceManager::get()->RegisterRGBController(rgb_controller);
|
||||
}
|
||||
}/* DetectAlienwareKeyboardControllers() */
|
||||
|
||||
|
||||
REGISTER_HID_DETECTOR_IPU("Alienware AW510K", DetectAlienwareAW510KControllers, ALIENWARE_VID, ALIENWARE_AW510K_PID, 0x02, 0xFF00, 0x01);
|
||||
REGISTER_HID_DETECTOR_IPU("Alienware AW410K", DetectAlienwareAW410KControllers, ALIENWARE_VID, ALIENWARE_AW410K_PID, 0x02, 0xFF00, 0x01);
|
||||
@@ -6,7 +6,7 @@
|
||||
| Ferréol DUBOIS COLI (Fefe_du_973) 23 Jan 2025 |
|
||||
| |
|
||||
| This file is part of the OpenRGB project |
|
||||
| SPDX-License-Identifier: GPL-2.0-only |
|
||||
| SPDX-License-Identifier: GPL-2.0-or-later |
|
||||
\*---------------------------------------------------------*/
|
||||
|
||||
#include <bitset>
|
||||
@@ -127,7 +127,7 @@ std::vector<unsigned char> AlienwareAW3423DWFController::GenerateKey(
|
||||
if(response.size() > 14)
|
||||
{
|
||||
unsigned char idx = response[14] & 0x07;
|
||||
if((idx + 8) < response.size())
|
||||
if((idx + 8) < (unsigned char)response.size())
|
||||
{
|
||||
out_buffer[idx] ^= response[idx + 8];
|
||||
}
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
| Ferréol DUBOIS COLI (Fefe_du_973) 23 Jan 2025 |
|
||||
| |
|
||||
| This file is part of the OpenRGB project |
|
||||
| SPDX-License-Identifier: GPL-2.0-only |
|
||||
| SPDX-License-Identifier: GPL-2.0-or-later |
|
||||
\*---------------------------------------------------------*/
|
||||
|
||||
#pragma once
|
||||
@@ -28,8 +28,6 @@ public:
|
||||
private:
|
||||
hid_device* dev;
|
||||
std::string location;
|
||||
unsigned char endpoint_out = 0x02;
|
||||
unsigned char endpoint_in = 0x81;
|
||||
|
||||
static const std::vector<std::vector<unsigned char>> OEM_KEYS;
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
| Adam Honse (CalcProgrammer1) 08 May 2025 |
|
||||
| |
|
||||
| This file is part of the OpenRGB project |
|
||||
| SPDX-License-Identifier: GPL-2.0-only |
|
||||
| SPDX-License-Identifier: GPL-2.0-or-later |
|
||||
\*---------------------------------------------------------*/
|
||||
|
||||
#include <chrono>
|
||||
@@ -15,10 +15,11 @@
|
||||
|
||||
#include "AlienwareMonitorController.h"
|
||||
|
||||
AlienwareMonitorController::AlienwareMonitorController(hid_device *dev_handle, const char *path)
|
||||
AlienwareMonitorController::AlienwareMonitorController(hid_device *dev_handle, const char *path, std::string dev_name)
|
||||
{
|
||||
dev = dev_handle;
|
||||
location = path;
|
||||
name = dev_name;
|
||||
|
||||
Initialize();
|
||||
}
|
||||
@@ -33,6 +34,11 @@ std::string AlienwareMonitorController::GetLocation()
|
||||
return("HID: " + location);
|
||||
}
|
||||
|
||||
std::string AlienwareMonitorController::GetName()
|
||||
{
|
||||
return(name);
|
||||
}
|
||||
|
||||
std::string AlienwareMonitorController::GetSerialString()
|
||||
{
|
||||
return("");
|
||||
@@ -56,6 +62,7 @@ void AlienwareMonitorController::SendColor(unsigned char led_id, unsigned char r
|
||||
|
||||
memset(packet, 0xFF, sizeof(packet));
|
||||
|
||||
packet[0] = 0x00;
|
||||
packet[1] = 0x92;
|
||||
packet[2] = 0x37;
|
||||
packet[3] = 0x0a;
|
||||
@@ -87,6 +94,7 @@ void AlienwareMonitorController::Initialize()
|
||||
|
||||
memset(packet, 0xFF, sizeof(packet));
|
||||
|
||||
packet[0] = 0x00;
|
||||
packet[1] = 0x95;
|
||||
packet[2] = 0x00;
|
||||
packet[3] = 0x00;
|
||||
@@ -101,6 +109,7 @@ void AlienwareMonitorController::Initialize()
|
||||
|
||||
memset(packet, 0xFF, sizeof(packet));
|
||||
|
||||
packet[0] = 0x00;
|
||||
packet[1] = 0x92;
|
||||
packet[2] = 0x37;
|
||||
packet[3] = 0x08;
|
||||
@@ -123,6 +132,7 @@ void AlienwareMonitorController::Initialize()
|
||||
|
||||
memset(packet, 0x00, sizeof(packet));
|
||||
|
||||
packet[0] = 0x00;
|
||||
packet[1] = 0x93;
|
||||
packet[2] = 0x37;
|
||||
packet[3] = 0x12;
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
| Adam Honse (CalcProgrammer1) 08 May 2025 |
|
||||
| |
|
||||
| This file is part of the OpenRGB project |
|
||||
| SPDX-License-Identifier: GPL-2.0-only |
|
||||
| SPDX-License-Identifier: GPL-2.0-or-later |
|
||||
\*---------------------------------------------------------*/
|
||||
|
||||
#pragma once
|
||||
@@ -18,16 +18,18 @@
|
||||
class AlienwareMonitorController
|
||||
{
|
||||
public:
|
||||
AlienwareMonitorController(hid_device* dev_handle, const char* path);
|
||||
AlienwareMonitorController(hid_device* dev_handle, const char* path, std::string dev_name);
|
||||
~AlienwareMonitorController();
|
||||
|
||||
std::string GetLocation();
|
||||
std::string GetName();
|
||||
std::string GetSerialString();
|
||||
void SendColor(unsigned char led_id, unsigned char r, unsigned char g, unsigned char b);
|
||||
|
||||
private:
|
||||
hid_device* dev;
|
||||
std::string location;
|
||||
std::string name;
|
||||
|
||||
void Initialize();
|
||||
};
|
||||
|
||||
@@ -6,15 +6,15 @@
|
||||
| Adam Honse (CalcProgrammer1) 08 May 2025 |
|
||||
| |
|
||||
| This file is part of the OpenRGB project |
|
||||
| SPDX-License-Identifier: GPL-2.0-only |
|
||||
| SPDX-License-Identifier: GPL-2.0-or-later |
|
||||
\*---------------------------------------------------------*/
|
||||
|
||||
#include "Detector.h"
|
||||
#include <hidapi.h>
|
||||
#include "AlienwareAW3423DWFController.h"
|
||||
#include "AlienwareMonitorController.h"
|
||||
#include "DetectionManager.h"
|
||||
#include "RGBController_AlienwareAW3423DWF.h"
|
||||
#include "RGBController_AlienwareMonitor.h"
|
||||
#include <hidapi.h>
|
||||
|
||||
/*---------------------------------------------------------*\
|
||||
| Alienware Vendor ID |
|
||||
@@ -29,37 +29,40 @@
|
||||
#define ALIENWARE_USAGE_PAGE 0xFFDA
|
||||
#define ALIENWARE_USAGE 0x00DA
|
||||
|
||||
/******************************************************************************************\
|
||||
* *
|
||||
* AlienwareAW3423DWFControllerDetect *
|
||||
* *
|
||||
* Tests the USB address to see if an Alienware AW3423DWF exists there. *
|
||||
* *
|
||||
\******************************************************************************************/
|
||||
|
||||
void DetectAlienwareAW3423DWFControllers(hid_device_info* info, const std::string&)
|
||||
DetectedControllers DetectAlienwareAW3423DWFControllers(hid_device_info* info, const std::string&)
|
||||
{
|
||||
hid_device* dev = hid_open_path(info->path);
|
||||
DetectedControllers detected_controllers;
|
||||
hid_device* dev;
|
||||
|
||||
dev = hid_open_path(info->path);
|
||||
|
||||
if(dev)
|
||||
{
|
||||
AlienwareAW3423DWFController* controller = new AlienwareAW3423DWFController(dev, info->path);
|
||||
AlienwareAW3423DWFController* controller = new AlienwareAW3423DWFController(dev, info->path);
|
||||
RGBController_AlienwareAW3423DWF* rgb_controller = new RGBController_AlienwareAW3423DWF(controller);
|
||||
ResourceManager::get()->RegisterRGBController(rgb_controller);
|
||||
|
||||
detected_controllers.push_back(rgb_controller);
|
||||
}
|
||||
|
||||
return(detected_controllers);
|
||||
}
|
||||
|
||||
void DetectAlienwareMonitorControllers(hid_device_info* info, const std::string& name)
|
||||
DetectedControllers DetectAlienwareMonitorControllers(hid_device_info* info, const std::string& name)
|
||||
{
|
||||
hid_device* dev = hid_open_path(info->path);
|
||||
DetectedControllers detected_controllers;
|
||||
hid_device* dev;
|
||||
|
||||
dev = hid_open_path(info->path);
|
||||
|
||||
if(dev)
|
||||
{
|
||||
AlienwareMonitorController* controller = new AlienwareMonitorController(dev, info->path);
|
||||
AlienwareMonitorController* controller = new AlienwareMonitorController(dev, info->path, name);
|
||||
RGBController_AlienwareMonitor* rgb_controller = new RGBController_AlienwareMonitor(controller);
|
||||
rgb_controller->name = name;
|
||||
|
||||
ResourceManager::get()->RegisterRGBController(rgb_controller);
|
||||
detected_controllers.push_back(rgb_controller);
|
||||
}
|
||||
|
||||
return(detected_controllers);
|
||||
}
|
||||
|
||||
REGISTER_HID_DETECTOR("Alienware AW3423DWF", DetectAlienwareAW3423DWFControllers, ALIENWARE_VID, ALIENWARE_AW3423DWF_PID);
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
| Ferréol DUBOIS COLI (Fefe_du_973) 23 Jan 2025 |
|
||||
| |
|
||||
| This file is part of the OpenRGB project |
|
||||
| SPDX-License-Identifier: GPL-2.0-only |
|
||||
| SPDX-License-Identifier: GPL-2.0-or-later |
|
||||
\*---------------------------------------------------------*/
|
||||
|
||||
#include "RGBController_AlienwareAW3423DWF.h"
|
||||
@@ -46,6 +46,8 @@ RGBController_AlienwareAW3423DWF::RGBController_AlienwareAW3423DWF(AlienwareAW34
|
||||
|
||||
RGBController_AlienwareAW3423DWF::~RGBController_AlienwareAW3423DWF()
|
||||
{
|
||||
Shutdown();
|
||||
|
||||
delete controller;
|
||||
}
|
||||
|
||||
@@ -57,7 +59,6 @@ void RGBController_AlienwareAW3423DWF::SetupZones()
|
||||
Logo.leds_min = 1;
|
||||
Logo.leds_max = 1;
|
||||
Logo.leds_count = 1;
|
||||
Logo.matrix_map = NULL;
|
||||
zones.push_back(Logo);
|
||||
|
||||
led Logo_LED;
|
||||
@@ -71,7 +72,6 @@ void RGBController_AlienwareAW3423DWF::SetupZones()
|
||||
Number.leds_min = 1;
|
||||
Number.leds_max = 1;
|
||||
Number.leds_count = 1;
|
||||
Number.matrix_map = NULL;
|
||||
zones.push_back(Number);
|
||||
|
||||
led Number_LED;
|
||||
@@ -85,7 +85,6 @@ void RGBController_AlienwareAW3423DWF::SetupZones()
|
||||
PowerButton.leds_min = 1;
|
||||
PowerButton.leds_max = 1;
|
||||
PowerButton.leds_count = 1;
|
||||
PowerButton.matrix_map = NULL;
|
||||
zones.push_back(PowerButton);
|
||||
|
||||
led PowerButton_LED;
|
||||
@@ -96,10 +95,6 @@ void RGBController_AlienwareAW3423DWF::SetupZones()
|
||||
SetupColors();
|
||||
}
|
||||
|
||||
void RGBController_AlienwareAW3423DWF::ResizeZone(int /*zone*/, int /*new_size*/)
|
||||
{
|
||||
}
|
||||
|
||||
void RGBController_AlienwareAW3423DWF::DeviceUpdateLEDs()
|
||||
{
|
||||
/*-----------------------------------------------------*\
|
||||
@@ -118,17 +113,17 @@ void RGBController_AlienwareAW3423DWF::DeviceUpdateLEDs()
|
||||
{
|
||||
for(unsigned int led_idx = 0; led_idx < leds.size(); led_idx++)
|
||||
{
|
||||
UpdateSingleLED(led_idx);
|
||||
DeviceUpdateSingleLED(led_idx);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void RGBController_AlienwareAW3423DWF::UpdateZoneLEDs(int /*zone*/)
|
||||
void RGBController_AlienwareAW3423DWF::DeviceUpdateZoneLEDs(int /*zone*/)
|
||||
{
|
||||
DeviceUpdateLEDs();
|
||||
}
|
||||
|
||||
void RGBController_AlienwareAW3423DWF::UpdateSingleLED(int led)
|
||||
void RGBController_AlienwareAW3423DWF::DeviceUpdateSingleLED(int led)
|
||||
{
|
||||
unsigned char red = RGBGetRValue(colors[led]);
|
||||
unsigned char grn = RGBGetGValue(colors[led]);
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
| Ferréol DUBOIS COLI (Fefe_du_973) 23 Jan 2025 |
|
||||
| |
|
||||
| This file is part of the OpenRGB project |
|
||||
| SPDX-License-Identifier: GPL-2.0-only |
|
||||
| SPDX-License-Identifier: GPL-2.0-or-later |
|
||||
\*---------------------------------------------------------*/
|
||||
|
||||
#pragma once
|
||||
@@ -21,11 +21,10 @@ public:
|
||||
~RGBController_AlienwareAW3423DWF();
|
||||
|
||||
void SetupZones();
|
||||
void ResizeZone(int zone, int new_size);
|
||||
|
||||
void DeviceUpdateLEDs();
|
||||
void UpdateZoneLEDs(int zone);
|
||||
void UpdateSingleLED(int led);
|
||||
void DeviceUpdateZoneLEDs(int zone);
|
||||
void DeviceUpdateSingleLED(int led);
|
||||
|
||||
void DeviceUpdateMode();
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
| Adam Honse (CalcProgrammer1) 08 May 2025 |
|
||||
| |
|
||||
| This file is part of the OpenRGB project |
|
||||
| SPDX-License-Identifier: GPL-2.0-only |
|
||||
| SPDX-License-Identifier: GPL-2.0-or-later |
|
||||
\*---------------------------------------------------------*/
|
||||
|
||||
#include "RGBController_AlienwareMonitor.h"
|
||||
@@ -26,7 +26,7 @@ RGBController_AlienwareMonitor::RGBController_AlienwareMonitor(AlienwareMonitorC
|
||||
{
|
||||
controller = controller_ptr;
|
||||
|
||||
name = "Alienware Monitor";
|
||||
name = controller->GetName();
|
||||
description = "Alienware Monitor";
|
||||
vendor = "Alienware";
|
||||
type = DEVICE_TYPE_MONITOR;
|
||||
@@ -46,6 +46,8 @@ RGBController_AlienwareMonitor::RGBController_AlienwareMonitor(AlienwareMonitorC
|
||||
|
||||
RGBController_AlienwareMonitor::~RGBController_AlienwareMonitor()
|
||||
{
|
||||
Shutdown();
|
||||
|
||||
delete controller;
|
||||
}
|
||||
|
||||
@@ -57,7 +59,6 @@ void RGBController_AlienwareMonitor::SetupZones()
|
||||
Logo.leds_min = 1;
|
||||
Logo.leds_max = 1;
|
||||
Logo.leds_count = 1;
|
||||
Logo.matrix_map = NULL;
|
||||
zones.push_back(Logo);
|
||||
|
||||
led Logo_LED;
|
||||
@@ -71,7 +72,6 @@ void RGBController_AlienwareMonitor::SetupZones()
|
||||
Number.leds_min = 1;
|
||||
Number.leds_max = 1;
|
||||
Number.leds_count = 1;
|
||||
Number.matrix_map = NULL;
|
||||
zones.push_back(Number);
|
||||
|
||||
led Number_LED;
|
||||
@@ -85,7 +85,6 @@ void RGBController_AlienwareMonitor::SetupZones()
|
||||
PowerButton.leds_min = 1;
|
||||
PowerButton.leds_max = 1;
|
||||
PowerButton.leds_count = 1;
|
||||
PowerButton.matrix_map = NULL;
|
||||
zones.push_back(PowerButton);
|
||||
|
||||
led PowerButton_LED;
|
||||
@@ -96,11 +95,6 @@ void RGBController_AlienwareMonitor::SetupZones()
|
||||
SetupColors();
|
||||
}
|
||||
|
||||
void RGBController_AlienwareMonitor::ResizeZone(int /*zone*/, int /*new_size*/)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
void RGBController_AlienwareMonitor::DeviceUpdateLEDs()
|
||||
{
|
||||
/*-----------------------------------------------------*\
|
||||
@@ -119,17 +113,17 @@ void RGBController_AlienwareMonitor::DeviceUpdateLEDs()
|
||||
{
|
||||
for(unsigned int led_idx = 0; led_idx < leds.size(); led_idx++)
|
||||
{
|
||||
UpdateSingleLED(led_idx);
|
||||
DeviceUpdateSingleLED(led_idx);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void RGBController_AlienwareMonitor::UpdateZoneLEDs(int /*zone*/)
|
||||
void RGBController_AlienwareMonitor::DeviceUpdateZoneLEDs(int /*zone*/)
|
||||
{
|
||||
DeviceUpdateLEDs();
|
||||
}
|
||||
|
||||
void RGBController_AlienwareMonitor::UpdateSingleLED(int led)
|
||||
void RGBController_AlienwareMonitor::DeviceUpdateSingleLED(int led)
|
||||
{
|
||||
unsigned char red = RGBGetRValue(colors[led]);
|
||||
unsigned char grn = RGBGetGValue(colors[led]);
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
| Adam Honse (CalcProgrammer1) 08 May 2025 |
|
||||
| |
|
||||
| This file is part of the OpenRGB project |
|
||||
| SPDX-License-Identifier: GPL-2.0-only |
|
||||
| SPDX-License-Identifier: GPL-2.0-or-later |
|
||||
\*---------------------------------------------------------*/
|
||||
|
||||
#pragma once
|
||||
@@ -21,11 +21,10 @@ RGBController_AlienwareMonitor(AlienwareMonitorController* controller_ptr);
|
||||
~RGBController_AlienwareMonitor();
|
||||
|
||||
void SetupZones();
|
||||
void ResizeZone(int zone, int new_size);
|
||||
|
||||
void DeviceUpdateLEDs();
|
||||
void UpdateZoneLEDs(int zone);
|
||||
void UpdateSingleLED(int led);
|
||||
void DeviceUpdateZoneLEDs(int zone);
|
||||
void DeviceUpdateSingleLED(int led);
|
||||
|
||||
void DeviceUpdateMode();
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
| Sergey Gavrilov (DrZlo13) 06 Jun 2021 |
|
||||
| |
|
||||
| This file is part of the OpenRGB project |
|
||||
| SPDX-License-Identifier: GPL-2.0-only |
|
||||
| SPDX-License-Identifier: GPL-2.0-or-later |
|
||||
\*---------------------------------------------------------*/
|
||||
|
||||
#include "AnnePro2Controller.h"
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
| Sergey Gavrilov (DrZlo13) 06 Jun 2021 |
|
||||
| |
|
||||
| This file is part of the OpenRGB project |
|
||||
| SPDX-License-Identifier: GPL-2.0-only |
|
||||
| SPDX-License-Identifier: GPL-2.0-or-later |
|
||||
\*---------------------------------------------------------*/
|
||||
|
||||
#pragma once
|
||||
|
||||
@@ -6,13 +6,13 @@
|
||||
| Sergey Gavrilov (DrZlo13) 06 Jun 2021 |
|
||||
| |
|
||||
| This file is part of the OpenRGB project |
|
||||
| SPDX-License-Identifier: GPL-2.0-only |
|
||||
| SPDX-License-Identifier: GPL-2.0-or-later |
|
||||
\*---------------------------------------------------------*/
|
||||
|
||||
#include "Detector.h"
|
||||
#include "AnnePro2Controller.h"
|
||||
#include "RGBController_AnnePro2.h"
|
||||
#include <hidapi.h>
|
||||
#include "AnnePro2Controller.h"
|
||||
#include "DetectionManager.h"
|
||||
#include "RGBController_AnnePro2.h"
|
||||
|
||||
/*---------------------------------------------------------*\
|
||||
| Anne Pro 2 vendor IDs |
|
||||
@@ -29,24 +29,22 @@
|
||||
#define ANNE_PRO_2_PID_4 0xA293
|
||||
#define ANNE_PRO_2_PID_5 0xA297
|
||||
|
||||
/******************************************************************************************\
|
||||
* *
|
||||
* DetectAnnePro2Controllers *
|
||||
* *
|
||||
* Tests the USB address to see if an Obins Lab AnnePro2 keyboard exists there. *
|
||||
* *
|
||||
\******************************************************************************************/
|
||||
|
||||
void DetectAnnePro2Controllers(hid_device_info* info, const std::string&)
|
||||
DetectedControllers DetectAnnePro2Controllers(hid_device_info* info, const std::string&)
|
||||
{
|
||||
hid_device* dev = hid_open_path(info->path);
|
||||
if( dev )
|
||||
DetectedControllers detected_controllers;
|
||||
hid_device* dev;
|
||||
|
||||
dev = hid_open_path(info->path);
|
||||
|
||||
if(dev)
|
||||
{
|
||||
AnnePro2Controller* controller = new AnnePro2Controller(dev, info->path);
|
||||
RGBController_AnnePro2* rgb_controller = new RGBController_AnnePro2(controller);
|
||||
// Constructor sets the name
|
||||
ResourceManager::get()->RegisterRGBController(rgb_controller);
|
||||
|
||||
detected_controllers.push_back(rgb_controller);
|
||||
}
|
||||
|
||||
return(detected_controllers);
|
||||
}
|
||||
|
||||
REGISTER_HID_DETECTOR_I("Anne Pro 2", DetectAnnePro2Controllers, ANNE_PRO_2_VID_1, ANNE_PRO_2_PID_1, 1);
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
| Sergey Gavrilov (DrZlo13) 06 Jun 2021 |
|
||||
| |
|
||||
| This file is part of the OpenRGB project |
|
||||
| SPDX-License-Identifier: GPL-2.0-only |
|
||||
| SPDX-License-Identifier: GPL-2.0-or-later |
|
||||
\*---------------------------------------------------------*/
|
||||
|
||||
#include "RGBControllerKeyNames.h"
|
||||
@@ -144,6 +144,8 @@ RGBController_AnnePro2::RGBController_AnnePro2(AnnePro2Controller* controller_pt
|
||||
|
||||
RGBController_AnnePro2::~RGBController_AnnePro2()
|
||||
{
|
||||
Shutdown();
|
||||
|
||||
delete controller;
|
||||
}
|
||||
|
||||
@@ -164,14 +166,7 @@ void RGBController_AnnePro2::SetupZones()
|
||||
|
||||
if(zone_types[zone_idx] == ZONE_TYPE_MATRIX)
|
||||
{
|
||||
new_zone.matrix_map = new matrix_map_type;
|
||||
new_zone.matrix_map->height = 5;
|
||||
new_zone.matrix_map->width = 14;
|
||||
new_zone.matrix_map->map = (unsigned int *)&matrix_map;
|
||||
}
|
||||
else
|
||||
{
|
||||
new_zone.matrix_map = NULL;
|
||||
new_zone.matrix_map.Set(5, 14, (unsigned int *)&matrix_map);
|
||||
}
|
||||
|
||||
zones.push_back(new_zone);
|
||||
@@ -190,13 +185,6 @@ void RGBController_AnnePro2::SetupZones()
|
||||
SetupColors();
|
||||
}
|
||||
|
||||
void RGBController_AnnePro2::ResizeZone(int /*zone*/, int /*new_size*/)
|
||||
{
|
||||
/*---------------------------------------------------------*\
|
||||
| This device does not support resizing zones |
|
||||
\*---------------------------------------------------------*/
|
||||
}
|
||||
|
||||
void RGBController_AnnePro2::DeviceUpdateLEDs()
|
||||
{
|
||||
const unsigned char frame_buf_length = LED_REAL_COUNT * 3;
|
||||
@@ -228,12 +216,12 @@ void RGBController_AnnePro2::DeviceUpdateLEDs()
|
||||
controller->SendDirect(frame_buf_length, frame_buf);
|
||||
}
|
||||
|
||||
void RGBController_AnnePro2::UpdateZoneLEDs(int /*zone*/)
|
||||
void RGBController_AnnePro2::DeviceUpdateZoneLEDs(int /*zone*/)
|
||||
{
|
||||
DeviceUpdateLEDs();
|
||||
}
|
||||
|
||||
void RGBController_AnnePro2::UpdateSingleLED(int /*led*/)
|
||||
void RGBController_AnnePro2::DeviceUpdateSingleLED(int /*led*/)
|
||||
{
|
||||
DeviceUpdateLEDs();
|
||||
}
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user