Compare commits
576
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
bfaef77719 | ||
|
|
02d0e16a72 | ||
|
|
6ebf3573af | ||
|
|
5aef451e81 | ||
|
|
1880961afa | ||
|
|
fb5a723193 | ||
|
|
88002a4abf | ||
|
|
289dbc675a | ||
|
|
bcfaa7e8a7 | ||
|
|
bf62ead713 | ||
|
|
8a7cda7495 | ||
|
|
84cf974d70 | ||
|
|
afc54314b5 | ||
|
|
bd8db75106 | ||
|
|
9da692b12f | ||
|
|
4ee39b0dc8 | ||
|
|
286514b509 | ||
|
|
c7140baa33 | ||
|
|
2a9889b194 | ||
|
|
2afbd64c8e | ||
|
|
8be6aba43a | ||
|
|
565f1dad74 | ||
|
|
67a81f219d | ||
|
|
ccd103a29f | ||
|
|
c5d088b69d | ||
|
|
6362054368 | ||
|
|
2dab17f5dc | ||
|
|
c545305825 | ||
|
|
578c81784b | ||
|
|
1cd9b63c3e | ||
|
|
7b1817a0b8 | ||
|
|
fb0e4f3ad9 | ||
|
|
09a5b414b6 | ||
|
|
e5dc869c9b | ||
|
|
2687ff57aa | ||
|
|
52138b4cbd | ||
|
|
b3a2cccfed | ||
|
|
15a8abf2c9 | ||
|
|
d16b474aa8 | ||
|
|
760758230a | ||
|
|
358fc7b007 | ||
|
|
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 |
@@ -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/
|
||||
|
||||
+230
-200
@@ -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,9 +70,9 @@ before_script:
|
||||
rules:
|
||||
- !reference [.upstream_rules, rules]
|
||||
|
||||
#-----------------------------------------------------------------------#
|
||||
# OpenRGB Common Appimage Build Steps #
|
||||
#-----------------------------------------------------------------------#
|
||||
#-----------------------------------------------------------#
|
||||
# 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:
|
||||
@@ -88,106 +94,106 @@ before_script:
|
||||
rules:
|
||||
- !reference [.upstream_rules, rules]
|
||||
|
||||
#-----------------------------------------------------------------------#
|
||||
# Linux (AppImage) i386 Build Target #
|
||||
#-----------------------------------------------------------------------#
|
||||
#-----------------------------------------------------------#
|
||||
# Linux (AppImage) i386 Build Target #
|
||||
#-----------------------------------------------------------#
|
||||
"Linux i386 AppImage":
|
||||
variables:
|
||||
TGT_ARCH: "i386"
|
||||
TGT_QT: ""
|
||||
TGT_QT: "qt6"
|
||||
TGT_NAME: "${TGT_ARCH}"
|
||||
TGT_PATH: "${TGT_ARCH}"
|
||||
<<: *appimage_script_steps
|
||||
|
||||
#-----------------------------------------------------------------------#
|
||||
# Linux (AppImage) Qt6 i386 Build Target #
|
||||
#-----------------------------------------------------------------------#
|
||||
"Linux i386 AppImage Qt6":
|
||||
#-----------------------------------------------------------#
|
||||
# Linux (AppImage) Qt5 i386 Build Target #
|
||||
#-----------------------------------------------------------#
|
||||
"Linux i386 AppImage Qt5":
|
||||
variables:
|
||||
TGT_ARCH: "i386"
|
||||
TGT_QT: "qt6"
|
||||
TGT_NAME: "${TGT_ARCH}_${TGT_QT^}"
|
||||
TGT_QT: ""
|
||||
TGT_NAME: "${TGT_ARCH}_qt5"
|
||||
TGT_PATH: "${TGT_ARCH}"
|
||||
<<: *appimage_script_steps
|
||||
|
||||
#-----------------------------------------------------------------------#
|
||||
# Linux (AppImage) amd64 Build Target #
|
||||
#-----------------------------------------------------------------------#
|
||||
#-----------------------------------------------------------#
|
||||
# Linux (AppImage) amd64 Build Target #
|
||||
#-----------------------------------------------------------#
|
||||
"Linux amd64 AppImage":
|
||||
variables:
|
||||
TGT_ARCH: "amd64"
|
||||
TGT_QT: ""
|
||||
TGT_QT: "qt6"
|
||||
TGT_NAME: "${TGT_ARCH}"
|
||||
TGT_PATH: "x86_64"
|
||||
<<: *appimage_script_steps
|
||||
rules:
|
||||
- !reference [.fork_local_runner_rules, rules]
|
||||
- !reference [.upstream_rules, rules]
|
||||
|
||||
"Linux amd64 AppImage (gitlab.com runner)":
|
||||
"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":
|
||||
#-----------------------------------------------------------#
|
||||
# Linux (AppImage) Qt5 amd64 Build Target #
|
||||
#-----------------------------------------------------------#
|
||||
"Linux amd64 AppImage Qt5":
|
||||
variables:
|
||||
TGT_ARCH: "amd64"
|
||||
TGT_QT: "qt6"
|
||||
TGT_NAME: "${TGT_ARCH}_${TGT_QT^}"
|
||||
TGT_QT: ""
|
||||
TGT_NAME: "${TGT_ARCH}_qt5"
|
||||
TGT_PATH: "x86_64"
|
||||
<<: *appimage_script_steps
|
||||
|
||||
#-----------------------------------------------------------------------#
|
||||
# Linux (AppImage) armhf Build Target #
|
||||
#-----------------------------------------------------------------------#
|
||||
#-----------------------------------------------------------#
|
||||
# Linux (AppImage) armhf Build Target #
|
||||
#-----------------------------------------------------------#
|
||||
"Linux armhf AppImage":
|
||||
variables:
|
||||
TGT_ARCH: "armhf"
|
||||
TGT_QT: ""
|
||||
TGT_QT: "qt6"
|
||||
TGT_NAME: "${TGT_ARCH}"
|
||||
TGT_PATH: "${TGT_ARCH}"
|
||||
<<: *appimage_script_steps
|
||||
|
||||
#-----------------------------------------------------------------------#
|
||||
# Linux (AppImage) Qt6 armhf Build Target #
|
||||
#-----------------------------------------------------------------------#
|
||||
"Linux armhf AppImage Qt6":
|
||||
#-----------------------------------------------------------#
|
||||
# Linux (AppImage) Qt5 armhf Build Target #
|
||||
#-----------------------------------------------------------#
|
||||
"Linux armhf AppImage Qt5":
|
||||
variables:
|
||||
TGT_ARCH: "armhf"
|
||||
TGT_QT: "qt6"
|
||||
TGT_NAME: "${TGT_ARCH}_${TGT_QT^}"
|
||||
TGT_QT: ""
|
||||
TGT_NAME: "${TGT_ARCH}_qt5"
|
||||
TGT_PATH: "${TGT_ARCH}"
|
||||
<<: *appimage_script_steps
|
||||
|
||||
#-----------------------------------------------------------------------#
|
||||
# Linux (AppImage) arm64 Build Target #
|
||||
#-----------------------------------------------------------------------#
|
||||
#-----------------------------------------------------------#
|
||||
# Linux (AppImage) arm64 Build Target #
|
||||
#-----------------------------------------------------------#
|
||||
"Linux arm64 AppImage":
|
||||
variables:
|
||||
TGT_ARCH: "arm64"
|
||||
TGT_QT: ""
|
||||
TGT_QT: "qt6"
|
||||
TGT_NAME: "${TGT_ARCH}"
|
||||
TGT_PATH: "${TGT_ARCH}"
|
||||
<<: *appimage_script_steps
|
||||
|
||||
#-----------------------------------------------------------------------#
|
||||
# Linux (AppImage) Qt6 arm64 Build Target #
|
||||
#-----------------------------------------------------------------------#
|
||||
"Linux arm64 AppImage Qt6":
|
||||
#-----------------------------------------------------------#
|
||||
# Linux (AppImage) Qt5 arm64 Build Target #
|
||||
#-----------------------------------------------------------#
|
||||
"Linux arm64 AppImage Qt5":
|
||||
variables:
|
||||
TGT_ARCH: "arm64"
|
||||
TGT_QT: "qt6"
|
||||
TGT_NAME: "${TGT_ARCH}_${TGT_QT^}"
|
||||
TGT_QT: ""
|
||||
TGT_NAME: "${TGT_ARCH}_qt5"
|
||||
TGT_PATH: "${TGT_ARCH}"
|
||||
<<: *appimage_script_steps
|
||||
|
||||
#-----------------------------------------------------------------------#
|
||||
# OpenRGB Common Debian Build 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
|
||||
@@ -211,86 +217,89 @@ before_script:
|
||||
rules:
|
||||
- !reference [.upstream_rules, rules]
|
||||
|
||||
#-----------------------------------------------------------------------#
|
||||
# Linux (.deb) Debian Bookworm i386 Build Target #
|
||||
#-----------------------------------------------------------------------#
|
||||
#-----------------------------------------------------------#
|
||||
# Linux (.deb) Debian Bookworm i386 Build Target #
|
||||
#-----------------------------------------------------------#
|
||||
"Linux i386 .deb (Debian Bookworm)":
|
||||
variables:
|
||||
TGT_ARCH: "i386"
|
||||
TGT_DEB: "bookworm"
|
||||
<<: *debian_script_steps
|
||||
|
||||
#-----------------------------------------------------------------------#
|
||||
# Linux (.deb) Debian Trixie i386 Build Target #
|
||||
#-----------------------------------------------------------------------#
|
||||
#-----------------------------------------------------------#
|
||||
# Linux (.deb) Debian Trixie i386 Build Target #
|
||||
#-----------------------------------------------------------#
|
||||
"Linux i386 .deb (Debian Trixie)":
|
||||
variables:
|
||||
TGT_ARCH: "i386"
|
||||
TGT_DEB: "trixie"
|
||||
<<: *debian_script_steps
|
||||
|
||||
#-----------------------------------------------------------------------#
|
||||
# Linux (.deb) Debian Bookworm amd64 Build Target #
|
||||
#-----------------------------------------------------------------------#
|
||||
#-----------------------------------------------------------#
|
||||
# Linux (.deb) Debian Bookworm amd64 Build Target #
|
||||
#-----------------------------------------------------------#
|
||||
"Linux amd64 .deb (Debian Bookworm)":
|
||||
variables:
|
||||
TGT_ARCH: "amd64"
|
||||
TGT_DEB: "bookworm"
|
||||
<<: *debian_script_steps
|
||||
|
||||
#-----------------------------------------------------------------------#
|
||||
# Linux (.deb) Debian Trixie amd64 Build Target #
|
||||
#-----------------------------------------------------------------------#
|
||||
#-----------------------------------------------------------#
|
||||
# Linux (.deb) Debian Trixie amd64 Build Target #
|
||||
#-----------------------------------------------------------#
|
||||
"Linux amd64 .deb (Debian Trixie)":
|
||||
variables:
|
||||
TGT_ARCH: "amd64"
|
||||
TGT_DEB: "trixie"
|
||||
<<: *debian_script_steps
|
||||
|
||||
#-----------------------------------------------------------------------#
|
||||
# Linux (.deb) Debian Bookworm armhf Build Target #
|
||||
#-----------------------------------------------------------------------#
|
||||
#-----------------------------------------------------------#
|
||||
# Linux (.deb) Debian Bookworm armhf Build Target #
|
||||
#-----------------------------------------------------------#
|
||||
"Linux armhf .deb (Debian Bookworm)":
|
||||
variables:
|
||||
TGT_ARCH: "armhf"
|
||||
TGT_DEB: "bookworm"
|
||||
<<: *debian_script_steps
|
||||
|
||||
#-----------------------------------------------------------------------#
|
||||
# Linux (.deb) Debian Trixie armhf Build Target #
|
||||
#-----------------------------------------------------------------------#
|
||||
#-----------------------------------------------------------#
|
||||
# Linux (.deb) Debian Trixie armhf Build Target #
|
||||
#-----------------------------------------------------------#
|
||||
"Linux armhf .deb (Debian Trixie)":
|
||||
variables:
|
||||
TGT_ARCH: "armhf"
|
||||
TGT_DEB: "trixie"
|
||||
<<: *debian_script_steps
|
||||
|
||||
#-----------------------------------------------------------------------#
|
||||
# Linux (.deb) Debian Bookworm arm64 Build Target #
|
||||
#-----------------------------------------------------------------------#
|
||||
#-----------------------------------------------------------#
|
||||
# Linux (.deb) Debian Bookworm arm64 Build Target #
|
||||
#-----------------------------------------------------------#
|
||||
"Linux arm64 .deb (Debian Bookworm)":
|
||||
variables:
|
||||
TGT_ARCH: "arm64"
|
||||
TGT_DEB: "bookworm"
|
||||
<<: *debian_script_steps
|
||||
|
||||
#-----------------------------------------------------------------------#
|
||||
# Linux (.deb) Debian Trixie arm64 Build Target #
|
||||
#-----------------------------------------------------------------------#
|
||||
#-----------------------------------------------------------#
|
||||
# Linux (.deb) Debian Trixie arm64 Build Target #
|
||||
#-----------------------------------------------------------#
|
||||
"Linux arm64 .deb (Debian Trixie)":
|
||||
variables:
|
||||
TGT_ARCH: "arm64"
|
||||
TGT_DEB: "trixie"
|
||||
<<: *debian_script_steps
|
||||
|
||||
#-----------------------------------------------------------------------#
|
||||
# Linux (.rpm, F40) 64-bit Build Target #
|
||||
#-----------------------------------------------------------------------#
|
||||
"Linux 64 F40 rpm":
|
||||
image: fedora:40
|
||||
#-----------------------------------------------------------#
|
||||
# Linux (.rpm, F43) 64-bit Build Target #
|
||||
#-----------------------------------------------------------#
|
||||
"Linux 64 F43 rpm":
|
||||
image: fedora:43
|
||||
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
|
||||
@@ -311,95 +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:
|
||||
- Set-MpPreference -DisableRealtimeMonitoring $true
|
||||
- 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:
|
||||
@@ -411,18 +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:
|
||||
- Set-MpPreference -DisableRealtimeMonitoring $true
|
||||
- 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:
|
||||
@@ -432,16 +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:
|
||||
- Set-MpPreference -DisableRealtimeMonitoring $true
|
||||
- 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:
|
||||
@@ -454,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
|
||||
@@ -468,22 +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:
|
||||
- Set-MpPreference -DisableRealtimeMonitoring $true
|
||||
- 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:
|
||||
@@ -495,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}"
|
||||
@@ -532,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}"
|
||||
@@ -557,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/
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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>
|
||||
@@ -119,6 +119,21 @@ bool AutoStart::IsAutoStartEnabled()
|
||||
|
||||
std::string AutoStart::GetExePath()
|
||||
{
|
||||
/*-----------------------------------------------------*\
|
||||
| When running from an AppImage, the AppImage runtime |
|
||||
| sets the APPIMAGE environment variable to the path of |
|
||||
| the AppImage file itself. /proc/self/exe would |
|
||||
| instead point at the extracted binary inside the |
|
||||
| temporary squashfs mount, which disappears once the |
|
||||
| AppImage is closed, so prefer APPIMAGE when it is set |
|
||||
\*-----------------------------------------------------*/
|
||||
const char* appimage_path = getenv("APPIMAGE");
|
||||
|
||||
if(appimage_path != NULL)
|
||||
{
|
||||
return(std::string(appimage_path));
|
||||
}
|
||||
|
||||
/*-----------------------------------------------------*\
|
||||
| Create the OpenRGB executable path |
|
||||
\*-----------------------------------------------------*/
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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
|
||||
|
||||
+14
-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,17 +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,61 +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, name);
|
||||
RGBController_BloodyMouse* rgb_controller = new RGBController_BloodyMouse(controller);
|
||||
|
||||
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, name);
|
||||
RGBController_BloodyB820R* rgb_controller = new RGBController_BloodyB820R(controller);
|
||||
|
||||
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"
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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"
|
||||
@@ -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,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 "BloodyMouseController.h"
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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"
|
||||
@@ -89,6 +89,8 @@ RGBController_BloodyMouse::RGBController_BloodyMouse(BloodyMouseController *cont
|
||||
|
||||
RGBController_BloodyMouse::~RGBController_BloodyMouse()
|
||||
{
|
||||
Shutdown();
|
||||
|
||||
delete controller;
|
||||
}
|
||||
|
||||
@@ -134,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++)
|
||||
@@ -160,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;
|
||||
@@ -179,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();
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
| Driver for Philips amBX Gaming lights |
|
||||
| |
|
||||
| This file is part of the OpenRGB project |
|
||||
| SPDX-License-Identifier: GPL-2.0-only |
|
||||
| SPDX-License-Identifier: GPL-2.0-or-later |
|
||||
\*---------------------------------------------------------*/
|
||||
|
||||
#include "AMBXController.h"
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
| Driver for Philips amBX Gaming lights |
|
||||
| |
|
||||
| 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
|
||||
@@ -41,7 +41,7 @@ public:
|
||||
|
||||
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);
|
||||
@@ -52,6 +52,6 @@ private:
|
||||
std::string location;
|
||||
std::string serial;
|
||||
bool initialized;
|
||||
|
||||
|
||||
void SendPacket(unsigned char* packet, unsigned int size);
|
||||
};
|
||||
|
||||
@@ -4,11 +4,11 @@
|
||||
| Detector for Philips amBX Gaming lights |
|
||||
| |
|
||||
| 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 "AMBXController.h"
|
||||
#include "DetectionManager.h"
|
||||
#include "RGBController.h"
|
||||
#include "RGBController_AMBX.h"
|
||||
|
||||
@@ -18,66 +18,60 @@
|
||||
#include <libusb.h>
|
||||
#endif
|
||||
|
||||
/******************************************************************************************\
|
||||
* *
|
||||
* DetectAMBXControllers *
|
||||
* *
|
||||
* Detect Philips amBX Gaming devices *
|
||||
* *
|
||||
\******************************************************************************************/
|
||||
|
||||
void DetectAMBXControllers()
|
||||
DetectedControllers DetectAMBXControllers()
|
||||
{
|
||||
libusb_context* ctx = NULL;
|
||||
DetectedControllers detected_controllers;
|
||||
libusb_context* ctx = NULL;
|
||||
|
||||
if(libusb_init(&ctx) < 0)
|
||||
if(libusb_init(&ctx) >= 0)
|
||||
{
|
||||
return;
|
||||
}
|
||||
libusb_device** devs;
|
||||
ssize_t num_devs = libusb_get_device_list(ctx, &devs);
|
||||
|
||||
libusb_device** devs;
|
||||
ssize_t num_devs = libusb_get_device_list(ctx, &devs);
|
||||
|
||||
if(num_devs <= 0)
|
||||
{
|
||||
libusb_exit(ctx);
|
||||
return;
|
||||
}
|
||||
|
||||
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)
|
||||
if(num_devs > 0)
|
||||
{
|
||||
continue;
|
||||
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);
|
||||
}
|
||||
|
||||
if(desc.idVendor == AMBX_VID && desc.idProduct == AMBX_PID)
|
||||
else
|
||||
{
|
||||
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);
|
||||
ResourceManager::get()->RegisterRGBController(rgb_controller);
|
||||
}
|
||||
else
|
||||
{
|
||||
delete controller;
|
||||
}
|
||||
libusb_exit(ctx);
|
||||
}
|
||||
}
|
||||
|
||||
libusb_free_device_list(devs, 1);
|
||||
libusb_exit(ctx);
|
||||
return(detected_controllers);
|
||||
}
|
||||
|
||||
REGISTER_DETECTOR("Philips amBX", DetectAMBXControllers);
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
| RGB Controller for Philips amBX Gaming lights |
|
||||
| |
|
||||
| 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_AMBX.h"
|
||||
@@ -44,6 +44,8 @@ RGBController_AMBX::RGBController_AMBX(AMBXController* controller_ptr)
|
||||
|
||||
RGBController_AMBX::~RGBController_AMBX()
|
||||
{
|
||||
Shutdown();
|
||||
|
||||
delete controller;
|
||||
}
|
||||
|
||||
@@ -56,7 +58,6 @@ void RGBController_AMBX::SetupZones()
|
||||
side_lights_zone.leds_min = 2;
|
||||
side_lights_zone.leds_max = 2;
|
||||
side_lights_zone.leds_count = 2;
|
||||
side_lights_zone.matrix_map = NULL;
|
||||
zones.push_back(side_lights_zone);
|
||||
|
||||
zone wallwasher_zone;
|
||||
@@ -65,7 +66,6 @@ void RGBController_AMBX::SetupZones()
|
||||
wallwasher_zone.leds_min = 3;
|
||||
wallwasher_zone.leds_max = 3;
|
||||
wallwasher_zone.leds_count = 3;
|
||||
wallwasher_zone.matrix_map = NULL;
|
||||
zones.push_back(wallwasher_zone);
|
||||
|
||||
// Set up LEDs
|
||||
@@ -97,11 +97,6 @@ void RGBController_AMBX::SetupZones()
|
||||
SetupColors();
|
||||
}
|
||||
|
||||
void RGBController_AMBX::ResizeZone(int /*zone*/, int /*new_size*/)
|
||||
{
|
||||
// This device does not support resizing zones
|
||||
}
|
||||
|
||||
void RGBController_AMBX::DeviceUpdateLEDs()
|
||||
{
|
||||
if(!controller->IsInitialized())
|
||||
@@ -121,7 +116,7 @@ void RGBController_AMBX::DeviceUpdateLEDs()
|
||||
controller->SetLEDColors(led_values, led_colors, static_cast<unsigned int>(leds.size()));
|
||||
}
|
||||
|
||||
void RGBController_AMBX::UpdateZoneLEDs(int zone)
|
||||
void RGBController_AMBX::DeviceUpdateZoneLEDs(int zone)
|
||||
{
|
||||
if(!controller->IsInitialized())
|
||||
{
|
||||
@@ -156,7 +151,7 @@ void RGBController_AMBX::UpdateZoneLEDs(int zone)
|
||||
controller->SetLEDColors(led_values, led_colors, zone_size);
|
||||
}
|
||||
|
||||
void RGBController_AMBX::UpdateSingleLED(int led)
|
||||
void RGBController_AMBX::DeviceUpdateSingleLED(int led)
|
||||
{
|
||||
if(!controller->IsInitialized())
|
||||
{
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
| RGB Controller for Philips amBX Gaming lights |
|
||||
| |
|
||||
| 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,11 +19,10 @@ public:
|
||||
~RGBController_AMBX();
|
||||
|
||||
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) 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,25 +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);
|
||||
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);
|
||||
|
||||
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>
|
||||
@@ -31,7 +31,7 @@ AOCKeyboardController::~AOCKeyboardController()
|
||||
|
||||
std::string AOCKeyboardController::GetDeviceLocation()
|
||||
{
|
||||
return("HID " + location);
|
||||
return("HID: " + location);
|
||||
}
|
||||
|
||||
std::string AOCKeyboardController::GetDeviceName()
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -6,39 +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, name);
|
||||
RGBController_AOCKeyboard* rgb_controller = new RGBController_AOCKeyboard(controller);
|
||||
|
||||
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"
|
||||
@@ -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,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 <cstring>
|
||||
@@ -27,7 +27,7 @@ AOCMouseController::~AOCMouseController()
|
||||
|
||||
std::string AOCMouseController::GetDeviceLocation()
|
||||
{
|
||||
return("HID " + location);
|
||||
return("HID: " + location);
|
||||
}
|
||||
|
||||
std::string AOCMouseController::GetDeviceName()
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -6,38 +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, name);
|
||||
RGBController_AOCMouse* rgb_controller = new RGBController_AOCMouse(controller);
|
||||
|
||||
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"
|
||||
@@ -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,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 <cstring>
|
||||
@@ -27,7 +27,7 @@ AOCMousematController::~AOCMousematController()
|
||||
|
||||
std::string AOCMousematController::GetDeviceLocation()
|
||||
{
|
||||
return("HID " + location);
|
||||
return("HID: " + location);
|
||||
}
|
||||
|
||||
std::string AOCMousematController::GetDeviceName()
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -6,38 +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, name);
|
||||
RGBController_AOCMousemat* rgb_controller = new RGBController_AOCMousemat(controller);
|
||||
|
||||
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"
|
||||
@@ -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();
|
||||
|
||||
|
||||
+199
@@ -0,0 +1,199 @@
|
||||
/*---------------------------------------------------------*\
|
||||
| ASRockGPUSMBusController.cpp |
|
||||
| |
|
||||
| Driver for ASRock GPU RGB controllers |
|
||||
| |
|
||||
| Based on SignalRGB ASRock GPU.js plugin |
|
||||
| |
|
||||
| This file is part of the OpenRGB project |
|
||||
| SPDX-License-Identifier: GPL-2.0-or-later |
|
||||
\*---------------------------------------------------------*/
|
||||
|
||||
#include "ASRockGPUSMBusController.h"
|
||||
#include "LogManager.h"
|
||||
#include <chrono>
|
||||
#include <cstdio>
|
||||
#include <cstring>
|
||||
#include <thread>
|
||||
|
||||
using namespace std::chrono_literals;
|
||||
|
||||
ASRockGPUSMBusController::ASRockGPUSMBusController(i2c_smbus_interface* bus, asrock_gpu_dev_id dev, std::string name)
|
||||
{
|
||||
this->bus = bus;
|
||||
this->dev = dev;
|
||||
this->device_name = name;
|
||||
this->num_channels = 0;
|
||||
|
||||
memset(enabled_channels, 0, sizeof(enabled_channels));
|
||||
memset(led_counts, 0, sizeof(led_counts));
|
||||
}
|
||||
|
||||
ASRockGPUSMBusController::~ASRockGPUSMBusController()
|
||||
{
|
||||
}
|
||||
|
||||
std::string ASRockGPUSMBusController::GetDeviceLocation()
|
||||
{
|
||||
std::string return_string(bus->info.device_name);
|
||||
char addr[5];
|
||||
snprintf(addr, 5, "0x%02X", dev);
|
||||
return_string.append(", address ");
|
||||
return_string.append(addr);
|
||||
return("I2C: " + return_string);
|
||||
}
|
||||
|
||||
std::string ASRockGPUSMBusController::GetDeviceName()
|
||||
{
|
||||
return(device_name);
|
||||
}
|
||||
|
||||
bool ASRockGPUSMBusController::WriteBlock(uint8_t command, uint8_t subcommand, const uint8_t* data, uint8_t len)
|
||||
{
|
||||
/*-----------------------------------------------------*\
|
||||
| SignalRGB packet format |
|
||||
| [command, 0, subcommand, data...] |
|
||||
| Uses pure I2C rather than SMBus |
|
||||
\*-----------------------------------------------------*/
|
||||
uint8_t packet[12];
|
||||
memset(packet, 0, sizeof(packet));
|
||||
|
||||
packet[0] = command;
|
||||
packet[1] = 0x00;
|
||||
packet[2] = subcommand;
|
||||
|
||||
if(data != nullptr && len > 0)
|
||||
{
|
||||
uint8_t copy_len = (len > 9) ? 9 : len;
|
||||
memcpy(&packet[3], data, copy_len);
|
||||
}
|
||||
|
||||
int size = 12;
|
||||
int result = bus->i2c_write_block(dev, size, packet);
|
||||
|
||||
if(result < 0)
|
||||
{
|
||||
LOG_DEBUG("[ASRock GPU] Write block failed: %d", result);
|
||||
return(false);
|
||||
}
|
||||
|
||||
return(true);
|
||||
}
|
||||
|
||||
bool ASRockGPUSMBusController::ReadBlock(uint8_t* response, uint8_t len)
|
||||
{
|
||||
memset(response, 0, len);
|
||||
int size = len;
|
||||
int result = bus->i2c_read_block(dev, &size, response);
|
||||
|
||||
if(result < 0)
|
||||
{
|
||||
LOG_DEBUG("[ASRock GPU] Read block failed: %d", result);
|
||||
return(false);
|
||||
}
|
||||
|
||||
return(true);
|
||||
}
|
||||
|
||||
bool ASRockGPUSMBusController::DetectChannels()
|
||||
{
|
||||
/*-----------------------------------------------------*\
|
||||
| Get enabled channels |
|
||||
| Command 0x14, subcommand 0x01 |
|
||||
\*-----------------------------------------------------*/
|
||||
if(!WriteBlock(0x14, 0x01, nullptr, 0))
|
||||
{
|
||||
LOG_WARNING("[ASRock GPU] Failed to request enabled channels");
|
||||
return(false);
|
||||
}
|
||||
|
||||
std::this_thread::sleep_for(20ms);
|
||||
|
||||
uint8_t response[I2C_SMBUS_BLOCK_MAX];
|
||||
if(!ReadBlock(response, sizeof(response)))
|
||||
{
|
||||
LOG_WARNING("[ASRock GPU] Failed to read enabled channels");
|
||||
return(false);
|
||||
}
|
||||
|
||||
LOG_TRACE("[ASRock GPU] Enabled channels response: %02X %02X %02X %02X %02X %02X", response[0], response[1], response[2], response[3], response[4], response[5]);
|
||||
|
||||
/*-----------------------------------------------------*\
|
||||
| Response format |
|
||||
| Bytes 4-5 contain the channel bitmap |
|
||||
\*-----------------------------------------------------*/
|
||||
uint16_t channel_bits = response[4] | (response[5] << 8);
|
||||
LOG_TRACE("[ASRock GPU] Channel bits: 0x%04X", channel_bits);
|
||||
|
||||
/*-----------------------------------------------------*\
|
||||
| Get LED counts |
|
||||
| Command 0x14, subcommand 0x02 |
|
||||
\*-----------------------------------------------------*/
|
||||
if(!WriteBlock(0x14, 0x02, nullptr, 0))
|
||||
{
|
||||
LOG_WARNING("[ASRock GPU] Failed to request LED counts");
|
||||
return(false);
|
||||
}
|
||||
|
||||
std::this_thread::sleep_for(20ms);
|
||||
|
||||
if(!ReadBlock(response, sizeof(response)))
|
||||
{
|
||||
LOG_WARNING("[ASRock GPU] Failed to read LED counts");
|
||||
return(false);
|
||||
}
|
||||
|
||||
num_channels = 0;
|
||||
for(int i = 0; i < 16; i++)
|
||||
{
|
||||
if(channel_bits & (1 << i))
|
||||
{
|
||||
enabled_channels[num_channels] = i;
|
||||
led_counts[num_channels] = response[4 + i];
|
||||
|
||||
const char* name = "Unknown";
|
||||
if(i == ASROCK_GPU_CHANNEL_ARGB_HEADER)
|
||||
{
|
||||
name = "ARGB Header";
|
||||
}
|
||||
else if(i == ASROCK_GPU_CHANNEL_TOP_SIDE)
|
||||
{
|
||||
name = "Top Side";
|
||||
}
|
||||
else if(i == ASROCK_GPU_CHANNEL_FAN)
|
||||
{
|
||||
name = "Fan";
|
||||
}
|
||||
|
||||
LOG_DEBUG("[ASRock GPU] Channel %d (%s) active with %d LEDs", i, name, response[4 + i]);
|
||||
num_channels++;
|
||||
}
|
||||
}
|
||||
|
||||
LOG_DEBUG("[ASRock GPU] Found %d active channels", num_channels);
|
||||
return(num_channels > 0);
|
||||
}
|
||||
|
||||
void ASRockGPUSMBusController::SetChannelColor(uint8_t channel_idx, uint8_t red, uint8_t green, uint8_t blue)
|
||||
{
|
||||
/*-----------------------------------------------------*\
|
||||
| SignalRGB color packet |
|
||||
| Command 0x10, subcommand is the channel index |
|
||||
\*-----------------------------------------------------*/
|
||||
uint8_t data[8] =
|
||||
{
|
||||
0x01, // Mode: direct/static
|
||||
red,
|
||||
green,
|
||||
blue,
|
||||
0x80, // Brightness
|
||||
0xFF, // Effect speed
|
||||
0x00, // Effect direction
|
||||
0x1A // Unknown constant
|
||||
};
|
||||
|
||||
if(!WriteBlock(0x10, channel_idx, data, sizeof(data)))
|
||||
{
|
||||
LOG_WARNING("[ASRock GPU] Failed to set color for channel %d", channel_idx);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,55 @@
|
||||
/*---------------------------------------------------------*\
|
||||
| ASRockGPUSMBusController.h |
|
||||
| |
|
||||
| Driver for ASRock GPU RGB controllers |
|
||||
| |
|
||||
| Based on SignalRGB ASRock GPU.js plugin |
|
||||
| |
|
||||
| This file is part of the OpenRGB project |
|
||||
| SPDX-License-Identifier: GPL-2.0-or-later |
|
||||
\*---------------------------------------------------------*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <string>
|
||||
#include "i2c_smbus.h"
|
||||
|
||||
typedef uint8_t asrock_gpu_dev_id;
|
||||
|
||||
#define ASROCK_GPU_CONTROLLER_NAME "ASRock GPU SMBus Controller"
|
||||
#define ASROCK_GPU_SMBUS_ADDRESS 0x36
|
||||
|
||||
/*-----------------------------------------------------*\
|
||||
| ASRock GPU Channel Names (from SignalRGB) |
|
||||
\*-----------------------------------------------------*/
|
||||
enum
|
||||
{
|
||||
ASROCK_GPU_CHANNEL_ARGB_HEADER = 3,
|
||||
ASROCK_GPU_CHANNEL_TOP_SIDE = 6,
|
||||
ASROCK_GPU_CHANNEL_FAN = 7,
|
||||
};
|
||||
|
||||
class ASRockGPUSMBusController
|
||||
{
|
||||
public:
|
||||
ASRockGPUSMBusController(i2c_smbus_interface* bus, asrock_gpu_dev_id dev, std::string name);
|
||||
~ASRockGPUSMBusController();
|
||||
|
||||
std::string GetDeviceLocation();
|
||||
std::string GetDeviceName();
|
||||
|
||||
void SetChannelColor(uint8_t channel_idx, uint8_t red, uint8_t green, uint8_t blue);
|
||||
bool DetectChannels();
|
||||
|
||||
uint8_t enabled_channels[16];
|
||||
uint8_t led_counts[16];
|
||||
uint8_t num_channels;
|
||||
|
||||
private:
|
||||
i2c_smbus_interface* bus;
|
||||
asrock_gpu_dev_id dev;
|
||||
std::string device_name;
|
||||
|
||||
bool WriteBlock(uint8_t command, uint8_t subcommand, const uint8_t* data, uint8_t len);
|
||||
bool ReadBlock(uint8_t* response, uint8_t len);
|
||||
};
|
||||
+46
@@ -0,0 +1,46 @@
|
||||
/*---------------------------------------------------------*\
|
||||
| ASRockGPUSMBusControllerDetect.cpp |
|
||||
| |
|
||||
| Detector for ASRock GPU RGB controllers |
|
||||
| |
|
||||
| This file is part of the OpenRGB project |
|
||||
| SPDX-License-Identifier: GPL-2.0-or-later |
|
||||
\*---------------------------------------------------------*/
|
||||
|
||||
#include "DetectionManager.h"
|
||||
#include "ASRockGPUSMBusController.h"
|
||||
#include "LogManager.h"
|
||||
#include "RGBController_ASRockGPUSMBus.h"
|
||||
#include "i2c_smbus.h"
|
||||
#include "pci_ids.h"
|
||||
|
||||
DetectedControllers DetectASRockGPUSMBusControllers(i2c_smbus_interface* bus, uint8_t address, const std::string& name)
|
||||
{
|
||||
DetectedControllers detected_controllers;
|
||||
|
||||
LOG_DEBUG("[ASRock GPU] Checking GPU I2C bus for RGB controller at 0x%02X", address);
|
||||
|
||||
if(bus->i2c_smbus_write_quick(address, I2C_SMBUS_WRITE) < 0)
|
||||
{
|
||||
LOG_DEBUG("[ASRock GPU] No response at address 0x%02X", address);
|
||||
return(detected_controllers);
|
||||
}
|
||||
|
||||
LOG_DEBUG("[ASRock GPU] Device responded at 0x%02X, creating controller", address);
|
||||
|
||||
ASRockGPUSMBusController* controller = new ASRockGPUSMBusController(bus, address, name);
|
||||
|
||||
if(controller->DetectChannels())
|
||||
{
|
||||
detected_controllers.push_back(new RGBController_ASRockGPUSMBus(controller));
|
||||
}
|
||||
else
|
||||
{
|
||||
LOG_WARNING("[ASRock GPU] No active channels found, device not registered");
|
||||
delete controller;
|
||||
}
|
||||
|
||||
return(detected_controllers);
|
||||
}
|
||||
|
||||
REGISTER_I2C_PCI_DETECTOR("ASRock Radeon RX 9070 XT Steel Legend", DetectASRockGPUSMBusControllers, AMD_GPU_VEN, AMD_NAVI48_DEV, ASROCK_SUB_VEN, 0x5403, ASROCK_GPU_SMBUS_ADDRESS);
|
||||
+127
@@ -0,0 +1,127 @@
|
||||
/*---------------------------------------------------------*\
|
||||
| RGBController_ASRockGPUSMBus.cpp |
|
||||
| |
|
||||
| RGBController for ASRock GPU RGB controllers |
|
||||
| |
|
||||
| Based on SignalRGB ASRock GPU.js plugin |
|
||||
| |
|
||||
| This file is part of the OpenRGB project |
|
||||
| SPDX-License-Identifier: GPL-2.0-or-later |
|
||||
\*---------------------------------------------------------*/
|
||||
|
||||
#include "RGBController_ASRockGPUSMBus.h"
|
||||
|
||||
RGBController_ASRockGPUSMBus::RGBController_ASRockGPUSMBus(ASRockGPUSMBusController* controller_ptr)
|
||||
{
|
||||
controller = controller_ptr;
|
||||
|
||||
name = controller->GetDeviceName();
|
||||
vendor = "ASRock";
|
||||
type = DEVICE_TYPE_GPU;
|
||||
description = "ASRock GPU RGB Controller";
|
||||
location = controller->GetDeviceLocation();
|
||||
|
||||
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_ASRockGPUSMBus::~RGBController_ASRockGPUSMBus()
|
||||
{
|
||||
delete controller;
|
||||
}
|
||||
|
||||
void RGBController_ASRockGPUSMBus::SetupZones()
|
||||
{
|
||||
/*-----------------------------------------------------*\
|
||||
| Set up zones - one zone per channel |
|
||||
\*-----------------------------------------------------*/
|
||||
for(unsigned int i = 0; i < controller->num_channels; i++)
|
||||
{
|
||||
uint8_t channel_idx = controller->enabled_channels[i];
|
||||
|
||||
zone new_zone;
|
||||
new_zone.type = ZONE_TYPE_SINGLE;
|
||||
new_zone.leds_min = 1;
|
||||
new_zone.leds_max = 1;
|
||||
new_zone.leds_count = 1;
|
||||
|
||||
/*-----------------------------------------------------*\
|
||||
| Channel names from SignalRGB |
|
||||
\*-----------------------------------------------------*/
|
||||
if(channel_idx == ASROCK_GPU_CHANNEL_ARGB_HEADER)
|
||||
{
|
||||
new_zone.name = "ARGB Header";
|
||||
}
|
||||
else if(channel_idx == ASROCK_GPU_CHANNEL_TOP_SIDE)
|
||||
{
|
||||
new_zone.name = "Top Side";
|
||||
}
|
||||
else if(channel_idx == ASROCK_GPU_CHANNEL_FAN)
|
||||
{
|
||||
new_zone.name = "Fan";
|
||||
}
|
||||
else
|
||||
{
|
||||
new_zone.name = "Channel " + std::to_string(channel_idx);
|
||||
}
|
||||
|
||||
zones.push_back(new_zone);
|
||||
|
||||
/*-----------------------------------------------------*\
|
||||
| Set up LED for this zone |
|
||||
\*-----------------------------------------------------*/
|
||||
led new_led;
|
||||
new_led.name = new_zone.name;
|
||||
leds.push_back(new_led);
|
||||
}
|
||||
|
||||
SetupColors();
|
||||
}
|
||||
|
||||
void RGBController_ASRockGPUSMBus::ResizeZone(int /*zone*/, int /*new_size*/)
|
||||
{
|
||||
/*-----------------------------------------------------*\
|
||||
| This device does not support resizing zones |
|
||||
\*-----------------------------------------------------*/
|
||||
}
|
||||
|
||||
void RGBController_ASRockGPUSMBus::DeviceUpdateLEDs()
|
||||
{
|
||||
for(unsigned int i = 0; i < controller->num_channels; i++)
|
||||
{
|
||||
uint8_t channel_idx = controller->enabled_channels[i];
|
||||
RGBColor color = colors[i];
|
||||
|
||||
controller->SetChannelColor(channel_idx,
|
||||
RGBGetRValue(color),
|
||||
RGBGetGValue(color),
|
||||
RGBGetBValue(color));
|
||||
}
|
||||
}
|
||||
|
||||
void RGBController_ASRockGPUSMBus::UpdateZoneLEDs(int zone)
|
||||
{
|
||||
uint8_t channel_idx = controller->enabled_channels[zone];
|
||||
RGBColor color = colors[zone];
|
||||
|
||||
controller->SetChannelColor(channel_idx,
|
||||
RGBGetRValue(color),
|
||||
RGBGetGValue(color),
|
||||
RGBGetBValue(color));
|
||||
}
|
||||
|
||||
void RGBController_ASRockGPUSMBus::UpdateSingleLED(int led)
|
||||
{
|
||||
UpdateZoneLEDs(led);
|
||||
}
|
||||
|
||||
void RGBController_ASRockGPUSMBus::DeviceUpdateMode()
|
||||
{
|
||||
DeviceUpdateLEDs();
|
||||
}
|
||||
+34
-35
@@ -1,35 +1,34 @@
|
||||
/*---------------------------------------------------------*\
|
||||
| RGBController_CorsairVengeancePro.h |
|
||||
| |
|
||||
| RGBController for Corsair Vengeance Pro RGB RAM |
|
||||
| |
|
||||
| Adam Honse (CalcProgrammer1) 30 Jun 2019 |
|
||||
| |
|
||||
| This file is part of the OpenRGB project |
|
||||
| SPDX-License-Identifier: GPL-2.0-only |
|
||||
\*---------------------------------------------------------*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "RGBController.h"
|
||||
#include "CorsairVengeanceProController.h"
|
||||
|
||||
class RGBController_CorsairVengeancePro : public RGBController
|
||||
{
|
||||
public:
|
||||
RGBController_CorsairVengeancePro(CorsairVengeanceProController* controller_ptr);
|
||||
~RGBController_CorsairVengeancePro();
|
||||
|
||||
void SetupZones();
|
||||
|
||||
void ResizeZone(int zone, int new_size);
|
||||
|
||||
void DeviceUpdateLEDs();
|
||||
void UpdateZoneLEDs(int zone);
|
||||
void UpdateSingleLED(int led);
|
||||
|
||||
void DeviceUpdateMode();
|
||||
|
||||
private:
|
||||
CorsairVengeanceProController* controller;
|
||||
};
|
||||
/*---------------------------------------------------------*\
|
||||
| RGBController_ASRockGPUSMBus.h |
|
||||
| |
|
||||
| RGBController for ASRock GPU RGB controllers |
|
||||
| |
|
||||
| Based on SignalRGB ASRock GPU.js plugin |
|
||||
| |
|
||||
| This file is part of the OpenRGB project |
|
||||
| SPDX-License-Identifier: GPL-2.0-or-later |
|
||||
\*---------------------------------------------------------*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "RGBController.h"
|
||||
#include "ASRockGPUSMBusController.h"
|
||||
|
||||
class RGBController_ASRockGPUSMBus : public RGBController
|
||||
{
|
||||
public:
|
||||
RGBController_ASRockGPUSMBus(ASRockGPUSMBusController* controller_ptr);
|
||||
~RGBController_ASRockGPUSMBus();
|
||||
|
||||
void SetupZones();
|
||||
void ResizeZone(int zone, int new_size);
|
||||
|
||||
void DeviceUpdateLEDs();
|
||||
void UpdateZoneLEDs(int zone);
|
||||
void UpdateSingleLED(int led);
|
||||
|
||||
void DeviceUpdateMode();
|
||||
|
||||
private:
|
||||
ASRockGPUSMBusController* controller;
|
||||
};
|
||||
+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);
|
||||
|
||||
@@ -0,0 +1,50 @@
|
||||
/*---------------------------------------------------------*\
|
||||
| RGBController_AcerNitroHidKeyboard.cpp |
|
||||
| |
|
||||
| Detector for Acer Nitro HID Keyboard |
|
||||
| |
|
||||
| Marek Pokropiński Jul 27 2026 |
|
||||
| |
|
||||
| This file is part of the OpenRGB project |
|
||||
| SPDX-License-Identifier: GPL-2.0-or-later |
|
||||
\*---------------------------------------------------------*/
|
||||
|
||||
#include <vector>
|
||||
#include "DetectionManager.h"
|
||||
#include "AcerNitroHidKeyboardController.h"
|
||||
#include "RGBController_AcerNitroHidKeyboard.h"
|
||||
#include "RGBController_AcerNitroHidLed.h"
|
||||
|
||||
/*---------------------------------------------------------*\
|
||||
| HID vendor and product IDs for ENEK EC in Acer Nitro |
|
||||
\*---------------------------------------------------------*/
|
||||
|
||||
#define ACER_ENEC_VID 0x0CF2
|
||||
#define ACER_ENEC_PID 0x5130
|
||||
#define ACER_ENEC_USAGE_PAGE 0xFF5A
|
||||
#define ACER_ENEC_USAGE 0x01
|
||||
|
||||
DetectedControllers DetectAcerHIDControllers(hid_device_info* info, const std::string&)
|
||||
{
|
||||
DetectedControllers detected_controllers;
|
||||
hid_device* dev;
|
||||
|
||||
dev = hid_open_path(info->path);
|
||||
if(dev)
|
||||
{
|
||||
/*-------------------------------------------------*\
|
||||
| Controller is shared between keyboard and onboard |
|
||||
| led |
|
||||
\*-------------------------------------------------*/
|
||||
std::shared_ptr<AcerNitroHidKeyboardController> controller = std::make_shared<AcerNitroHidKeyboardController>(dev, info->path);
|
||||
RGBController_AcerNitroHidKeyboard* rgb_kb_controller = new RGBController_AcerNitroHidKeyboard(controller);
|
||||
RGBController_AcerNitroHidLed* rgb_led_controller = new RGBController_AcerNitroHidLed(controller);
|
||||
|
||||
detected_controllers.push_back(rgb_kb_controller);
|
||||
detected_controllers.push_back(rgb_led_controller);
|
||||
}
|
||||
|
||||
return(detected_controllers);
|
||||
}
|
||||
|
||||
REGISTER_HID_DETECTOR_PU("AcerNitroHidKeyboardController", DetectAcerHIDControllers, ACER_ENEC_VID, ACER_ENEC_PID, ACER_ENEC_USAGE_PAGE, ACER_ENEC_USAGE);
|
||||
@@ -0,0 +1,80 @@
|
||||
/*---------------------------------------------------------*\
|
||||
| RGBController_AcerNitroHidKeyboard.cpp |
|
||||
| |
|
||||
| Driver for Acer Nitro Keyboard |
|
||||
| |
|
||||
| Marek Pokropiński Jul 27 2026 |
|
||||
| |
|
||||
| This file is part of the OpenRGB project |
|
||||
| SPDX-License-Identifier: GPL-2.0-or-later |
|
||||
\*---------------------------------------------------------*/
|
||||
|
||||
#include "AcerNitroHidKeyboardController.h"
|
||||
|
||||
AcerNitroHidKeyboardController::AcerNitroHidKeyboardController(hid_device *dev_handle, const char *path)
|
||||
{
|
||||
this->location = path;
|
||||
this->dev = dev_handle;
|
||||
|
||||
device_name = "Acer Nitro HID Keyboard";
|
||||
}
|
||||
|
||||
AcerNitroHidKeyboardController::~AcerNitroHidKeyboardController()
|
||||
{
|
||||
if(dev)
|
||||
{
|
||||
hid_close(dev);
|
||||
}
|
||||
}
|
||||
|
||||
std::string AcerNitroHidKeyboardController::GetLocation() const
|
||||
{
|
||||
return("HID: " + location);
|
||||
}
|
||||
|
||||
std::string AcerNitroHidKeyboardController::GetDeviceName() const
|
||||
{
|
||||
return(device_name);
|
||||
}
|
||||
|
||||
void AcerNitroHidKeyboardController::SetLEDs(const std::vector<RGBColor>& colors, unsigned char brightness, unsigned char device_id)
|
||||
{
|
||||
std::lock_guard<std::mutex> guard(device_mutex);
|
||||
|
||||
for(unsigned int led_idx = 0; (led_idx < colors.size()) && (led_idx < ACER_HID_NUM_ZONES); led_idx++)
|
||||
{
|
||||
/*-------------------------------------------------*\
|
||||
| Convert colors to RGB format |
|
||||
\*-------------------------------------------------*/
|
||||
unsigned char r = RGBGetRValue(colors[led_idx]);
|
||||
unsigned char g = RGBGetGValue(colors[led_idx]);
|
||||
unsigned char b = RGBGetBValue(colors[led_idx]);
|
||||
|
||||
/*-------------------------------------------------*\
|
||||
| Send packet |
|
||||
\*-------------------------------------------------*/
|
||||
unsigned char zone_select = (unsigned char)(1<<led_idx);
|
||||
unsigned char packet[ACER_HID_PACKET_SIZE] = {0xA4, device_id, ACER_HID_MODE_STATIC, brightness, 0, 1, r, g, b, zone_select, 0};
|
||||
hid_send_feature_report(dev, packet, ACER_HID_PACKET_SIZE);
|
||||
}
|
||||
}
|
||||
|
||||
void AcerNitroHidKeyboardController::SetAllLEDs(const RGBColor &color, unsigned char brightness, unsigned char speed, unsigned char direction, unsigned char mode, unsigned char device_id)
|
||||
{
|
||||
std::lock_guard<std::mutex> guard(device_mutex);
|
||||
|
||||
/*-----------------------------------------------------*\
|
||||
| Convert color to RGB format |
|
||||
\*-----------------------------------------------------*/
|
||||
unsigned char r = RGBGetRValue(color);
|
||||
unsigned char g = RGBGetGValue(color);
|
||||
unsigned char b = RGBGetBValue(color);
|
||||
|
||||
/*-----------------------------------------------------*\
|
||||
| Send packet |
|
||||
| Zone select = All zones |
|
||||
\*-----------------------------------------------------*/
|
||||
unsigned char zone_select = 0x0F;
|
||||
unsigned char packet[ACER_HID_PACKET_SIZE] = {0xA4, device_id, mode, brightness, speed, direction, r, g, b, zone_select, 0};
|
||||
hid_send_feature_report(dev, packet, ACER_HID_PACKET_SIZE);
|
||||
}
|
||||
@@ -0,0 +1,56 @@
|
||||
/*---------------------------------------------------------*\
|
||||
| RGBController_AcerNitroHidKeyboard.cpp |
|
||||
| |
|
||||
| Driver for Acer Nitro Keyboard |
|
||||
| |
|
||||
| Marek Pokropiński Jul 27 2026 |
|
||||
| |
|
||||
| This file is part of the OpenRGB project |
|
||||
| SPDX-License-Identifier: GPL-2.0-or-later |
|
||||
\*---------------------------------------------------------*/
|
||||
|
||||
#pragma once
|
||||
|
||||
enum
|
||||
{
|
||||
ACER_HID_MODE_DIRECT = 1,
|
||||
ACER_HID_MODE_STATIC = 2,
|
||||
ACER_HID_MODE_BREATHING = 4,
|
||||
ACER_HID_MODE_NEON = 5,
|
||||
ACER_HID_MODE_OPMODE = 6,
|
||||
ACER_HID_MODE_WAVE = 7,
|
||||
ACER_HID_MODE_SHIFTING = 8,
|
||||
ACER_HID_MODE_ZOOM = 9,
|
||||
ACER_HID_MODE_METEOR = 10,
|
||||
ACER_HID_MODE_TWINKLING = 11,
|
||||
};
|
||||
|
||||
#define ACER_HID_NAME_BUFFER_SIZE 255
|
||||
#define ACER_HID_NUM_ZONES 4
|
||||
#define ACER_HID_PACKET_SIZE 11
|
||||
|
||||
#include <mutex>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <hidapi.h>
|
||||
#include "RGBControllerInterface.h"
|
||||
|
||||
class AcerNitroHidKeyboardController
|
||||
{
|
||||
public:
|
||||
AcerNitroHidKeyboardController(hid_device *dev_handle, const char *path);
|
||||
~AcerNitroHidKeyboardController();
|
||||
|
||||
std::string GetDeviceName() const;
|
||||
std::string GetSerial() const;
|
||||
std::string GetLocation() const;
|
||||
|
||||
void SetLEDs(const std::vector<RGBColor> &colors, unsigned char brightness, unsigned char device_id);
|
||||
void SetAllLEDs(const RGBColor &color, unsigned char brightness, unsigned char speed, unsigned char direction, unsigned char mode, unsigned char device_id);
|
||||
|
||||
private:
|
||||
hid_device *dev;
|
||||
std::string device_name;
|
||||
std::string location;
|
||||
std::mutex device_mutex;
|
||||
};
|
||||
@@ -0,0 +1,231 @@
|
||||
/*---------------------------------------------------------*\
|
||||
| RGBController_AcerNitroHidKeyboard.cpp |
|
||||
| |
|
||||
| RGBController for Acer Nitro HID Keyboard |
|
||||
| |
|
||||
| Marek Pokropiński Jul 27 2026 |
|
||||
| |
|
||||
| This file is part of the OpenRGB project |
|
||||
| SPDX-License-Identifier: GPL-2.0-or-later |
|
||||
\*---------------------------------------------------------*/
|
||||
|
||||
#include "RGBController_AcerNitroHidKeyboard.h"
|
||||
|
||||
// /**------------------------------------------------------------------*\
|
||||
// @name Acer Nitro HID Keyboard
|
||||
// @category Laptop
|
||||
// @type HID
|
||||
// @save :x:
|
||||
// @direct :white_check_mark:
|
||||
// @effects :white_check_mark:
|
||||
// @detectors DetectAcerHIDControllers
|
||||
// @comment
|
||||
// \*-------------------------------------------------------------------*/
|
||||
|
||||
RGBController_AcerNitroHidKeyboard::RGBController_AcerNitroHidKeyboard(std::shared_ptr<AcerNitroHidKeyboardController> controller)
|
||||
{
|
||||
this->controller = controller;
|
||||
device_id = 0x21;
|
||||
|
||||
name = "Acer Nitro HID Keyboard";
|
||||
vendor = "Acer";
|
||||
type = DEVICE_TYPE_LAPTOP;
|
||||
description = "Acer Nitro HID Keyboard Device";
|
||||
location = controller->GetLocation();
|
||||
|
||||
mode Direct;
|
||||
Direct.name = "Direct";
|
||||
Direct.value = ACER_HID_MODE_DIRECT;
|
||||
Direct.flags = MODE_FLAG_HAS_PER_LED_COLOR | MODE_FLAG_HAS_BRIGHTNESS ;
|
||||
Direct.color_mode = MODE_COLORS_PER_LED;
|
||||
Direct.brightness_min = 0;
|
||||
Direct.brightness_max = 100;
|
||||
Direct.brightness = 100;
|
||||
|
||||
modes.push_back(Direct);
|
||||
|
||||
mode Static;
|
||||
Static.name = "Static";
|
||||
Static.value = ACER_HID_MODE_STATIC;
|
||||
Static.flags = MODE_FLAG_HAS_MODE_SPECIFIC_COLOR | MODE_FLAG_HAS_BRIGHTNESS;
|
||||
Static.color_mode = MODE_COLORS_MODE_SPECIFIC;
|
||||
Static.brightness_min = 0;
|
||||
Static.brightness_max = 100;
|
||||
Static.brightness = 100;
|
||||
Static.colors_min = 1;
|
||||
Static.colors_max = 1;
|
||||
Static.colors.resize(1);
|
||||
Static.speed = 0;
|
||||
|
||||
modes.push_back(Static);
|
||||
|
||||
mode Breathing;
|
||||
Breathing.name = "Breathing";
|
||||
Breathing.value = ACER_HID_MODE_BREATHING;
|
||||
Breathing.flags = MODE_FLAG_HAS_MODE_SPECIFIC_COLOR | MODE_FLAG_HAS_BRIGHTNESS | MODE_FLAG_HAS_SPEED;
|
||||
Breathing.color_mode = MODE_COLORS_MODE_SPECIFIC;
|
||||
Breathing.brightness_min = 0;
|
||||
Breathing.brightness_max = 100;
|
||||
Breathing.brightness = 100;
|
||||
Breathing.colors_min = 1;
|
||||
Breathing.colors_max = 1;
|
||||
Breathing.speed_min = 1;
|
||||
Breathing.speed_max = 9;
|
||||
Breathing.speed = 4;
|
||||
Breathing.colors.resize(1);
|
||||
|
||||
modes.push_back(Breathing);
|
||||
|
||||
mode Neon;
|
||||
Neon.name = "Neon";
|
||||
Neon.value = ACER_HID_MODE_NEON;
|
||||
Neon.flags = MODE_FLAG_REQUIRES_ENTIRE_DEVICE | MODE_FLAG_HAS_BRIGHTNESS | MODE_FLAG_HAS_SPEED;
|
||||
Neon.color_mode = MODE_COLORS_NONE;
|
||||
Neon.brightness_min = 0;
|
||||
Neon.brightness_max = 100;
|
||||
Neon.brightness = 100;
|
||||
Neon.speed_min = 1;
|
||||
Neon.speed_max = 9;
|
||||
Neon.speed = 4;
|
||||
|
||||
modes.push_back(Neon);
|
||||
|
||||
mode Wave;
|
||||
Wave.name = "Wave";
|
||||
Wave.value = ACER_HID_MODE_WAVE;
|
||||
Wave.flags = MODE_FLAG_REQUIRES_ENTIRE_DEVICE | MODE_FLAG_HAS_BRIGHTNESS | MODE_FLAG_HAS_SPEED | MODE_FLAG_HAS_DIRECTION_LR;
|
||||
Wave.color_mode = MODE_COLORS_NONE;
|
||||
Wave.brightness_min = 0;
|
||||
Wave.brightness_max = 100;
|
||||
Wave.brightness = 100;
|
||||
Wave.speed_min = 1;
|
||||
Wave.speed_max = 9;
|
||||
Wave.speed = 4;
|
||||
Wave.direction = 0;
|
||||
|
||||
modes.push_back(Wave);
|
||||
|
||||
mode Shifting;
|
||||
Shifting.name = "Shifting";
|
||||
Shifting.value = ACER_HID_MODE_SHIFTING;
|
||||
Shifting.flags = MODE_FLAG_REQUIRES_ENTIRE_DEVICE | MODE_FLAG_HAS_BRIGHTNESS | MODE_FLAG_HAS_SPEED;
|
||||
Shifting.color_mode = MODE_COLORS_NONE;
|
||||
Shifting.brightness_min = 0;
|
||||
Shifting.brightness_max = 100;
|
||||
Shifting.brightness = 100;
|
||||
Shifting.speed_min = 1;
|
||||
Shifting.speed_max = 9;
|
||||
Shifting.speed = 4;
|
||||
|
||||
modes.push_back(Shifting);
|
||||
|
||||
mode Zoom;
|
||||
Zoom.name = "Zoom";
|
||||
Zoom.value = ACER_HID_MODE_ZOOM;
|
||||
Zoom.flags = MODE_FLAG_REQUIRES_ENTIRE_DEVICE | MODE_FLAG_HAS_BRIGHTNESS | MODE_FLAG_HAS_SPEED;
|
||||
Zoom.color_mode = MODE_COLORS_NONE;
|
||||
Zoom.brightness_min = 0;
|
||||
Zoom.brightness_max = 100;
|
||||
Zoom.brightness = 100;
|
||||
Zoom.speed_min = 1;
|
||||
Zoom.speed_max = 9;
|
||||
Zoom.speed = 4;
|
||||
|
||||
modes.push_back(Zoom);
|
||||
|
||||
mode Meteor;
|
||||
Meteor.name = "Meteor";
|
||||
Meteor.value = ACER_HID_MODE_METEOR;
|
||||
Meteor.flags = MODE_FLAG_REQUIRES_ENTIRE_DEVICE | MODE_FLAG_HAS_BRIGHTNESS | MODE_FLAG_HAS_SPEED;
|
||||
Meteor.color_mode = MODE_COLORS_NONE;
|
||||
Meteor.brightness_min = 0;
|
||||
Meteor.brightness_max = 100;
|
||||
Meteor.brightness = 100;
|
||||
Meteor.speed_min = 1;
|
||||
Meteor.speed_max = 9;
|
||||
Meteor.speed = 4;
|
||||
|
||||
modes.push_back(Meteor);
|
||||
|
||||
mode Twinkling;
|
||||
Twinkling.name = "Twinkling";
|
||||
Twinkling.value = ACER_HID_MODE_TWINKLING;
|
||||
Twinkling.flags = MODE_FLAG_REQUIRES_ENTIRE_DEVICE | MODE_FLAG_HAS_BRIGHTNESS | MODE_FLAG_HAS_SPEED;
|
||||
Twinkling.color_mode = MODE_COLORS_NONE;
|
||||
Twinkling.brightness_min = 0;
|
||||
Twinkling.brightness_max = 100;
|
||||
Twinkling.brightness = 100;
|
||||
Twinkling.colors_min = 1;
|
||||
Twinkling.colors_max = 1;
|
||||
Twinkling.speed_min = 1;
|
||||
Twinkling.speed_max = 9;
|
||||
Twinkling.speed = 4;
|
||||
|
||||
modes.push_back(Twinkling);
|
||||
|
||||
SetupZones();
|
||||
}
|
||||
|
||||
RGBController_AcerNitroHidKeyboard::~RGBController_AcerNitroHidKeyboard()
|
||||
{
|
||||
Shutdown();
|
||||
}
|
||||
|
||||
void RGBController_AcerNitroHidKeyboard::SetupZones()
|
||||
{
|
||||
zone* new_zone = new zone;
|
||||
|
||||
new_zone->name = "Keyboard Backlight Zone";
|
||||
new_zone->type = ZONE_TYPE_LINEAR;
|
||||
new_zone->leds_min = 4;
|
||||
new_zone->leds_max = 4;
|
||||
new_zone->leds_count = 4;
|
||||
|
||||
zones.push_back(*new_zone);
|
||||
|
||||
for(std::size_t zone_idx = 0; zone_idx < ACER_HID_NUM_ZONES; zone_idx++)
|
||||
{
|
||||
led* new_led = new led();
|
||||
new_led->name = "Keyboard Backlight Zone ";
|
||||
new_led->name.append(std::to_string(zone_idx + 1));
|
||||
new_led->value = (unsigned int)leds.size();
|
||||
|
||||
leds.push_back(*new_led);
|
||||
}
|
||||
|
||||
SetupColors();
|
||||
}
|
||||
|
||||
void RGBController_AcerNitroHidKeyboard::DeviceUpdateLEDs()
|
||||
{
|
||||
mode& current_mode = modes[active_mode];
|
||||
if(current_mode.value == ACER_HID_MODE_DIRECT)
|
||||
{
|
||||
controller->SetLEDs(colors, current_mode.brightness, device_id);
|
||||
}
|
||||
else
|
||||
{
|
||||
RGBColor color = current_mode.colors.size()==0? (RGBColor)0 : current_mode.colors[0];
|
||||
unsigned char direction = 1;
|
||||
if((modes[active_mode].flags & MODE_FLAG_HAS_DIRECTION_LR) && modes[active_mode].direction)
|
||||
{
|
||||
direction = 2;
|
||||
}
|
||||
controller->SetAllLEDs(color, current_mode.brightness, current_mode.speed, direction, current_mode.value, device_id);
|
||||
}
|
||||
}
|
||||
|
||||
void RGBController_AcerNitroHidKeyboard::DeviceUpdateZoneLEDs(int)
|
||||
{
|
||||
DeviceUpdateLEDs();
|
||||
}
|
||||
|
||||
void RGBController_AcerNitroHidKeyboard::DeviceUpdateSingleLED(int)
|
||||
{
|
||||
DeviceUpdateLEDs();
|
||||
}
|
||||
|
||||
void RGBController_AcerNitroHidKeyboard::DeviceUpdateMode()
|
||||
{
|
||||
DeviceUpdateLEDs();
|
||||
}
|
||||
@@ -0,0 +1,33 @@
|
||||
/*---------------------------------------------------------*\
|
||||
| RGBController_AcerNitroHidKeyboard.cpp |
|
||||
| |
|
||||
| RGBController for Acer Nitro HID Keyboard |
|
||||
| |
|
||||
| Marek Pokropiński Jul 27 2026 |
|
||||
| |
|
||||
| This file is part of the OpenRGB project |
|
||||
| SPDX-License-Identifier: GPL-2.0-or-later |
|
||||
\*---------------------------------------------------------*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "RGBController.h"
|
||||
#include "AcerNitroHidKeyboardController.h"
|
||||
|
||||
class RGBController_AcerNitroHidKeyboard : public RGBController
|
||||
{
|
||||
public:
|
||||
RGBController_AcerNitroHidKeyboard(std::shared_ptr<AcerNitroHidKeyboardController> controller);
|
||||
~RGBController_AcerNitroHidKeyboard();
|
||||
|
||||
void SetupZones();
|
||||
|
||||
void DeviceUpdateLEDs();
|
||||
void DeviceUpdateZoneLEDs(int zone);
|
||||
void DeviceUpdateSingleLED(int led);
|
||||
void DeviceUpdateMode();
|
||||
|
||||
private:
|
||||
std::shared_ptr<AcerNitroHidKeyboardController> controller;
|
||||
unsigned int device_id;
|
||||
};
|
||||
@@ -0,0 +1,152 @@
|
||||
/*---------------------------------------------------------*\
|
||||
| RGBController_AcerNitroHidLed.cpp |
|
||||
| |
|
||||
| RGBController for Acer Nitro HID LED |
|
||||
| |
|
||||
| Marek Pokropiński Jul 27 2026 |
|
||||
| |
|
||||
| This file is part of the OpenRGB project |
|
||||
| SPDX-License-Identifier: GPL-2.0-or-later |
|
||||
\*---------------------------------------------------------*/
|
||||
|
||||
#include "RGBController_AcerNitroHidLed.h"
|
||||
|
||||
// /**------------------------------------------------------------------*\
|
||||
// @name Acer Nitro HID Led
|
||||
// @category Laptop
|
||||
// @type HID
|
||||
// @save :x:
|
||||
// @direct :white_check_mark:
|
||||
// @effects :white_check_mark:
|
||||
// @detectors DetectAcerHIDControllers
|
||||
// @comment
|
||||
// \*-------------------------------------------------------------------*/
|
||||
|
||||
RGBController_AcerNitroHidLed::RGBController_AcerNitroHidLed(std::shared_ptr<AcerNitroHidKeyboardController> controller)
|
||||
{
|
||||
this->controller = controller;
|
||||
device_id = 0x65;
|
||||
|
||||
name = "Acer Nitro HID LED Device";
|
||||
vendor = "Acer";
|
||||
type = DEVICE_TYPE_LIGHT;
|
||||
description = "Acer Nitro HID LED Device";
|
||||
location = controller->GetLocation();
|
||||
|
||||
mode Direct;
|
||||
Direct.name = "Direct";
|
||||
Direct.value = ACER_HID_MODE_DIRECT;
|
||||
Direct.flags = MODE_FLAG_HAS_PER_LED_COLOR | MODE_FLAG_HAS_BRIGHTNESS ;
|
||||
Direct.color_mode = MODE_COLORS_PER_LED;
|
||||
Direct.brightness_min = 0;
|
||||
Direct.brightness_max = 100;
|
||||
Direct.brightness = 100;
|
||||
|
||||
modes.push_back(Direct);
|
||||
|
||||
mode Static;
|
||||
Static.name = "Static";
|
||||
Static.value = ACER_HID_MODE_STATIC;
|
||||
Static.flags = MODE_FLAG_HAS_MODE_SPECIFIC_COLOR | MODE_FLAG_HAS_BRIGHTNESS;
|
||||
Static.color_mode = MODE_COLORS_MODE_SPECIFIC;
|
||||
Static.brightness_min = 0;
|
||||
Static.brightness_max = 100;
|
||||
Static.brightness = 100;
|
||||
Static.colors_min = 1;
|
||||
Static.colors_max = 1;
|
||||
Static.colors.resize(1);
|
||||
Static.speed = 0;
|
||||
|
||||
modes.push_back(Static);
|
||||
|
||||
mode Breathing;
|
||||
Breathing.name = "Breathing";
|
||||
Breathing.value = ACER_HID_MODE_BREATHING;
|
||||
Breathing.flags = MODE_FLAG_HAS_MODE_SPECIFIC_COLOR | MODE_FLAG_HAS_BRIGHTNESS | MODE_FLAG_HAS_SPEED;
|
||||
Breathing.color_mode = MODE_COLORS_MODE_SPECIFIC;
|
||||
Breathing.brightness_min = 0;
|
||||
Breathing.brightness_max = 100;
|
||||
Breathing.brightness = 100;
|
||||
Breathing.colors_min = 1;
|
||||
Breathing.colors_max = 1;
|
||||
Breathing.speed_min = 1;
|
||||
Breathing.speed_max = 5;
|
||||
Breathing.speed = 4;
|
||||
Breathing.colors.resize(1);
|
||||
|
||||
modes.push_back(Breathing);
|
||||
|
||||
mode Neon;
|
||||
Neon.name = "Neon";
|
||||
Neon.value = ACER_HID_MODE_NEON;
|
||||
Neon.flags = MODE_FLAG_REQUIRES_ENTIRE_DEVICE | MODE_FLAG_HAS_BRIGHTNESS | MODE_FLAG_HAS_SPEED;
|
||||
Neon.color_mode = MODE_COLORS_NONE;
|
||||
Neon.brightness_min = 0;
|
||||
Neon.brightness_max = 100;
|
||||
Neon.brightness = 100;
|
||||
Neon.speed_min = 1;
|
||||
Neon.speed_max = 5;
|
||||
Neon.speed = 4;
|
||||
|
||||
modes.push_back(Neon);
|
||||
|
||||
SetupZones();
|
||||
}
|
||||
|
||||
RGBController_AcerNitroHidLed::~RGBController_AcerNitroHidLed()
|
||||
{
|
||||
Shutdown();
|
||||
}
|
||||
|
||||
void RGBController_AcerNitroHidLed::SetupZones()
|
||||
{
|
||||
zone* new_zone = new zone;
|
||||
|
||||
new_zone->name = "LED";
|
||||
new_zone->type = ZONE_TYPE_LINEAR;
|
||||
new_zone->leds_min = 1;
|
||||
new_zone->leds_max = 1;
|
||||
new_zone->leds_count = 1;
|
||||
zones.push_back(*new_zone);
|
||||
|
||||
led* new_led = new led();
|
||||
new_led->name = "LED";
|
||||
new_led->value = (unsigned int)leds.size();
|
||||
leds.push_back(*new_led);
|
||||
|
||||
SetupColors();
|
||||
}
|
||||
|
||||
void RGBController_AcerNitroHidLed::DeviceUpdateLEDs()
|
||||
{
|
||||
mode& current_mode = modes[active_mode];
|
||||
if(current_mode.value == ACER_HID_MODE_DIRECT)
|
||||
{
|
||||
controller->SetLEDs(colors, current_mode.brightness, device_id);
|
||||
}
|
||||
else
|
||||
{
|
||||
RGBColor color = current_mode.colors.size()==0? (RGBColor)0 : current_mode.colors[0];
|
||||
unsigned char direction = 1;
|
||||
if((modes[active_mode].flags & MODE_FLAG_HAS_DIRECTION_LR) && modes[active_mode].direction)
|
||||
{
|
||||
direction = 2;
|
||||
}
|
||||
controller->SetAllLEDs(color, current_mode.brightness, current_mode.speed, direction, current_mode.value, device_id);
|
||||
}
|
||||
}
|
||||
|
||||
void RGBController_AcerNitroHidLed::DeviceUpdateZoneLEDs(int)
|
||||
{
|
||||
DeviceUpdateLEDs();
|
||||
}
|
||||
|
||||
void RGBController_AcerNitroHidLed::DeviceUpdateSingleLED(int)
|
||||
{
|
||||
DeviceUpdateLEDs();
|
||||
}
|
||||
|
||||
void RGBController_AcerNitroHidLed::DeviceUpdateMode()
|
||||
{
|
||||
DeviceUpdateLEDs();
|
||||
}
|
||||
@@ -0,0 +1,35 @@
|
||||
/*---------------------------------------------------------*\
|
||||
| RGBController_AcerNitroHidLed.cpp |
|
||||
| |
|
||||
| RGBController for Acer Nitro HID LED |
|
||||
| |
|
||||
| Marek Pokropiński Jul 27 2026 |
|
||||
| |
|
||||
| This file is part of the OpenRGB project |
|
||||
| SPDX-License-Identifier: GPL-2.0-or-later |
|
||||
\*---------------------------------------------------------*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "RGBController.h"
|
||||
#include "AcerNitroHidKeyboardController.h"
|
||||
#include "RGBController_AcerNitroHidKeyboard.h"
|
||||
|
||||
class RGBController_AcerNitroHidLed : public RGBController
|
||||
{
|
||||
public:
|
||||
RGBController_AcerNitroHidLed(std::shared_ptr<AcerNitroHidKeyboardController> controller);
|
||||
~RGBController_AcerNitroHidLed();
|
||||
|
||||
void SetupZones();
|
||||
|
||||
void DeviceUpdateLEDs();
|
||||
void DeviceUpdateZoneLEDs(int zone);
|
||||
void DeviceUpdateSingleLED(int led);
|
||||
|
||||
void DeviceUpdateMode();
|
||||
|
||||
private:
|
||||
std::shared_ptr<AcerNitroHidKeyboardController> controller;
|
||||
unsigned int device_id;
|
||||
};
|
||||
@@ -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();
|
||||
|
||||
|
||||
+2
-2
@@ -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 <cstring>
|
||||
@@ -319,7 +319,7 @@ void AlienwareAW410KController::SetMode
|
||||
SendCommit();
|
||||
}
|
||||
|
||||
void AlienwareAW410KController::UpdateSingleLED
|
||||
void AlienwareAW410KController::DeviceUpdateSingleLED
|
||||
(
|
||||
unsigned char led,
|
||||
unsigned char red,
|
||||
|
||||
+2
-2
@@ -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
|
||||
@@ -130,7 +130,7 @@ public:
|
||||
unsigned char blue2
|
||||
);
|
||||
|
||||
void UpdateSingleLED
|
||||
void DeviceUpdateSingleLED
|
||||
(
|
||||
unsigned char led,
|
||||
unsigned char red,
|
||||
|
||||
+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);
|
||||
+7
-30
@@ -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>
|
||||
@@ -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();
|
||||
|
||||
|
||||
+2
-2
@@ -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 <cstring>
|
||||
@@ -318,7 +318,7 @@ void AlienwareAW510KController::SetMode
|
||||
SendCommit();
|
||||
}
|
||||
|
||||
void AlienwareAW510KController::UpdateSingleLED
|
||||
void AlienwareAW510KController::DeviceUpdateSingleLED
|
||||
(
|
||||
unsigned char led,
|
||||
unsigned char red,
|
||||
|
||||
+2
-2
@@ -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
|
||||
@@ -132,7 +132,7 @@ public:
|
||||
unsigned char blue2
|
||||
);
|
||||
|
||||
void UpdateSingleLED
|
||||
void DeviceUpdateSingleLED
|
||||
(
|
||||
unsigned char led,
|
||||
unsigned char red,
|
||||
|
||||
+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);
|
||||
+7
-30
@@ -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>
|
||||
@@ -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, name);
|
||||
RGBController_AlienwareAW510K* rgb_controller = new RGBController_AlienwareAW510K(controller);
|
||||
|
||||
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, name);
|
||||
RGBController_AlienwareAW410K* rgb_controller = new RGBController_AlienwareAW410K(controller);
|
||||
|
||||
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>
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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>
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user