Compare commits
315
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
0fca93e454 | ||
|
|
664b794efa | ||
|
|
c60cf5d2de | ||
|
|
8d8f70bfdf | ||
|
|
b349c3ff2c | ||
|
|
30a250c7df | ||
|
|
a1449d99cf | ||
|
|
a589a0f0b8 | ||
|
|
21594063ca | ||
|
|
8f89583eb0 | ||
|
|
8487b5c89d | ||
|
|
3a2d0f46ac | ||
|
|
8af2461735 | ||
|
|
6c8c48d2fe | ||
|
|
f8895af960 | ||
|
|
4664a27d6b | ||
|
|
2609822f8a | ||
|
|
cd3ad1822b | ||
|
|
0a6930945e | ||
|
|
4373df41ba | ||
|
|
0971aa92c3 | ||
|
|
f2aef24b8a | ||
|
|
f019320df1 | ||
|
|
3af3d137a5 | ||
|
|
9d0d65ca3a | ||
|
|
9a33c95b69 | ||
|
|
b113fd8cbc | ||
|
|
1836b5e417 | ||
|
|
d5f9411ecb | ||
|
|
9ad0fa26bf | ||
|
|
6a4550c6f0 | ||
|
|
cc3414408f | ||
|
|
fd8101b0c3 | ||
|
|
18f484c274 | ||
|
|
221f5007ab | ||
|
|
fbb7d16039 | ||
|
|
ca84bad1fc | ||
|
|
be9fe7bb2d | ||
|
|
e21d29fa27 | ||
|
|
febdd2ad5e | ||
|
|
503ad36256 | ||
|
|
1be1656ce8 | ||
|
|
cd6831ccbe | ||
|
|
676547b8b0 | ||
|
|
c82a6052a2 | ||
|
|
a0726dc065 | ||
|
|
86fbdfa6e7 | ||
|
|
0eb082f21b | ||
|
|
714736bf73 | ||
|
|
079e344c5a | ||
|
|
c2e0bd496f | ||
|
|
f1a050a503 | ||
|
|
bf24ab3d53 | ||
|
|
5190274004 | ||
|
|
5db766cfa0 | ||
|
|
ddc8bc5885 | ||
|
|
4036a9e414 | ||
|
|
fa74b64d6d | ||
|
|
59c2ca2052 | ||
|
|
a528db1604 | ||
|
|
72a5afc910 | ||
|
|
974f7d1e26 | ||
|
|
2a6ad477e6 | ||
|
|
ce64dbc686 | ||
|
|
eb199dae67 | ||
|
|
ad9fd08a08 | ||
|
|
86b2ced685 | ||
|
|
4e96056ac4 | ||
|
|
84c24e70c0 | ||
|
|
d069947252 | ||
|
|
550503d757 | ||
|
|
ef6241fe38 | ||
|
|
fcce668d66 | ||
|
|
1bd9215a72 | ||
|
|
840512751c | ||
|
|
517287117b | ||
|
|
46d935c1a4 | ||
|
|
9680d072fa | ||
|
|
06413f2877 | ||
|
|
ce86faabfe | ||
|
|
2134323bf8 | ||
|
|
67e08d3415 | ||
|
|
f8d3c7a838 | ||
|
|
2c630a5218 | ||
|
|
e418aa7f95 | ||
|
|
3ab1519e25 | ||
|
|
d8c40cab6d | ||
|
|
f0e9650085 | ||
|
|
a34d796059 | ||
|
|
9470cb69fd | ||
|
|
520b83a226 | ||
|
|
85af2e1ed7 | ||
|
|
f420e9bbbe | ||
|
|
82cb9fb7d0 | ||
|
|
719d7b8801 | ||
|
|
b13ca818bb | ||
|
|
2dd013a0a0 | ||
|
|
49e4f00aff | ||
|
|
4c018421a2 | ||
|
|
a2826ec865 | ||
|
|
c256b6246a | ||
|
|
f9bfb951ca | ||
|
|
8c63eeea47 | ||
|
|
b136e7739a | ||
|
|
2967ccb1cb | ||
|
|
03d5dd6008 | ||
|
|
89d1ee2483 | ||
|
|
c313b19fc5 | ||
|
|
2a6856a5d2 | ||
|
|
f3c7a213b1 | ||
|
|
f6ddf5676a | ||
|
|
b331fbcd4d | ||
|
|
41eec46fa7 | ||
|
|
0eb34eec25 | ||
|
|
a1f144daf2 | ||
|
|
ca73941e5d | ||
|
|
0bdf600409 | ||
|
|
d5f8e2cac9 | ||
|
|
20f3e5db0b | ||
|
|
d412ef5e17 | ||
|
|
0269cdd068 | ||
|
|
12f90a67f9 | ||
|
|
ca554d9ef6 | ||
|
|
0c0ffe7f5c | ||
|
|
0eee6044b2 | ||
|
|
da21f992c5 | ||
|
|
6c8a46cc7d | ||
|
|
aa31e21868 | ||
|
|
ee66121364 | ||
|
|
327edf2a6b | ||
|
|
2535ac3edf | ||
|
|
df56b42e62 | ||
|
|
bed69130fd | ||
|
|
f54460fd2e | ||
|
|
2bde9b287f | ||
|
|
c8abbc6054 | ||
|
|
cba7c016d3 | ||
|
|
7d0db424ec | ||
|
|
6f9e164874 | ||
|
|
2927135cdd | ||
|
|
0afcdbd0ca | ||
|
|
8813c9936d | ||
|
|
abe7068197 | ||
|
|
d7f0872690 | ||
|
|
df75659778 | ||
|
|
c32663bb32 | ||
|
|
c94eed432d | ||
|
|
a73a879238 | ||
|
|
a8500a2a8a | ||
|
|
718962c188 | ||
|
|
e6190ec275 | ||
|
|
13e8f70438 | ||
|
|
ea206235c5 | ||
|
|
dc0103a155 | ||
|
|
31ec06b576 | ||
|
|
17a58b4c22 | ||
|
|
56564092bc | ||
|
|
2b546fce9f | ||
|
|
69a065eeed | ||
|
|
a7c01e039d | ||
|
|
4639833bdb | ||
|
|
bf6fe2b4fb | ||
|
|
04d2ebacca | ||
|
|
e44fd9ed78 | ||
|
|
526d35edfe | ||
|
|
2ec68c29de | ||
|
|
c761661386 | ||
|
|
142e7fcc02 | ||
|
|
e928111c00 | ||
|
|
0665ded648 | ||
|
|
b9a8a62e38 | ||
|
|
74bbaaf643 | ||
|
|
5799ea8160 | ||
|
|
3dc2453deb | ||
|
|
d2b3965bc2 | ||
|
|
e4da571d6b | ||
|
|
5e45480a0e | ||
|
|
90c1e10cc5 | ||
|
|
0255b09e0e | ||
|
|
bd21325d04 | ||
|
|
9bc2a6fa2b | ||
|
|
cb3f0fdcbd | ||
|
|
b8628bb495 | ||
|
|
9c26f79ca6 | ||
|
|
30f9b84d5f | ||
|
|
1318d23401 | ||
|
|
9fb71a30ec | ||
|
|
abd34f1810 | ||
|
|
6a472437bb | ||
|
|
43b97bca75 | ||
|
|
a667bd456c | ||
|
|
c6de7cf784 | ||
|
|
59deaad070 | ||
|
|
7709799bc2 | ||
|
|
d59138363e | ||
|
|
faaf2009b6 | ||
|
|
66c9691c87 | ||
|
|
73d09e7c1c | ||
|
|
3a508e71aa | ||
|
|
a1d7a76349 | ||
|
|
5ea65eda5a | ||
|
|
29347b9b4d | ||
|
|
a06d528d3b | ||
|
|
ac0fd4b3fc | ||
|
|
47783feecb | ||
|
|
fad8955397 | ||
|
|
d0bcf06e5f | ||
|
|
fed03f88c8 | ||
|
|
b6afcc222a | ||
|
|
4bcc33569a | ||
|
|
46a79c6bb5 | ||
|
|
25d45fd9db | ||
|
|
c5795492e1 | ||
|
|
e86d9f9241 | ||
|
|
3db4ea30a3 | ||
|
|
a3acd6bda5 | ||
|
|
12a3b1f83e | ||
|
|
cf2df815e3 | ||
|
|
f03e4fd049 | ||
|
|
75bf674537 | ||
|
|
c3b1b16d11 | ||
|
|
d8b9159125 | ||
|
|
a30617d971 | ||
|
|
c7d824fbf3 | ||
|
|
2335259dd6 | ||
|
|
64686c92cd | ||
|
|
3cbc4e5570 | ||
|
|
d3f49c72e1 | ||
|
|
f460a6573c | ||
|
|
26a0b88937 | ||
|
|
a3ca8a721d | ||
|
|
bdaebe1218 | ||
|
|
f76dbb08cc | ||
|
|
5ac2ece8b4 | ||
|
|
37cd743315 | ||
|
|
c0c772b11b | ||
|
|
ccc78c3516 | ||
|
|
09b7aab886 | ||
|
|
ce3eac9d8a | ||
|
|
a762d00aa8 | ||
|
|
e5b3c12814 | ||
|
|
df73d0263a | ||
|
|
2affb6d1e7 | ||
|
|
4cc6a28e73 | ||
|
|
89881bfd7e | ||
|
|
458e30e2be | ||
|
|
5aaadf4e5a | ||
|
|
c750158286 | ||
|
|
80dee91ab9 | ||
|
|
0cfe5ae0bb | ||
|
|
b6d4ded29a | ||
|
|
6d981e21ff | ||
|
|
38afb8b8eb | ||
|
|
6efb172fb2 | ||
|
|
3332835417 | ||
|
|
ec34b23688 | ||
|
|
e4c43548eb | ||
|
|
fc6306f44a | ||
|
|
520b2450e3 | ||
|
|
c96119a9fd | ||
|
|
5242b3cb03 | ||
|
|
21cb086b87 | ||
|
|
c4d0d38e69 | ||
|
|
eecdd4befc | ||
|
|
804490399f | ||
|
|
47bb1c0b37 | ||
|
|
064bae7b87 | ||
|
|
ebfbb4b56f | ||
|
|
35203da9c3 | ||
|
|
b4dff4dd0c | ||
|
|
68fc171a31 | ||
|
|
fb1c20ed30 | ||
|
|
a31c4f5254 | ||
|
|
570cc16c98 | ||
|
|
d796fcba8f | ||
|
|
ad7a6e60f2 | ||
|
|
7c02075ba6 | ||
|
|
a83165f112 | ||
|
|
8ad90314fd | ||
|
|
e2db20b1f3 | ||
|
|
2e26a7f82d | ||
|
|
313fda32c0 | ||
|
|
28c0bd8592 | ||
|
|
e87d20b08d | ||
|
|
ce32b88010 | ||
|
|
9f82afa485 | ||
|
|
5589aad730 | ||
|
|
5f8b044577 | ||
|
|
924f5af2ed | ||
|
|
a5acd5f322 | ||
|
|
dff4cc6cbf | ||
|
|
4532f98a94 | ||
|
|
c09d41bd40 | ||
|
|
fc26902d1d | ||
|
|
a427bfe1e1 | ||
|
|
5b1b9b011a | ||
|
|
97ea56e777 | ||
|
|
91a40ab079 | ||
|
|
4ea1d9a1f4 | ||
|
|
33dc2f41a9 | ||
|
|
6793d4a3a0 | ||
|
|
4c6bf55c8a | ||
|
|
a977cadfda | ||
|
|
381069afc7 | ||
|
|
3c14af4a28 | ||
|
|
c3476be9e4 | ||
|
|
519cdb642c | ||
|
|
2c1e23fdbd | ||
|
|
7f865d73f0 | ||
|
|
d98db1587b | ||
|
|
34ff3aa99a | ||
|
|
7177a534b9 | ||
|
|
3e7ad705bb | ||
|
|
ac1503d246 | ||
|
|
26732ed42c |
+1
-1
@@ -1,6 +1,6 @@
|
||||
# These are supported funding model platforms
|
||||
|
||||
github: # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2]
|
||||
github: CalcProgrammer1
|
||||
patreon: CalcProgrammer1
|
||||
open_collective: # Replace with a single Open Collective username
|
||||
ko_fi: # Replace with a single Ko-fi username
|
||||
|
||||
@@ -28,6 +28,7 @@ Build/
|
||||
.qmake.stash
|
||||
.vscode
|
||||
.vs
|
||||
.idea
|
||||
|
||||
# Generic Files
|
||||
.DS_Store
|
||||
|
||||
+130
-220
@@ -65,22 +65,22 @@ before_script:
|
||||
- !reference [.upstream_rules, rules]
|
||||
|
||||
#-----------------------------------------------------------------------#
|
||||
# Linux (AppImage) i386 Build Target #
|
||||
# OpenRGB Common Appimage Build Steps #
|
||||
#-----------------------------------------------------------------------#
|
||||
"Linux i386 AppImage":
|
||||
image: registry.gitlab.com/openrgbdevelopers/openrgb-linux-ci-deb-builder:bookworm-i386
|
||||
.hidden_appimage_script: &appimage_script_steps
|
||||
image: registry.gitlab.com/openrgbdevelopers/openrgb-linux-ci-deb-builder:bookworm-${TGT_ARCH}
|
||||
tags:
|
||||
- linux
|
||||
- i386
|
||||
- ${TGT_ARCH}
|
||||
stage: build
|
||||
script:
|
||||
- export $(dpkg-architecture)
|
||||
- ./scripts/build-appimage.sh
|
||||
- ./scripts/build-appimage.sh ${TGT_QT}
|
||||
|
||||
artifacts:
|
||||
name: "${CI_PROJECT_NAME}_Linux_i386_${CI_COMMIT_SHORT_SHA}"
|
||||
name: "${CI_PROJECT_NAME}_Linux_${TGT_NAME}_${CI_COMMIT_SHORT_SHA}"
|
||||
paths:
|
||||
- OpenRGB-i386.AppImage
|
||||
- OpenRGB-${TGT_PATH}.AppImage
|
||||
- 60-openrgb.rules
|
||||
- README.md
|
||||
expire_in: 30 days
|
||||
@@ -88,62 +88,43 @@ before_script:
|
||||
rules:
|
||||
- !reference [.upstream_rules, rules]
|
||||
|
||||
#-----------------------------------------------------------------------#
|
||||
# Linux (AppImage) i386 Build Target #
|
||||
#-----------------------------------------------------------------------#
|
||||
"Linux i386 AppImage":
|
||||
variables:
|
||||
TGT_ARCH: "i386"
|
||||
TGT_QT: ""
|
||||
TGT_NAME: "${TGT_ARCH}"
|
||||
TGT_PATH: "${TGT_ARCH}"
|
||||
<<: *appimage_script_steps
|
||||
|
||||
#-----------------------------------------------------------------------#
|
||||
# Linux (AppImage) Qt6 i386 Build Target #
|
||||
#-----------------------------------------------------------------------#
|
||||
"Linux i386 AppImage Qt6":
|
||||
image: registry.gitlab.com/openrgbdevelopers/openrgb-linux-ci-deb-builder:bookworm-i386
|
||||
tags:
|
||||
- linux
|
||||
- i386
|
||||
stage: build
|
||||
script:
|
||||
- export $(dpkg-architecture)
|
||||
- ./scripts/build-appimage.sh qt6
|
||||
|
||||
artifacts:
|
||||
name: "${CI_PROJECT_NAME}_Linux_i386_Qt6_${CI_COMMIT_SHORT_SHA}"
|
||||
paths:
|
||||
- OpenRGB-i386.AppImage
|
||||
- 60-openrgb.rules
|
||||
- README.md
|
||||
expire_in: 30 days
|
||||
|
||||
rules:
|
||||
- !reference [.upstream_rules, rules]
|
||||
variables:
|
||||
TGT_ARCH: "i386"
|
||||
TGT_QT: "qt6"
|
||||
TGT_NAME: "${TGT_ARCH}_${TGT_QT^}"
|
||||
TGT_PATH: "${TGT_ARCH}"
|
||||
<<: *appimage_script_steps
|
||||
|
||||
#-----------------------------------------------------------------------#
|
||||
# Linux (AppImage) amd64 Build Target #
|
||||
#-----------------------------------------------------------------------#
|
||||
"Linux amd64 AppImage Base":
|
||||
image: registry.gitlab.com/openrgbdevelopers/openrgb-linux-ci-deb-builder:bookworm-amd64
|
||||
stage: build
|
||||
script:
|
||||
- export $(dpkg-architecture)
|
||||
- ./scripts/build-appimage.sh
|
||||
|
||||
artifacts:
|
||||
name: "${CI_PROJECT_NAME}_Linux_amd64_${CI_COMMIT_SHORT_SHA}"
|
||||
paths:
|
||||
- OpenRGB-x86_64.AppImage
|
||||
- 60-openrgb.rules
|
||||
- README.md
|
||||
expire_in: 30 days
|
||||
|
||||
rules:
|
||||
- if: $CI_PIPELINE_SOURCE == "merge_request_event" || $CI_PIPELINE_SOURCE == "push"
|
||||
when: never
|
||||
|
||||
"Linux amd64 AppImage":
|
||||
extends: "Linux amd64 AppImage Base"
|
||||
variables:
|
||||
TGT_ARCH: "amd64"
|
||||
TGT_QT: ""
|
||||
TGT_NAME: "${TGT_ARCH}"
|
||||
TGT_PATH: "x86_64"
|
||||
<<: *appimage_script_steps
|
||||
rules:
|
||||
- !reference [.fork_local_runner_rules, rules]
|
||||
tags:
|
||||
- linux
|
||||
- amd64
|
||||
|
||||
"Linux amd64 AppImage (gitlab.com runner)":
|
||||
extends: "Linux amd64 AppImage Base"
|
||||
extends: "Linux amd64 AppImage"
|
||||
rules:
|
||||
- !reference [.fork_gitlab_runner_rules, rules]
|
||||
tags:
|
||||
@@ -153,119 +134,80 @@ before_script:
|
||||
# Linux (AppImage) Qt6 amd64 Build Target #
|
||||
#-----------------------------------------------------------------------#
|
||||
"Linux amd64 AppImage Qt6":
|
||||
image: registry.gitlab.com/openrgbdevelopers/openrgb-linux-ci-deb-builder:bookworm-amd64
|
||||
tags:
|
||||
- linux
|
||||
- amd64
|
||||
stage: build
|
||||
script:
|
||||
- export $(dpkg-architecture)
|
||||
- ./scripts/build-appimage.sh qt6
|
||||
|
||||
artifacts:
|
||||
name: "${CI_PROJECT_NAME}_Linux_amd64_Qt6_${CI_COMMIT_SHORT_SHA}"
|
||||
paths:
|
||||
- OpenRGB-amd64.AppImage
|
||||
- 60-openrgb.rules
|
||||
- README.md
|
||||
expire_in: 30 days
|
||||
|
||||
rules:
|
||||
- !reference [.upstream_rules, rules]
|
||||
variables:
|
||||
TGT_ARCH: "amd64"
|
||||
TGT_QT: "qt6"
|
||||
TGT_NAME: "${TGT_ARCH}_${TGT_QT^}"
|
||||
TGT_PATH: "x86_64"
|
||||
<<: *appimage_script_steps
|
||||
|
||||
#-----------------------------------------------------------------------#
|
||||
# Linux (AppImage) armhf Build Target #
|
||||
#-----------------------------------------------------------------------#
|
||||
"Linux armhf AppImage":
|
||||
image: registry.gitlab.com/openrgbdevelopers/openrgb-linux-ci-deb-builder:bookworm-armhf
|
||||
tags:
|
||||
- linux
|
||||
- armhf
|
||||
stage: build
|
||||
script:
|
||||
- export $(dpkg-architecture)
|
||||
- ./scripts/build-appimage.sh
|
||||
|
||||
artifacts:
|
||||
name: "${CI_PROJECT_NAME}_Linux_armhf_${CI_COMMIT_SHORT_SHA}"
|
||||
paths:
|
||||
- OpenRGB-armhf.AppImage
|
||||
- 60-openrgb.rules
|
||||
- README.md
|
||||
expire_in: 30 days
|
||||
|
||||
rules:
|
||||
- !reference [.upstream_rules, rules]
|
||||
variables:
|
||||
TGT_ARCH: "armhf"
|
||||
TGT_QT: ""
|
||||
TGT_NAME: "${TGT_ARCH}"
|
||||
TGT_PATH: "${TGT_ARCH}"
|
||||
<<: *appimage_script_steps
|
||||
|
||||
#-----------------------------------------------------------------------#
|
||||
# Linux (AppImage) Qt6 armhf Build Target #
|
||||
#-----------------------------------------------------------------------#
|
||||
"Linux armhf AppImage Qt6":
|
||||
image: registry.gitlab.com/openrgbdevelopers/openrgb-linux-ci-deb-builder:bookworm-armhf
|
||||
tags:
|
||||
- linux
|
||||
- armhf
|
||||
stage: build
|
||||
script:
|
||||
- export $(dpkg-architecture)
|
||||
- ./scripts/build-appimage.sh qt6
|
||||
|
||||
artifacts:
|
||||
name: "${CI_PROJECT_NAME}_Linux_armhf_Qt6_${CI_COMMIT_SHORT_SHA}"
|
||||
paths:
|
||||
- OpenRGB-armhf.AppImage
|
||||
- 60-openrgb.rules
|
||||
- README.md
|
||||
expire_in: 30 days
|
||||
|
||||
rules:
|
||||
- !reference [.upstream_rules, rules]
|
||||
variables:
|
||||
TGT_ARCH: "armhf"
|
||||
TGT_QT: "qt6"
|
||||
TGT_NAME: "${TGT_ARCH}_${TGT_QT^}"
|
||||
TGT_PATH: "${TGT_ARCH}"
|
||||
<<: *appimage_script_steps
|
||||
|
||||
#-----------------------------------------------------------------------#
|
||||
# Linux (AppImage) arm64 Build Target #
|
||||
#-----------------------------------------------------------------------#
|
||||
"Linux arm64 AppImage":
|
||||
image: registry.gitlab.com/openrgbdevelopers/openrgb-linux-ci-deb-builder:bookworm-arm64
|
||||
tags:
|
||||
- linux
|
||||
- arm64
|
||||
stage: build
|
||||
script:
|
||||
- export $(dpkg-architecture)
|
||||
- ./scripts/build-appimage.sh
|
||||
|
||||
artifacts:
|
||||
name: "${CI_PROJECT_NAME}_Linux_arm64_${CI_COMMIT_SHORT_SHA}"
|
||||
paths:
|
||||
- OpenRGB-arm64.AppImage
|
||||
- 60-openrgb.rules
|
||||
- README.md
|
||||
expire_in: 30 days
|
||||
|
||||
rules:
|
||||
- !reference [.upstream_rules, rules]
|
||||
variables:
|
||||
TGT_ARCH: "arm64"
|
||||
TGT_QT: ""
|
||||
TGT_NAME: "${TGT_ARCH}"
|
||||
TGT_PATH: "${TGT_ARCH}"
|
||||
<<: *appimage_script_steps
|
||||
|
||||
#-----------------------------------------------------------------------#
|
||||
# Linux (AppImage) Qt6 arm64 Build Target #
|
||||
#-----------------------------------------------------------------------#
|
||||
"Linux arm64 AppImage Qt6":
|
||||
image: registry.gitlab.com/openrgbdevelopers/openrgb-linux-ci-deb-builder:bookworm-arm64
|
||||
variables:
|
||||
TGT_ARCH: "arm64"
|
||||
TGT_QT: "qt6"
|
||||
TGT_NAME: "${TGT_ARCH}_${TGT_QT^}"
|
||||
TGT_PATH: "${TGT_ARCH}"
|
||||
<<: *appimage_script_steps
|
||||
|
||||
#-----------------------------------------------------------------------#
|
||||
# OpenRGB Common Debian Build Steps #
|
||||
#-----------------------------------------------------------------------#
|
||||
.hidden_deb_script: &debian_script_steps
|
||||
stage: build
|
||||
image: registry.gitlab.com/openrgbdevelopers/openrgb-linux-ci-deb-builder:$TGT_DEB-$TGT_ARCH
|
||||
tags:
|
||||
- linux
|
||||
- arm64
|
||||
stage: build
|
||||
- $TGT_ARCH
|
||||
script:
|
||||
- export $(dpkg-architecture)
|
||||
- ./scripts/build-appimage.sh qt6
|
||||
- ./scripts/build-package-files.sh debian/changelog
|
||||
- dpkg-architecture -l
|
||||
- dpkg-buildpackage -us -B
|
||||
- rm -v ../openrgb-dbgsym*.deb
|
||||
- mv -v ../openrgb*.deb ./
|
||||
|
||||
artifacts:
|
||||
name: "${CI_PROJECT_NAME}_Linux_arm64_Qt6_${CI_COMMIT_SHORT_SHA}"
|
||||
name: "${CI_PROJECT_NAME}_Linux_${TGT_ARCH}_deb_${CI_COMMIT_SHORT_SHA}"
|
||||
paths:
|
||||
- OpenRGB-arm64.AppImage
|
||||
- 60-openrgb.rules
|
||||
- README.md
|
||||
- openrgb*.deb
|
||||
exclude:
|
||||
- openrgb-dbgsym*.deb
|
||||
expire_in: 30 days
|
||||
|
||||
rules:
|
||||
- !reference [.upstream_rules, rules]
|
||||
|
||||
@@ -273,109 +215,73 @@ before_script:
|
||||
# Linux (.deb) Debian Bookworm i386 Build Target #
|
||||
#-----------------------------------------------------------------------#
|
||||
"Linux i386 .deb (Debian Bookworm)":
|
||||
image: registry.gitlab.com/openrgbdevelopers/openrgb-linux-ci-deb-builder:bookworm-i386
|
||||
tags:
|
||||
- linux
|
||||
- i386
|
||||
stage: build
|
||||
script:
|
||||
- ./scripts/build-package-files.sh debian/changelog
|
||||
- dpkg-architecture -l
|
||||
- dpkg-buildpackage -us -B
|
||||
- rm -v ../openrgb-dbgsym*.deb
|
||||
- mv -v ../openrgb*.deb ./
|
||||
variables:
|
||||
TGT_ARCH: "i386"
|
||||
TGT_DEB: "bookworm"
|
||||
<<: *debian_script_steps
|
||||
|
||||
artifacts:
|
||||
name: "${CI_PROJECT_NAME}_Linux_i386_deb_${CI_COMMIT_SHORT_SHA}"
|
||||
paths:
|
||||
- openrgb*.deb
|
||||
exclude:
|
||||
- openrgb-dbgsym*.deb
|
||||
expire_in: 30 days
|
||||
|
||||
rules:
|
||||
- !reference [.upstream_rules, rules]
|
||||
#-----------------------------------------------------------------------#
|
||||
# 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 amd64 .deb (Debian Bookworm)":
|
||||
image: registry.gitlab.com/openrgbdevelopers/openrgb-linux-ci-deb-builder:bookworm-amd64
|
||||
tags:
|
||||
- linux
|
||||
- amd64
|
||||
stage: build
|
||||
script:
|
||||
- ./scripts/build-package-files.sh debian/changelog
|
||||
- dpkg-architecture -l
|
||||
- dpkg-buildpackage -us -B
|
||||
- rm -v ../openrgb-dbgsym*.deb
|
||||
- mv -v ../openrgb*.deb ./
|
||||
variables:
|
||||
TGT_ARCH: "amd64"
|
||||
TGT_DEB: "bookworm"
|
||||
<<: *debian_script_steps
|
||||
|
||||
artifacts:
|
||||
name: "${CI_PROJECT_NAME}_Linux_amd64_deb_${CI_COMMIT_SHORT_SHA}"
|
||||
paths:
|
||||
- openrgb*.deb
|
||||
exclude:
|
||||
- openrgb-dbgsym*.deb
|
||||
expire_in: 30 days
|
||||
|
||||
rules:
|
||||
- !reference [.upstream_rules, rules]
|
||||
#-----------------------------------------------------------------------#
|
||||
# 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 armhf .deb (Debian Bookworm)":
|
||||
image: registry.gitlab.com/openrgbdevelopers/openrgb-linux-ci-deb-builder:bookworm-armhf
|
||||
tags:
|
||||
- linux
|
||||
- armhf
|
||||
stage: build
|
||||
script:
|
||||
- ./scripts/build-package-files.sh debian/changelog
|
||||
- dpkg-architecture -l
|
||||
- dpkg-buildpackage -us -B
|
||||
- rm -v ../openrgb-dbgsym*.deb
|
||||
- mv -v ../openrgb*.deb ./
|
||||
variables:
|
||||
TGT_ARCH: "armhf"
|
||||
TGT_DEB: "bookworm"
|
||||
<<: *debian_script_steps
|
||||
|
||||
artifacts:
|
||||
name: "${CI_PROJECT_NAME}_Linux_armhf_deb_${CI_COMMIT_SHORT_SHA}"
|
||||
paths:
|
||||
- openrgb*.deb
|
||||
exclude:
|
||||
- openrgb-dbgsym*.deb
|
||||
expire_in: 30 days
|
||||
|
||||
rules:
|
||||
- !reference [.upstream_rules, rules]
|
||||
#-----------------------------------------------------------------------#
|
||||
# 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 arm64 .deb (Debian Bookworm)":
|
||||
image: registry.gitlab.com/openrgbdevelopers/openrgb-linux-ci-deb-builder:bookworm-arm64
|
||||
tags:
|
||||
- linux
|
||||
- arm64
|
||||
stage: build
|
||||
script:
|
||||
- ./scripts/build-package-files.sh debian/changelog
|
||||
- dpkg-architecture -l
|
||||
- dpkg-buildpackage -us -B
|
||||
- rm -v ../openrgb-dbgsym*.deb
|
||||
- mv -v ../openrgb*.deb ./
|
||||
variables:
|
||||
TGT_ARCH: "arm64"
|
||||
TGT_DEB: "bookworm"
|
||||
<<: *debian_script_steps
|
||||
|
||||
artifacts:
|
||||
name: "${CI_PROJECT_NAME}_Linux_arm64_deb_${CI_COMMIT_SHORT_SHA}"
|
||||
paths:
|
||||
- openrgb*.deb
|
||||
exclude:
|
||||
- openrgb-dbgsym*.deb
|
||||
expire_in: 30 days
|
||||
|
||||
rules:
|
||||
- !reference [.upstream_rules, rules]
|
||||
#-----------------------------------------------------------------------#
|
||||
# Linux (.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 #
|
||||
@@ -492,6 +398,7 @@ before_script:
|
||||
- .shared_windows_runners
|
||||
stage: build
|
||||
script:
|
||||
- Set-MpPreference -DisableRealtimeMonitoring $true
|
||||
- scripts\build-windows.bat 5.15.0 2019 32
|
||||
artifacts:
|
||||
name: "${CI_PROJECT_NAME}_Windows_32_${CI_COMMIT_SHORT_SHA}"
|
||||
@@ -512,6 +419,7 @@ before_script:
|
||||
- .shared_windows_runners
|
||||
stage: build
|
||||
script:
|
||||
- Set-MpPreference -DisableRealtimeMonitoring $true
|
||||
- scripts\build-windows.bat 6.8.3 2022 32
|
||||
artifacts:
|
||||
name: "${CI_PROJECT_NAME}_Windows_32_Qt6_${CI_COMMIT_SHORT_SHA}"
|
||||
@@ -532,6 +440,7 @@ before_script:
|
||||
- .shared_windows_runners
|
||||
stage: build
|
||||
script:
|
||||
- Set-MpPreference -DisableRealtimeMonitoring $true
|
||||
- scripts\build-windows.bat 5.15.0 2019 64
|
||||
artifacts:
|
||||
name: "${CI_PROJECT_NAME}_Windows_64_${CI_COMMIT_SHORT_SHA}"
|
||||
@@ -571,6 +480,7 @@ before_script:
|
||||
- .shared_windows_runners
|
||||
stage: build
|
||||
script:
|
||||
- Set-MpPreference -DisableRealtimeMonitoring $true
|
||||
- scripts\build-windows.bat 6.8.3 2022 64
|
||||
artifacts:
|
||||
name: "${CI_PROJECT_NAME}_Windows_64_Qt6_${CI_COMMIT_SHORT_SHA}"
|
||||
|
||||
@@ -23,7 +23,7 @@ Please add a link to the manufacturer's product page beneath this line
|
||||
~"DeviceType::IDK" <!-- I Don't know -->
|
||||
~"DeviceType::USB" <!-- The device connects to an internal header or external usb port -->
|
||||
~"DeviceType::GPU::AMD" <!-- The device is an AMD GPU -->
|
||||
~"DeviceType::GPU::Nvidia" <!-- The device is a Nvidia GPU -->
|
||||
~"DeviceType::GPU::NVidia" <!-- The device is a Nvidia GPU -->
|
||||
~"DeviceType::SMBus" <!-- The device is connected to the SMBus eg. RAM -->
|
||||
~"DeviceType::WMI" <!-- The device is controlled through Windows Management Instrumentation -->
|
||||
|
||||
|
||||
@@ -26,21 +26,21 @@ bool AutoStart::DisableAutoStart()
|
||||
std::error_code autostart_file_remove_errcode;
|
||||
bool success = false;
|
||||
|
||||
/*-------------------------------------------------*\
|
||||
| Check if the filename is valid |
|
||||
\*-------------------------------------------------*/
|
||||
/*-----------------------------------------------------*\
|
||||
| Check if the filename is valid |
|
||||
\*-----------------------------------------------------*/
|
||||
if(autostart_file != "")
|
||||
{
|
||||
/*---------------------------------------------*\
|
||||
| If file doesn't exist, disable is successful |
|
||||
\*---------------------------------------------*/
|
||||
/*-------------------------------------------------*\
|
||||
| If file doesn't exist, disable is successful |
|
||||
\*-------------------------------------------------*/
|
||||
if(!filesystem::exists(autostart_file))
|
||||
{
|
||||
success = true;
|
||||
}
|
||||
/*---------------------------------------------*\
|
||||
| Otherwise, delete the file |
|
||||
\*---------------------------------------------*/
|
||||
/*-------------------------------------------------*\
|
||||
| Otherwise, delete the file |
|
||||
\*-------------------------------------------------*/
|
||||
else
|
||||
{
|
||||
success = filesystem::remove(autostart_file, autostart_file_remove_errcode);
|
||||
@@ -63,27 +63,26 @@ bool AutoStart::EnableAutoStart(AutoStartInfo autostart_info)
|
||||
{
|
||||
bool success = false;
|
||||
|
||||
/*-------------------------------------------------*\
|
||||
| Check if the filename is valid |
|
||||
\*-------------------------------------------------*/
|
||||
/*-----------------------------------------------------*\
|
||||
| Check if the filename is valid |
|
||||
\*-----------------------------------------------------*/
|
||||
if(autostart_file != "")
|
||||
{
|
||||
std::ofstream autostart_file_stream(autostart_file, std::ios::out | std::ios::trunc);
|
||||
|
||||
/*---------------------------------------------*\
|
||||
| Error out if the file could not be opened |
|
||||
\*---------------------------------------------*/
|
||||
/*-------------------------------------------------*\
|
||||
| Error out if the file could not be opened |
|
||||
\*-------------------------------------------------*/
|
||||
if(!autostart_file_stream)
|
||||
{
|
||||
LOG_ERROR("[AutoStart] Could not open %s for writing.", autostart_file.c_str());
|
||||
success = false;
|
||||
}
|
||||
/*---------------------------------------------*\
|
||||
| Otherwise, write the file |
|
||||
\*---------------------------------------------*/
|
||||
/*-------------------------------------------------*\
|
||||
| Otherwise, write the file |
|
||||
\*-------------------------------------------------*/
|
||||
else
|
||||
{
|
||||
//autostart_file_stream << desktop_file;
|
||||
autostart_file_stream.close();
|
||||
success = !autostart_file_stream.fail();
|
||||
|
||||
@@ -103,9 +102,9 @@ bool AutoStart::EnableAutoStart(AutoStartInfo autostart_info)
|
||||
|
||||
bool AutoStart::IsAutoStartEnabled()
|
||||
{
|
||||
/*-------------------------------------------------*\
|
||||
| Check if the filename is valid |
|
||||
\*-------------------------------------------------*/
|
||||
/*-----------------------------------------------------*\
|
||||
| Check if the filename is valid |
|
||||
\*-----------------------------------------------------*/
|
||||
if(autostart_file != "")
|
||||
{
|
||||
return(filesystem::exists(autostart_file));
|
||||
@@ -118,9 +117,9 @@ bool AutoStart::IsAutoStartEnabled()
|
||||
|
||||
std::string AutoStart::GetExePath()
|
||||
{
|
||||
/*-------------------------------------------------*\
|
||||
| Create the OpenRGB executable path |
|
||||
\*-------------------------------------------------*/
|
||||
/*-----------------------------------------------------*\
|
||||
| Create the OpenRGB executable path |
|
||||
\*-----------------------------------------------------*/
|
||||
char exepath[ PATH_MAX ];
|
||||
|
||||
ssize_t count = readlink("/proc/self/exe", exepath, PATH_MAX);
|
||||
@@ -134,16 +133,16 @@ void AutoStart::InitAutoStart(std::string name)
|
||||
|
||||
autostart_name = name;
|
||||
|
||||
/*-------------------------------------------------*\
|
||||
| Get home and config paths |
|
||||
\*-------------------------------------------------*/
|
||||
/*-----------------------------------------------------*\
|
||||
| Get home and config paths |
|
||||
\*-----------------------------------------------------*/
|
||||
const char *xdg_config_home = getenv("XDG_CONFIG_HOME");
|
||||
const char *home = getenv("HOME");
|
||||
|
||||
/*-------------------------------------------------*\
|
||||
| Determine where the autostart .desktop files are |
|
||||
| kept |
|
||||
\*-------------------------------------------------*/
|
||||
/*-----------------------------------------------------*\
|
||||
| Determine where the autostart .desktop files are |
|
||||
| kept |
|
||||
\*-----------------------------------------------------*/
|
||||
if(xdg_config_home != NULL)
|
||||
{
|
||||
autostart_dir = xdg_config_home;
|
||||
@@ -155,9 +154,9 @@ void AutoStart::InitAutoStart(std::string name)
|
||||
autostart_dir = autostart_dir + "/.config/autostart/";
|
||||
}
|
||||
|
||||
/*-------------------------------------------------*\
|
||||
| Check if the filename is valid |
|
||||
\*-------------------------------------------------*/
|
||||
/*-----------------------------------------------------*\
|
||||
| Check if the filename is valid |
|
||||
\*-----------------------------------------------------*/
|
||||
if(autostart_dir != "")
|
||||
{
|
||||
std::error_code ec;
|
||||
|
||||
@@ -26,21 +26,21 @@ bool AutoStart::DisableAutoStart()
|
||||
std::error_code autostart_file_remove_errcode;
|
||||
bool success = false;
|
||||
|
||||
/*-------------------------------------------------*\
|
||||
| Check if the filename is valid |
|
||||
\*-------------------------------------------------*/
|
||||
/*-----------------------------------------------------*\
|
||||
| Check if the filename is valid |
|
||||
\*-----------------------------------------------------*/
|
||||
if(autostart_file != "")
|
||||
{
|
||||
/*---------------------------------------------*\
|
||||
| If file doesn't exist, disable is successful |
|
||||
\*---------------------------------------------*/
|
||||
/*-------------------------------------------------*\
|
||||
| If file doesn't exist, disable is successful |
|
||||
\*-------------------------------------------------*/
|
||||
if(!filesystem::exists(autostart_file))
|
||||
{
|
||||
success = true;
|
||||
}
|
||||
/*---------------------------------------------*\
|
||||
| Otherwise, delete the file |
|
||||
\*---------------------------------------------*/
|
||||
/*-------------------------------------------------*\
|
||||
| Otherwise, delete the file |
|
||||
\*-------------------------------------------------*/
|
||||
else
|
||||
{
|
||||
success = filesystem::remove(autostart_file, autostart_file_remove_errcode);
|
||||
@@ -63,25 +63,25 @@ bool AutoStart::EnableAutoStart(AutoStartInfo autostart_info)
|
||||
{
|
||||
bool success = false;
|
||||
|
||||
/*-------------------------------------------------*\
|
||||
| Check if the filename is valid |
|
||||
\*-------------------------------------------------*/
|
||||
/*-----------------------------------------------------*\
|
||||
| Check if the filename is valid |
|
||||
\*-----------------------------------------------------*/
|
||||
if(autostart_file != "")
|
||||
{
|
||||
std::string desktop_file = GenerateDesktopFile(autostart_info);
|
||||
std::ofstream autostart_file_stream(autostart_file, std::ios::out | std::ios::trunc);
|
||||
|
||||
/*---------------------------------------------*\
|
||||
| Error out if the file could not be opened |
|
||||
\*---------------------------------------------*/
|
||||
/*-------------------------------------------------*\
|
||||
| Error out if the file could not be opened |
|
||||
\*-------------------------------------------------*/
|
||||
if(!autostart_file_stream)
|
||||
{
|
||||
LOG_ERROR("[AutoStart] Could not open %s for writing.", autostart_file.c_str());
|
||||
success = false;
|
||||
}
|
||||
/*---------------------------------------------*\
|
||||
| Otherwise, write the file |
|
||||
\*---------------------------------------------*/
|
||||
/*-------------------------------------------------*\
|
||||
| Otherwise, write the file |
|
||||
\*-------------------------------------------------*/
|
||||
else
|
||||
{
|
||||
autostart_file_stream << desktop_file;
|
||||
@@ -104,9 +104,9 @@ bool AutoStart::EnableAutoStart(AutoStartInfo autostart_info)
|
||||
|
||||
bool AutoStart::IsAutoStartEnabled()
|
||||
{
|
||||
/*-------------------------------------------------*\
|
||||
| Check if the filename is valid |
|
||||
\*-------------------------------------------------*/
|
||||
/*-----------------------------------------------------*\
|
||||
| Check if the filename is valid |
|
||||
\*-----------------------------------------------------*/
|
||||
if(autostart_file != "")
|
||||
{
|
||||
return(filesystem::exists(autostart_file));
|
||||
@@ -119,9 +119,9 @@ bool AutoStart::IsAutoStartEnabled()
|
||||
|
||||
std::string AutoStart::GetExePath()
|
||||
{
|
||||
/*-------------------------------------------------*\
|
||||
| Create the OpenRGB executable path |
|
||||
\*-------------------------------------------------*/
|
||||
/*-----------------------------------------------------*\
|
||||
| Create the OpenRGB executable path |
|
||||
\*-----------------------------------------------------*/
|
||||
char exepath[ PATH_MAX ];
|
||||
|
||||
ssize_t count = readlink("/proc/self/exe", exepath, PATH_MAX);
|
||||
@@ -129,17 +129,17 @@ std::string AutoStart::GetExePath()
|
||||
return(std::string(exepath, (count > 0) ? count : 0));
|
||||
}
|
||||
|
||||
/*-----------------------------------------------------*\
|
||||
| Linux AutoStart Implementation |
|
||||
| Private Methods |
|
||||
\*-----------------------------------------------------*/
|
||||
/*---------------------------------------------------------*\
|
||||
| Linux AutoStart Implementation |
|
||||
| Private Methods |
|
||||
\*---------------------------------------------------------*/
|
||||
|
||||
std::string AutoStart::GenerateDesktopFile(AutoStartInfo autostart_info)
|
||||
{
|
||||
/*-------------------------------------------------*\
|
||||
| Generate a .desktop file from the AutoStart |
|
||||
| parameters |
|
||||
\*-------------------------------------------------*/
|
||||
/*-----------------------------------------------------*\
|
||||
| Generate a .desktop file from the AutoStart |
|
||||
| parameters |
|
||||
\*-----------------------------------------------------*/
|
||||
std::stringstream fileContents;
|
||||
|
||||
fileContents << "[Desktop Entry]" << std::endl;
|
||||
@@ -151,9 +151,9 @@ std::string AutoStart::GenerateDesktopFile(AutoStartInfo autostart_info)
|
||||
fileContents << "Terminal=false" << std::endl;
|
||||
fileContents << "Type=Application" << std::endl;
|
||||
|
||||
/*-------------------------------------------------*\
|
||||
| Add the executable path and arguments |
|
||||
\*-------------------------------------------------*/
|
||||
/*-----------------------------------------------------*\
|
||||
| Add the executable path and arguments |
|
||||
\*-----------------------------------------------------*/
|
||||
fileContents << "Exec=" << autostart_info.path;
|
||||
|
||||
if (autostart_info.args != "")
|
||||
@@ -172,16 +172,16 @@ void AutoStart::InitAutoStart(std::string name)
|
||||
|
||||
autostart_name = name;
|
||||
|
||||
/*-------------------------------------------------*\
|
||||
| Get home and config paths |
|
||||
\*-------------------------------------------------*/
|
||||
/*-----------------------------------------------------*\
|
||||
| Get home and config paths |
|
||||
\*-----------------------------------------------------*/
|
||||
const char *xdg_config_home = getenv("XDG_CONFIG_HOME");
|
||||
const char *home = getenv("HOME");
|
||||
|
||||
/*-------------------------------------------------*\
|
||||
| Determine where the autostart .desktop files are |
|
||||
| kept |
|
||||
\*-------------------------------------------------*/
|
||||
/*-----------------------------------------------------*\
|
||||
| Determine where the autostart .desktop files are |
|
||||
| kept |
|
||||
\*-----------------------------------------------------*/
|
||||
if(xdg_config_home != NULL)
|
||||
{
|
||||
autostart_dir = xdg_config_home;
|
||||
@@ -193,9 +193,9 @@ void AutoStart::InitAutoStart(std::string name)
|
||||
autostart_dir = autostart_dir + "/.config/autostart/";
|
||||
}
|
||||
|
||||
/*-------------------------------------------------*\
|
||||
| Check if the filename is valid |
|
||||
\*-------------------------------------------------*/
|
||||
/*-----------------------------------------------------*\
|
||||
| Check if the filename is valid |
|
||||
\*-----------------------------------------------------*/
|
||||
if(autostart_dir != "")
|
||||
{
|
||||
std::error_code ec;
|
||||
|
||||
@@ -26,21 +26,21 @@ bool AutoStart::DisableAutoStart()
|
||||
std::error_code autostart_file_remove_errcode;
|
||||
bool success = false;
|
||||
|
||||
/*-------------------------------------------------*\
|
||||
| Check if the filename is valid |
|
||||
\*-------------------------------------------------*/
|
||||
/*-----------------------------------------------------*\
|
||||
| Check if the filename is valid |
|
||||
\*-----------------------------------------------------*/
|
||||
if(autostart_file != "")
|
||||
{
|
||||
/*---------------------------------------------*\
|
||||
| If file doesn't exist, disable is successful |
|
||||
\*---------------------------------------------*/
|
||||
/*-------------------------------------------------*\
|
||||
| If file doesn't exist, disable is successful |
|
||||
\*-------------------------------------------------*/
|
||||
if(!filesystem::exists(autostart_file))
|
||||
{
|
||||
success = true;
|
||||
}
|
||||
/*---------------------------------------------*\
|
||||
| Otherwise, delete the file |
|
||||
\*---------------------------------------------*/
|
||||
/*-------------------------------------------------*\
|
||||
| Otherwise, delete the file |
|
||||
\*-------------------------------------------------*/
|
||||
else
|
||||
{
|
||||
success = filesystem::remove(autostart_file, autostart_file_remove_errcode);
|
||||
@@ -63,25 +63,25 @@ bool AutoStart::EnableAutoStart(AutoStartInfo autostart_info)
|
||||
{
|
||||
bool success = false;
|
||||
|
||||
/*-------------------------------------------------*\
|
||||
| Check if the filename is valid |
|
||||
\*-------------------------------------------------*/
|
||||
/*-----------------------------------------------------*\
|
||||
| Check if the filename is valid |
|
||||
\*-----------------------------------------------------*/
|
||||
if(autostart_file != "")
|
||||
{
|
||||
std::string desktop_file = GenerateLaunchAgentFile(autostart_info);
|
||||
std::ofstream autostart_file_stream(autostart_file, std::ios::out | std::ios::trunc);
|
||||
|
||||
/*---------------------------------------------*\
|
||||
| Error out if the file could not be opened |
|
||||
\*---------------------------------------------*/
|
||||
/*-------------------------------------------------*\
|
||||
| Error out if the file could not be opened |
|
||||
\*-------------------------------------------------*/
|
||||
if(!autostart_file_stream)
|
||||
{
|
||||
LOG_ERROR("[AutoStart] Could not open %s for writing.", autostart_file.c_str());
|
||||
success = false;
|
||||
}
|
||||
/*---------------------------------------------*\
|
||||
| Otherwise, write the file |
|
||||
\*---------------------------------------------*/
|
||||
/*-------------------------------------------------*\
|
||||
| Otherwise, write the file |
|
||||
\*-------------------------------------------------*/
|
||||
else
|
||||
{
|
||||
autostart_file_stream << desktop_file;
|
||||
@@ -104,9 +104,9 @@ bool AutoStart::EnableAutoStart(AutoStartInfo autostart_info)
|
||||
|
||||
bool AutoStart::IsAutoStartEnabled()
|
||||
{
|
||||
/*-------------------------------------------------*\
|
||||
| Check if the filename is valid |
|
||||
\*-------------------------------------------------*/
|
||||
/*-----------------------------------------------------*\
|
||||
| Check if the filename is valid |
|
||||
\*-----------------------------------------------------*/
|
||||
if(autostart_file != "")
|
||||
{
|
||||
return(filesystem::exists(autostart_file));
|
||||
@@ -119,9 +119,9 @@ bool AutoStart::IsAutoStartEnabled()
|
||||
|
||||
std::string AutoStart::GetExePath()
|
||||
{
|
||||
/*-------------------------------------------------*\
|
||||
| Create the OpenRGB executable path |
|
||||
\*-------------------------------------------------*/
|
||||
/*-----------------------------------------------------*\
|
||||
| Create the OpenRGB executable path |
|
||||
\*-----------------------------------------------------*/
|
||||
char exepath[ PATH_MAX ];
|
||||
uint32_t exesize = PATH_MAX;
|
||||
|
||||
@@ -132,17 +132,17 @@ std::string AutoStart::GetExePath()
|
||||
return("");
|
||||
}
|
||||
|
||||
/*-----------------------------------------------------*\
|
||||
| MacOS AutoStart Implementation |
|
||||
| Private Methods |
|
||||
\*-----------------------------------------------------*/
|
||||
/*---------------------------------------------------------*\
|
||||
| MacOS AutoStart Implementation |
|
||||
| Private Methods |
|
||||
\*---------------------------------------------------------*/
|
||||
|
||||
std::string AutoStart::GenerateLaunchAgentFile(AutoStartInfo autostart_info)
|
||||
{
|
||||
/*-------------------------------------------------*\
|
||||
| Generate a .plist file from the AutoStart |
|
||||
| parameters |
|
||||
\*-------------------------------------------------*/
|
||||
/*-----------------------------------------------------*\
|
||||
| Generate a .plist file from the AutoStart |
|
||||
| parameters |
|
||||
\*-----------------------------------------------------*/
|
||||
std::stringstream fileContents;
|
||||
|
||||
fileContents << "<?xml version=\"1.0\" encoding=\"UTF-8\"?>" << std::endl;
|
||||
@@ -180,16 +180,16 @@ void AutoStart::InitAutoStart(std::string name)
|
||||
|
||||
autostart_name = name;
|
||||
|
||||
/*-------------------------------------------------*\
|
||||
| Determine where the autostart .desktop files are |
|
||||
| kept |
|
||||
\*-------------------------------------------------*/
|
||||
/*-----------------------------------------------------*\
|
||||
| Determine where the autostart .desktop files are |
|
||||
| kept |
|
||||
\*-----------------------------------------------------*/
|
||||
autostart_dir = getenv("HOME");
|
||||
autostart_dir = autostart_dir + "/Library/LaunchAgents/";
|
||||
|
||||
/*-------------------------------------------------*\
|
||||
| Check if the filename is valid |
|
||||
\*-------------------------------------------------*/
|
||||
/*-----------------------------------------------------*\
|
||||
| Check if the filename is valid |
|
||||
\*-----------------------------------------------------*/
|
||||
if(autostart_dir != "")
|
||||
{
|
||||
std::error_code ec;
|
||||
|
||||
@@ -25,21 +25,21 @@ bool AutoStart::DisableAutoStart()
|
||||
std::error_code autostart_file_remove_errcode;
|
||||
bool success = false;
|
||||
|
||||
/*-------------------------------------------------*\
|
||||
| Check if the filename is valid |
|
||||
\*-------------------------------------------------*/
|
||||
/*-----------------------------------------------------*\
|
||||
| Check if the filename is valid |
|
||||
\*-----------------------------------------------------*/
|
||||
if(autostart_file != "")
|
||||
{
|
||||
/*---------------------------------------------*\
|
||||
| If file doesn't exist, disable is successful |
|
||||
\*---------------------------------------------*/
|
||||
/*-------------------------------------------------*\
|
||||
| If file doesn't exist, disable is successful |
|
||||
\*-------------------------------------------------*/
|
||||
if(!filesystem::exists(autostart_file))
|
||||
{
|
||||
success = true;
|
||||
}
|
||||
/*---------------------------------------------*\
|
||||
| Otherwise, delete the file |
|
||||
\*---------------------------------------------*/
|
||||
/*-------------------------------------------------*\
|
||||
| Otherwise, delete the file |
|
||||
\*-------------------------------------------------*/
|
||||
else
|
||||
{
|
||||
success = filesystem::remove(autostart_file, autostart_file_remove_errcode);
|
||||
@@ -62,9 +62,9 @@ bool AutoStart::EnableAutoStart(AutoStartInfo autostart_info)
|
||||
{
|
||||
bool success = false;
|
||||
|
||||
/*-------------------------------------------------*\
|
||||
| Check if the filename is valid |
|
||||
\*-------------------------------------------------*/
|
||||
/*-----------------------------------------------------*\
|
||||
| Check if the filename is valid |
|
||||
\*-----------------------------------------------------*/
|
||||
if(autostart_file != "")
|
||||
{
|
||||
bool weInitialised = false;
|
||||
@@ -79,9 +79,9 @@ bool AutoStart::EnableAutoStart(AutoStartInfo autostart_info)
|
||||
|
||||
result = CoCreateInstance(CLSID_ShellLink, NULL, CLSCTX_ALL, IID_IShellLinkW, (void**)&shellLink);
|
||||
|
||||
/*---------------------------------------------*\
|
||||
| If not initialized, initialize |
|
||||
\*---------------------------------------------*/
|
||||
/*-------------------------------------------------*\
|
||||
| If not initialized, initialize |
|
||||
\*-------------------------------------------------*/
|
||||
if(result == CO_E_NOTINITIALIZED)
|
||||
{
|
||||
weInitialised = true;
|
||||
@@ -89,10 +89,10 @@ bool AutoStart::EnableAutoStart(AutoStartInfo autostart_info)
|
||||
result = CoCreateInstance(CLSID_ShellLink, NULL, CLSCTX_ALL, IID_IShellLinkW, (void**)&shellLink);
|
||||
}
|
||||
|
||||
/*---------------------------------------------*\
|
||||
| If successfully initialized, save a shortcut |
|
||||
| from the AutoStart parameters |
|
||||
\*---------------------------------------------*/
|
||||
/*-------------------------------------------------*\
|
||||
| If successfully initialized, save a shortcut |
|
||||
| from the AutoStart parameters |
|
||||
\*-------------------------------------------------*/
|
||||
if(SUCCEEDED(result))
|
||||
{
|
||||
shellLink->SetPath(exepathw.c_str());
|
||||
@@ -114,9 +114,9 @@ bool AutoStart::EnableAutoStart(AutoStartInfo autostart_info)
|
||||
shellLink->Release();
|
||||
}
|
||||
|
||||
/*---------------------------------------------*\
|
||||
| Uninitialize when done |
|
||||
\*---------------------------------------------*/
|
||||
/*-------------------------------------------------*\
|
||||
| Uninitialize when done |
|
||||
\*-------------------------------------------------*/
|
||||
if(weInitialised)
|
||||
{
|
||||
CoUninitialize();
|
||||
@@ -132,9 +132,9 @@ bool AutoStart::EnableAutoStart(AutoStartInfo autostart_info)
|
||||
|
||||
bool AutoStart::IsAutoStartEnabled()
|
||||
{
|
||||
/*-------------------------------------------------*\
|
||||
| Check if the filename is valid |
|
||||
\*-------------------------------------------------*/
|
||||
/*-----------------------------------------------------*\
|
||||
| Check if the filename is valid |
|
||||
\*-----------------------------------------------------*/
|
||||
if(autostart_file != "")
|
||||
{
|
||||
return(filesystem::exists(autostart_file));
|
||||
@@ -147,9 +147,9 @@ bool AutoStart::IsAutoStartEnabled()
|
||||
|
||||
std::string AutoStart::GetExePath()
|
||||
{
|
||||
/*-------------------------------------------------*\
|
||||
| Create the OpenRGB executable path |
|
||||
\*-------------------------------------------------*/
|
||||
/*-----------------------------------------------------*\
|
||||
| Create the OpenRGB executable path |
|
||||
\*-----------------------------------------------------*/
|
||||
char exepath[MAX_PATH] = "";
|
||||
|
||||
DWORD count = GetModuleFileNameA(NULL, exepath, MAX_PATH);
|
||||
@@ -157,10 +157,10 @@ std::string AutoStart::GetExePath()
|
||||
return(std::string(exepath, (count > 0) ? count : 0));
|
||||
}
|
||||
|
||||
/*-----------------------------------------------------*\
|
||||
| Windows AutoStart Implementation |
|
||||
| Private Methods |
|
||||
\*-----------------------------------------------------*/
|
||||
/*---------------------------------------------------------*\
|
||||
| Windows AutoStart Implementation |
|
||||
| Private Methods |
|
||||
\*---------------------------------------------------------*/
|
||||
|
||||
void AutoStart::InitAutoStart(std::string name)
|
||||
{
|
||||
@@ -168,9 +168,9 @@ void AutoStart::InitAutoStart(std::string name)
|
||||
|
||||
autostart_name = name;
|
||||
|
||||
/*-------------------------------------------------*\
|
||||
| Get startup applications path |
|
||||
\*-------------------------------------------------*/
|
||||
/*-----------------------------------------------------*\
|
||||
| Get startup applications path |
|
||||
\*-----------------------------------------------------*/
|
||||
HRESULT result = SHGetFolderPathA(NULL, CSIDL_PROGRAMS, NULL, 0, startMenuPath);
|
||||
|
||||
if(SUCCEEDED(result))
|
||||
@@ -185,10 +185,10 @@ void AutoStart::InitAutoStart(std::string name)
|
||||
}
|
||||
}
|
||||
|
||||
/*-----------------------------------------------------*\
|
||||
| Convert an UTF8 string to a wide Unicode String |
|
||||
| (from wmi.cpp) |
|
||||
\*-----------------------------------------------------*/
|
||||
/*---------------------------------------------------------*\
|
||||
| Convert an UTF8 string to a wide Unicode String |
|
||||
| (from wmi.cpp) |
|
||||
\*---------------------------------------------------------*/
|
||||
std::wstring AutoStart::utf8_decode(const std::string& str)
|
||||
{
|
||||
if(str.empty())
|
||||
|
||||
@@ -67,3 +67,8 @@ OpenRGB is written in C++, uses the Qt framework for UI, and uses the QMake buil
|
||||
| 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.
|
||||
|
||||
@@ -33,9 +33,8 @@ void DetectA4TechMouseControllers(hid_device_info* info, const std::string& name
|
||||
|
||||
if(dev)
|
||||
{
|
||||
BloodyMouseController* controller = new BloodyMouseController(dev, info->path, info->product_id);
|
||||
BloodyMouseController* controller = new BloodyMouseController(dev, info->path, info->product_id, name);
|
||||
RGBController_BloodyMouse* rgb_controller = new RGBController_BloodyMouse(controller);
|
||||
rgb_controller->name = name;
|
||||
|
||||
ResourceManager::get()->RegisterRGBController(rgb_controller);
|
||||
}
|
||||
@@ -47,9 +46,8 @@ void DetectBloodyB820R(hid_device_info* info, const std::string& name)
|
||||
|
||||
if(dev)
|
||||
{
|
||||
BloodyB820RController* controller = new BloodyB820RController(dev, info->path);
|
||||
BloodyB820RController* controller = new BloodyB820RController(dev, info->path, name);
|
||||
RGBController_BloodyB820R* rgb_controller = new RGBController_BloodyB820R(controller);
|
||||
rgb_controller->name = name;
|
||||
|
||||
ResourceManager::get()->RegisterRGBController(rgb_controller);
|
||||
}
|
||||
|
||||
@@ -20,10 +20,11 @@
|
||||
| the second packet. |
|
||||
\*-------------------------------------------------------------------------------------*/
|
||||
|
||||
BloodyB820RController::BloodyB820RController(hid_device* dev_handle, const char* path)
|
||||
BloodyB820RController::BloodyB820RController(hid_device* dev_handle, const char* path, std::string dev_name)
|
||||
{
|
||||
dev = dev_handle;
|
||||
location = path;
|
||||
name = dev_name;
|
||||
|
||||
SendControlPacket(BLOODY_B820R_GAIN_CONTROL);
|
||||
}
|
||||
@@ -52,6 +53,11 @@ std::string BloodyB820RController::GetLocation()
|
||||
return("HID: " + location);
|
||||
}
|
||||
|
||||
std::string BloodyB820RController::GetName()
|
||||
{
|
||||
return(name);
|
||||
}
|
||||
|
||||
void BloodyB820RController::SendControlPacket(uint8_t data)
|
||||
{
|
||||
uint8_t buffer[BLOODY_B820R_PACKET_SIZE] = { 0x07, 0x03, 0x06, 0x01, 0x00, 0x00, 0x00, 0x00 };
|
||||
|
||||
@@ -39,15 +39,17 @@ enum
|
||||
class BloodyB820RController
|
||||
{
|
||||
public:
|
||||
BloodyB820RController(hid_device* dev_handle, const char* path);
|
||||
BloodyB820RController(hid_device* dev_handle, const char* path, std::string dev_name);
|
||||
~BloodyB820RController();
|
||||
|
||||
std::string GetSerial();
|
||||
std::string GetLocation();
|
||||
std::string GetName();
|
||||
|
||||
void SetLEDDirect(std::vector<RGBColor> colors);
|
||||
void SendControlPacket(uint8_t data);
|
||||
private:
|
||||
std::string location;
|
||||
std::string name;
|
||||
hid_device* dev;
|
||||
};
|
||||
|
||||
@@ -154,7 +154,7 @@ RGBController_BloodyB820R::RGBController_BloodyB820R(BloodyB820RController *cont
|
||||
{
|
||||
controller = controller_ptr;
|
||||
|
||||
name = "Bloody B820R";
|
||||
name = controller->GetName();
|
||||
vendor = "A4Tech";
|
||||
type = DEVICE_TYPE_KEYBOARD;
|
||||
description = "A4Tech Bloody Keyboard";
|
||||
|
||||
@@ -12,11 +12,12 @@
|
||||
#include "BloodyMouseController.h"
|
||||
#include "StringUtils.h"
|
||||
|
||||
BloodyMouseController::BloodyMouseController(hid_device* dev_handle, const char* path, uint16_t product_id)
|
||||
BloodyMouseController::BloodyMouseController(hid_device* dev_handle, const char* path, uint16_t product_id, std::string dev_name)
|
||||
{
|
||||
dev = dev_handle;
|
||||
location = path;
|
||||
pid = product_id;
|
||||
name = dev_name;
|
||||
|
||||
InitDevice();
|
||||
}
|
||||
@@ -49,6 +50,11 @@ std::string BloodyMouseController::GetLocation()
|
||||
return("HID: " + location);
|
||||
}
|
||||
|
||||
std::string BloodyMouseController::GetName()
|
||||
{
|
||||
return(name);
|
||||
}
|
||||
|
||||
void BloodyMouseController::InitDevice()
|
||||
{
|
||||
uint8_t buffer[BLOODYMOUSE_WRITE_PACKET_SIZE] = { 0x07, 0x03, 0x06, 0x01, 0x00, 0x00, 0x00, 0x00 };
|
||||
|
||||
@@ -50,18 +50,20 @@ enum
|
||||
class BloodyMouseController
|
||||
{
|
||||
public:
|
||||
BloodyMouseController(hid_device* dev_handle, const char* path, uint16_t product_id);
|
||||
BloodyMouseController(hid_device* dev_handle, const char* path, uint16_t product_id, std::string dev_name);
|
||||
~BloodyMouseController();
|
||||
|
||||
uint16_t GetPid();
|
||||
std::string GetSerial();
|
||||
std::string GetLocation();
|
||||
std::string GetName();
|
||||
|
||||
void SetLedsDirect(std::vector<RGBColor> colors);
|
||||
|
||||
private:
|
||||
uint16_t pid;
|
||||
std::string location;
|
||||
std::string name;
|
||||
hid_device* dev;
|
||||
|
||||
void InitDevice();
|
||||
|
||||
@@ -71,6 +71,7 @@ RGBController_BloodyMouse::RGBController_BloodyMouse(BloodyMouseController *cont
|
||||
type = DEVICE_TYPE_MOUSE;
|
||||
}
|
||||
|
||||
name = controller->GetName();
|
||||
vendor = "Bloody";
|
||||
description = "Controller compatible with the Bloody W60 Pro and MP 50RS";
|
||||
serial = controller->GetSerial();
|
||||
|
||||
@@ -0,0 +1,195 @@
|
||||
/*---------------------------------------------------------*\
|
||||
| AMBXController.cpp |
|
||||
| |
|
||||
| Driver for Philips amBX Gaming lights |
|
||||
| |
|
||||
| This file is part of the OpenRGB project |
|
||||
| SPDX-License-Identifier: GPL-2.0-only |
|
||||
\*---------------------------------------------------------*/
|
||||
|
||||
#include "AMBXController.h"
|
||||
#include "LogManager.h"
|
||||
#include "StringUtils.h"
|
||||
#include <cstring>
|
||||
#include <thread>
|
||||
#include <chrono>
|
||||
|
||||
AMBXController::AMBXController(const char* path)
|
||||
{
|
||||
initialized = false;
|
||||
usb_context = nullptr;
|
||||
dev_handle = nullptr;
|
||||
|
||||
location = "USB: ";
|
||||
location += path;
|
||||
|
||||
// Initialize libusb in this instance
|
||||
if(libusb_init(&usb_context) < 0)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
// Get the device list
|
||||
libusb_device** device_list;
|
||||
ssize_t device_count = libusb_get_device_list(usb_context, &device_list);
|
||||
|
||||
if(device_count < 0)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
for(ssize_t i = 0; i < device_count; i++)
|
||||
{
|
||||
libusb_device* device = device_list[i];
|
||||
struct libusb_device_descriptor desc;
|
||||
|
||||
if(libusb_get_device_descriptor(device, &desc) != LIBUSB_SUCCESS)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
if(desc.idVendor == AMBX_VID && desc.idProduct == AMBX_PID)
|
||||
{
|
||||
uint8_t bus = libusb_get_bus_number(device);
|
||||
uint8_t address = libusb_get_device_address(device);
|
||||
|
||||
char current_path[32];
|
||||
snprintf(current_path, sizeof(current_path), "%d-%d", bus, address);
|
||||
|
||||
if(strcmp(path, current_path) == 0)
|
||||
{
|
||||
// Try to open this device
|
||||
if(libusb_open(device, &dev_handle) != LIBUSB_SUCCESS)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
// Try to detach the kernel driver if attached
|
||||
if(libusb_kernel_driver_active(dev_handle, 0))
|
||||
{
|
||||
libusb_detach_kernel_driver(dev_handle, 0);
|
||||
}
|
||||
|
||||
// Set auto-detach for Windows compatibility
|
||||
libusb_set_auto_detach_kernel_driver(dev_handle, 1);
|
||||
|
||||
// Claim the interface
|
||||
if(libusb_claim_interface(dev_handle, 0) != LIBUSB_SUCCESS)
|
||||
{
|
||||
libusb_close(dev_handle);
|
||||
dev_handle = nullptr;
|
||||
continue;
|
||||
}
|
||||
|
||||
// Get string descriptor for serial number if available
|
||||
if(desc.iSerialNumber != 0)
|
||||
{
|
||||
unsigned char serial_str[256];
|
||||
int serial_result = libusb_get_string_descriptor_ascii(dev_handle, desc.iSerialNumber,
|
||||
serial_str, sizeof(serial_str));
|
||||
if(serial_result > 0)
|
||||
{
|
||||
serial = std::string(reinterpret_cast<char*>(serial_str), serial_result);
|
||||
}
|
||||
}
|
||||
|
||||
// Successfully opened and claimed the device
|
||||
initialized = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
libusb_free_device_list(device_list, 1);
|
||||
}
|
||||
|
||||
AMBXController::~AMBXController()
|
||||
{
|
||||
if(initialized)
|
||||
{
|
||||
// Turn off all lights before closing
|
||||
unsigned int led_ids[5] =
|
||||
{
|
||||
AMBX_LIGHT_LEFT,
|
||||
AMBX_LIGHT_RIGHT,
|
||||
AMBX_LIGHT_WALL_LEFT,
|
||||
AMBX_LIGHT_WALL_CENTER,
|
||||
AMBX_LIGHT_WALL_RIGHT
|
||||
};
|
||||
|
||||
RGBColor colors[5] = { 0, 0, 0, 0, 0 };
|
||||
SetLEDColors(led_ids, colors, 5);
|
||||
}
|
||||
|
||||
if(dev_handle != nullptr)
|
||||
{
|
||||
// Release the interface
|
||||
libusb_release_interface(dev_handle, 0);
|
||||
|
||||
// Close the device
|
||||
libusb_close(dev_handle);
|
||||
dev_handle = nullptr;
|
||||
}
|
||||
|
||||
if(usb_context != nullptr)
|
||||
{
|
||||
libusb_exit(usb_context);
|
||||
usb_context = nullptr;
|
||||
}
|
||||
}
|
||||
|
||||
std::string AMBXController::GetDeviceLocation()
|
||||
{
|
||||
return location;
|
||||
}
|
||||
|
||||
std::string AMBXController::GetSerialString()
|
||||
{
|
||||
return serial;
|
||||
}
|
||||
|
||||
bool AMBXController::IsInitialized()
|
||||
{
|
||||
return initialized;
|
||||
}
|
||||
|
||||
void AMBXController::SendPacket(unsigned char* packet, unsigned int size)
|
||||
{
|
||||
if(!initialized || dev_handle == nullptr)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
int actual_length = 0;
|
||||
libusb_interrupt_transfer(dev_handle, AMBX_ENDPOINT_OUT, packet, size, &actual_length, 100);
|
||||
}
|
||||
|
||||
void AMBXController::SetLEDColor(unsigned int led, RGBColor color)
|
||||
{
|
||||
if(!initialized)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
unsigned char color_buf[6] =
|
||||
{
|
||||
AMBX_PACKET_HEADER,
|
||||
static_cast<unsigned char>(led),
|
||||
AMBX_SET_COLOR,
|
||||
(unsigned char)RGBGetRValue(color),
|
||||
(unsigned char)RGBGetGValue(color),
|
||||
(unsigned char)RGBGetBValue(color)
|
||||
};
|
||||
|
||||
SendPacket(color_buf, 6);
|
||||
|
||||
std::this_thread::sleep_for(std::chrono::milliseconds(2));
|
||||
}
|
||||
|
||||
void AMBXController::SetLEDColors(unsigned int* leds, RGBColor* colors, unsigned int count)
|
||||
{
|
||||
for(unsigned int i = 0; i < count; i++)
|
||||
{
|
||||
SetLEDColor(leds[i], colors[i]);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,57 @@
|
||||
/*---------------------------------------------------------*\
|
||||
| AMBXController.h |
|
||||
| |
|
||||
| Driver for Philips amBX Gaming lights |
|
||||
| |
|
||||
| This file is part of the OpenRGB project |
|
||||
| SPDX-License-Identifier: GPL-2.0-only |
|
||||
\*---------------------------------------------------------*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "RGBController.h"
|
||||
#include <string>
|
||||
|
||||
#ifdef _WIN32
|
||||
#include "dependencies/libusb-1.0.27/include/libusb.h"
|
||||
#else
|
||||
#include <libusb.h>
|
||||
#endif
|
||||
|
||||
#define AMBX_VID 0x0471
|
||||
#define AMBX_PID 0x083F
|
||||
#define AMBX_ENDPOINT_OUT 0x02
|
||||
#define AMBX_PACKET_HEADER 0xA1
|
||||
#define AMBX_SET_COLOR 0x03
|
||||
|
||||
enum
|
||||
{
|
||||
AMBX_LIGHT_LEFT = 0x0B,
|
||||
AMBX_LIGHT_RIGHT = 0x1B,
|
||||
AMBX_LIGHT_WALL_LEFT = 0x2B,
|
||||
AMBX_LIGHT_WALL_CENTER = 0x3B,
|
||||
AMBX_LIGHT_WALL_RIGHT = 0x4B
|
||||
};
|
||||
|
||||
class AMBXController
|
||||
{
|
||||
public:
|
||||
AMBXController(const char* path);
|
||||
~AMBXController();
|
||||
|
||||
std::string GetDeviceLocation();
|
||||
std::string GetSerialString();
|
||||
|
||||
bool IsInitialized();
|
||||
void SetLEDColor(unsigned int led, RGBColor color);
|
||||
void SetLEDColors(unsigned int* leds, RGBColor* colors, unsigned int count);
|
||||
|
||||
private:
|
||||
libusb_context* usb_context;
|
||||
libusb_device_handle* dev_handle;
|
||||
std::string location;
|
||||
std::string serial;
|
||||
bool initialized;
|
||||
|
||||
void SendPacket(unsigned char* packet, unsigned int size);
|
||||
};
|
||||
@@ -0,0 +1,83 @@
|
||||
/*---------------------------------------------------------*\
|
||||
| AMBXControllerDetect.cpp |
|
||||
| |
|
||||
| Detector for Philips amBX Gaming lights |
|
||||
| |
|
||||
| This file is part of the OpenRGB project |
|
||||
| SPDX-License-Identifier: GPL-2.0-only |
|
||||
\*---------------------------------------------------------*/
|
||||
|
||||
#include "Detector.h"
|
||||
#include "AMBXController.h"
|
||||
#include "RGBController.h"
|
||||
#include "RGBController_AMBX.h"
|
||||
|
||||
#ifdef _WIN32
|
||||
#include "dependencies/libusb-1.0.27/include/libusb.h"
|
||||
#else
|
||||
#include <libusb.h>
|
||||
#endif
|
||||
|
||||
/******************************************************************************************\
|
||||
* *
|
||||
* DetectAMBXControllers *
|
||||
* *
|
||||
* Detect Philips amBX Gaming devices *
|
||||
* *
|
||||
\******************************************************************************************/
|
||||
|
||||
void DetectAMBXControllers()
|
||||
{
|
||||
libusb_context* ctx = NULL;
|
||||
|
||||
if(libusb_init(&ctx) < 0)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
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)
|
||||
{
|
||||
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);
|
||||
ResourceManager::get()->RegisterRGBController(rgb_controller);
|
||||
}
|
||||
else
|
||||
{
|
||||
delete controller;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
libusb_free_device_list(devs, 1);
|
||||
libusb_exit(ctx);
|
||||
}
|
||||
|
||||
REGISTER_DETECTOR("Philips amBX", DetectAMBXControllers);
|
||||
@@ -0,0 +1,179 @@
|
||||
/*---------------------------------------------------------*\
|
||||
| RGBController_AMBX.cpp |
|
||||
| |
|
||||
| RGB Controller for Philips amBX Gaming lights |
|
||||
| |
|
||||
| This file is part of the OpenRGB project |
|
||||
| SPDX-License-Identifier: GPL-2.0-only |
|
||||
\*---------------------------------------------------------*/
|
||||
|
||||
#include "RGBController_AMBX.h"
|
||||
|
||||
/**------------------------------------------------------------------*\
|
||||
@name Philips amBX
|
||||
@category Accessory
|
||||
@type USB
|
||||
@save :x:
|
||||
@direct :white_check_mark:
|
||||
@effects :x:
|
||||
@detectors DetectAMBXControllers
|
||||
@comment The Philips amBX Gaming lights system includes left and right
|
||||
lights and a wall-washer bar with three zones.
|
||||
\*-------------------------------------------------------------------*/
|
||||
|
||||
RGBController_AMBX::RGBController_AMBX(AMBXController* controller_ptr)
|
||||
{
|
||||
controller = controller_ptr;
|
||||
|
||||
name = "Philips amBX";
|
||||
vendor = "Philips";
|
||||
type = DEVICE_TYPE_ACCESSORY;
|
||||
description = "Philips amBX Gaming Device";
|
||||
location = controller->GetDeviceLocation();
|
||||
serial = controller->GetSerialString();
|
||||
|
||||
mode Direct;
|
||||
Direct.name = "Direct";
|
||||
Direct.value = 0;
|
||||
Direct.flags = MODE_FLAG_HAS_PER_LED_COLOR;
|
||||
Direct.color_mode = MODE_COLORS_PER_LED;
|
||||
modes.push_back(Direct);
|
||||
|
||||
SetupZones();
|
||||
}
|
||||
|
||||
RGBController_AMBX::~RGBController_AMBX()
|
||||
{
|
||||
delete controller;
|
||||
}
|
||||
|
||||
void RGBController_AMBX::SetupZones()
|
||||
{
|
||||
// Set up zones
|
||||
zone side_lights_zone;
|
||||
side_lights_zone.name = "Side Lights";
|
||||
side_lights_zone.type = ZONE_TYPE_LINEAR;
|
||||
side_lights_zone.leds_min = 2;
|
||||
side_lights_zone.leds_max = 2;
|
||||
side_lights_zone.leds_count = 2;
|
||||
side_lights_zone.matrix_map = NULL;
|
||||
zones.push_back(side_lights_zone);
|
||||
|
||||
zone wallwasher_zone;
|
||||
wallwasher_zone.name = "Wallwasher";
|
||||
wallwasher_zone.type = ZONE_TYPE_LINEAR;
|
||||
wallwasher_zone.leds_min = 3;
|
||||
wallwasher_zone.leds_max = 3;
|
||||
wallwasher_zone.leds_count = 3;
|
||||
wallwasher_zone.matrix_map = NULL;
|
||||
zones.push_back(wallwasher_zone);
|
||||
|
||||
// Set up LEDs
|
||||
led left_light;
|
||||
left_light.name = "Left";
|
||||
left_light.value = AMBX_LIGHT_LEFT;
|
||||
leds.push_back(left_light);
|
||||
|
||||
led right_light;
|
||||
right_light.name = "Right";
|
||||
right_light.value = AMBX_LIGHT_RIGHT;
|
||||
leds.push_back(right_light);
|
||||
|
||||
led wall_left;
|
||||
wall_left.name = "Wall Left";
|
||||
wall_left.value = AMBX_LIGHT_WALL_LEFT;
|
||||
leds.push_back(wall_left);
|
||||
|
||||
led wall_center;
|
||||
wall_center.name = "Wall Center";
|
||||
wall_center.value = AMBX_LIGHT_WALL_CENTER;
|
||||
leds.push_back(wall_center);
|
||||
|
||||
led wall_right;
|
||||
wall_right.name = "Wall Right";
|
||||
wall_right.value = AMBX_LIGHT_WALL_RIGHT;
|
||||
leds.push_back(wall_right);
|
||||
|
||||
SetupColors();
|
||||
}
|
||||
|
||||
void RGBController_AMBX::ResizeZone(int /*zone*/, int /*new_size*/)
|
||||
{
|
||||
// This device does not support resizing zones
|
||||
}
|
||||
|
||||
void RGBController_AMBX::DeviceUpdateLEDs()
|
||||
{
|
||||
if(!controller->IsInitialized())
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
unsigned int led_values[5];
|
||||
RGBColor led_colors[5];
|
||||
|
||||
for(unsigned int led_idx = 0; led_idx < leds.size(); led_idx++)
|
||||
{
|
||||
led_values[led_idx] = leds[led_idx].value;
|
||||
led_colors[led_idx] = colors[led_idx];
|
||||
}
|
||||
|
||||
controller->SetLEDColors(led_values, led_colors, static_cast<unsigned int>(leds.size()));
|
||||
}
|
||||
|
||||
void RGBController_AMBX::UpdateZoneLEDs(int zone)
|
||||
{
|
||||
if(!controller->IsInitialized())
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
unsigned int start_idx = 0;
|
||||
unsigned int zone_size = 0;
|
||||
|
||||
// Calculate start index and size
|
||||
for(unsigned int z_idx = 0; z_idx < zones.size(); z_idx++)
|
||||
{
|
||||
if(z_idx == (unsigned int)zone)
|
||||
{
|
||||
zone_size = zones[z_idx].leds_count;
|
||||
break;
|
||||
}
|
||||
|
||||
start_idx += zones[z_idx].leds_count;
|
||||
}
|
||||
|
||||
unsigned int led_values[5];
|
||||
RGBColor led_colors[5];
|
||||
|
||||
for(unsigned int led_idx = 0; led_idx < zone_size; led_idx++)
|
||||
{
|
||||
unsigned int current_idx = start_idx + led_idx;
|
||||
led_values[led_idx] = leds[current_idx].value;
|
||||
led_colors[led_idx] = colors[current_idx];
|
||||
}
|
||||
|
||||
controller->SetLEDColors(led_values, led_colors, zone_size);
|
||||
}
|
||||
|
||||
void RGBController_AMBX::UpdateSingleLED(int led)
|
||||
{
|
||||
if(!controller->IsInitialized())
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
unsigned int led_value = leds[led].value;
|
||||
RGBColor color = colors[led];
|
||||
controller->SetLEDColor(led_value, color);
|
||||
}
|
||||
|
||||
void RGBController_AMBX::DeviceUpdateMode()
|
||||
{
|
||||
if(!controller->IsInitialized())
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
DeviceUpdateLEDs();
|
||||
}
|
||||
@@ -0,0 +1,32 @@
|
||||
/*---------------------------------------------------------*\
|
||||
| RGBController_AMBX.h |
|
||||
| |
|
||||
| RGB Controller for Philips amBX Gaming lights |
|
||||
| |
|
||||
| This file is part of the OpenRGB project |
|
||||
| SPDX-License-Identifier: GPL-2.0-only |
|
||||
\*---------------------------------------------------------*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "RGBController.h"
|
||||
#include "AMBXController.h"
|
||||
|
||||
class RGBController_AMBX : public RGBController
|
||||
{
|
||||
public:
|
||||
RGBController_AMBX(AMBXController* controller_ptr);
|
||||
~RGBController_AMBX();
|
||||
|
||||
void SetupZones();
|
||||
void ResizeZone(int zone, int new_size);
|
||||
|
||||
void DeviceUpdateLEDs();
|
||||
void UpdateZoneLEDs(int zone);
|
||||
void UpdateSingleLED(int led);
|
||||
|
||||
void DeviceUpdateMode();
|
||||
|
||||
private:
|
||||
AMBXController* controller;
|
||||
};
|
||||
@@ -35,11 +35,12 @@
|
||||
void DetectAMDWraithPrismControllers(hid_device_info* info, const std::string&)
|
||||
{
|
||||
hid_device* dev = hid_open_path(info->path);
|
||||
if( dev )
|
||||
|
||||
if(dev)
|
||||
{
|
||||
AMDWraithPrismController* controller = new AMDWraithPrismController(dev, info->path);
|
||||
RGBController_AMDWraithPrism* rgb_controller = new RGBController_AMDWraithPrism(controller);
|
||||
// Constructor sets the name
|
||||
|
||||
ResourceManager::get()->RegisterRGBController(rgb_controller);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -17,10 +17,11 @@
|
||||
|
||||
using namespace std::chrono_literals;
|
||||
|
||||
AOCKeyboardController::AOCKeyboardController(hid_device* dev_handle, const char* path)
|
||||
AOCKeyboardController::AOCKeyboardController(hid_device* dev_handle, const char* path, std::string dev_name)
|
||||
{
|
||||
dev = dev_handle;
|
||||
location = path;
|
||||
name = dev_name;
|
||||
}
|
||||
|
||||
AOCKeyboardController::~AOCKeyboardController()
|
||||
@@ -33,6 +34,11 @@ std::string AOCKeyboardController::GetDeviceLocation()
|
||||
return("HID " + location);
|
||||
}
|
||||
|
||||
std::string AOCKeyboardController::GetDeviceName()
|
||||
{
|
||||
return(name);
|
||||
}
|
||||
|
||||
std::string AOCKeyboardController::GetSerialString()
|
||||
{
|
||||
wchar_t serial_string[128];
|
||||
|
||||
@@ -64,10 +64,11 @@ enum
|
||||
class AOCKeyboardController
|
||||
{
|
||||
public:
|
||||
AOCKeyboardController(hid_device* dev_handle, const char* path);
|
||||
AOCKeyboardController(hid_device* dev_handle, const char* path, std::string dev_name);
|
||||
~AOCKeyboardController();
|
||||
|
||||
std::string GetDeviceLocation();
|
||||
std::string GetDeviceName();
|
||||
std::string GetSerialString();
|
||||
|
||||
void SetLightingConfig
|
||||
@@ -88,6 +89,7 @@ public:
|
||||
private:
|
||||
hid_device* dev;
|
||||
std::string location;
|
||||
std::string name;
|
||||
|
||||
void SendStartPacket();
|
||||
void SendEndPacket();
|
||||
|
||||
@@ -34,9 +34,8 @@ void DetectAOCKeyboardControllers(hid_device_info* info, const std::string& name
|
||||
|
||||
if(dev)
|
||||
{
|
||||
AOCKeyboardController* controller = new AOCKeyboardController(dev, info->path);
|
||||
AOCKeyboardController* controller = new AOCKeyboardController(dev, info->path, name);
|
||||
RGBController_AOCKeyboard* rgb_controller = new RGBController_AOCKeyboard(controller);
|
||||
rgb_controller->name = name;
|
||||
|
||||
ResourceManager::get()->RegisterRGBController(rgb_controller);
|
||||
}
|
||||
|
||||
@@ -52,7 +52,7 @@ RGBController_AOCKeyboard::RGBController_AOCKeyboard(AOCKeyboardController* cont
|
||||
{
|
||||
controller = controller_ptr;
|
||||
|
||||
name = "AOC Keyboard Device";
|
||||
name = controller->GetDeviceName();
|
||||
vendor = "AOC";
|
||||
type = DEVICE_TYPE_KEYBOARD;
|
||||
description = "AOC Keyboard Device";
|
||||
|
||||
@@ -13,10 +13,11 @@
|
||||
#include "AOCMouseController.h"
|
||||
#include "StringUtils.h"
|
||||
|
||||
AOCMouseController::AOCMouseController(hid_device* dev_handle, const char* path)
|
||||
AOCMouseController::AOCMouseController(hid_device* dev_handle, const char* path, std::string dev_name)
|
||||
{
|
||||
dev = dev_handle;
|
||||
location = path;
|
||||
name = dev_name;
|
||||
}
|
||||
|
||||
AOCMouseController::~AOCMouseController()
|
||||
@@ -29,6 +30,11 @@ std::string AOCMouseController::GetDeviceLocation()
|
||||
return("HID " + location);
|
||||
}
|
||||
|
||||
std::string AOCMouseController::GetDeviceName()
|
||||
{
|
||||
return(name);
|
||||
}
|
||||
|
||||
std::string AOCMouseController::GetSerialString()
|
||||
{
|
||||
wchar_t serial_string[128];
|
||||
|
||||
@@ -56,10 +56,11 @@ enum
|
||||
class AOCMouseController
|
||||
{
|
||||
public:
|
||||
AOCMouseController(hid_device* dev_handle, const char* path);
|
||||
AOCMouseController(hid_device* dev_handle, const char* path, std::string dev_name);
|
||||
~AOCMouseController();
|
||||
|
||||
std::string GetDeviceLocation();
|
||||
std::string GetDeviceName();
|
||||
std::string GetSerialString();
|
||||
|
||||
void SendDirect
|
||||
@@ -79,4 +80,5 @@ public:
|
||||
private:
|
||||
hid_device* dev;
|
||||
std::string location;
|
||||
std::string name;
|
||||
};
|
||||
|
||||
@@ -33,9 +33,8 @@ void DetectAOCMouseControllers(hid_device_info* info, const std::string& name)
|
||||
|
||||
if(dev)
|
||||
{
|
||||
AOCMouseController* controller = new AOCMouseController(dev, info->path);
|
||||
AOCMouseController* controller = new AOCMouseController(dev, info->path, name);
|
||||
RGBController_AOCMouse* rgb_controller = new RGBController_AOCMouse(controller);
|
||||
rgb_controller->name = name;
|
||||
|
||||
ResourceManager::get()->RegisterRGBController(rgb_controller);
|
||||
}
|
||||
|
||||
@@ -26,7 +26,7 @@ RGBController_AOCMouse::RGBController_AOCMouse(AOCMouseController* controller_pt
|
||||
{
|
||||
controller = controller_ptr;
|
||||
|
||||
name = "AOC Mouse Device";
|
||||
name = controller->GetDeviceName();
|
||||
vendor = "AOC";
|
||||
type = DEVICE_TYPE_MOUSE;
|
||||
description = "AOC Mouse Device";
|
||||
|
||||
@@ -13,10 +13,11 @@
|
||||
#include "AOCMousematController.h"
|
||||
#include "StringUtils.h"
|
||||
|
||||
AOCMousematController::AOCMousematController(hid_device* dev_handle, const char* path)
|
||||
AOCMousematController::AOCMousematController(hid_device* dev_handle, const char* path, std::string dev_name)
|
||||
{
|
||||
dev = dev_handle;
|
||||
location = path;
|
||||
name = dev_name;
|
||||
}
|
||||
|
||||
AOCMousematController::~AOCMousematController()
|
||||
@@ -29,6 +30,11 @@ std::string AOCMousematController::GetDeviceLocation()
|
||||
return("HID " + location);
|
||||
}
|
||||
|
||||
std::string AOCMousematController::GetDeviceName()
|
||||
{
|
||||
return(name);
|
||||
}
|
||||
|
||||
std::string AOCMousematController::GetSerialString()
|
||||
{
|
||||
wchar_t serial_string[128];
|
||||
|
||||
@@ -55,10 +55,11 @@ enum
|
||||
class AOCMousematController
|
||||
{
|
||||
public:
|
||||
AOCMousematController(hid_device* dev_handle, const char* path);
|
||||
AOCMousematController(hid_device* dev_handle, const char* path, std::string dev_name);
|
||||
~AOCMousematController();
|
||||
|
||||
std::string GetDeviceLocation();
|
||||
std::string GetDeviceName();
|
||||
std::string GetSerialString();
|
||||
|
||||
void SendDirect
|
||||
@@ -78,4 +79,5 @@ public:
|
||||
private:
|
||||
hid_device* dev;
|
||||
std::string location;
|
||||
std::string name;
|
||||
};
|
||||
|
||||
@@ -33,9 +33,8 @@ void DetectAOCMousematControllers(hid_device_info* info, const std::string& name
|
||||
|
||||
if(dev)
|
||||
{
|
||||
AOCMousematController* controller = new AOCMousematController(dev, info->path);
|
||||
AOCMousematController* controller = new AOCMousematController(dev, info->path, name);
|
||||
RGBController_AOCMousemat* rgb_controller = new RGBController_AOCMousemat(controller);
|
||||
rgb_controller->name = name;
|
||||
|
||||
ResourceManager::get()->RegisterRGBController(rgb_controller);
|
||||
}
|
||||
|
||||
@@ -26,7 +26,7 @@ RGBController_AOCMousemat::RGBController_AOCMousemat(AOCMousematController* cont
|
||||
{
|
||||
controller = controller_ptr;
|
||||
|
||||
name = "AOC Mousemat Device";
|
||||
name = controller->GetDeviceName();
|
||||
vendor = "AOC";
|
||||
type = DEVICE_TYPE_MOUSEMAT;
|
||||
description = "AOC Mousemat Device";
|
||||
|
||||
+7
-1
@@ -14,10 +14,11 @@
|
||||
#include "AlienwareAW410KController.h"
|
||||
#include "StringUtils.h"
|
||||
|
||||
AlienwareAW410KController::AlienwareAW410KController(hid_device* dev_handle, const char* path)
|
||||
AlienwareAW410KController::AlienwareAW410KController(hid_device* dev_handle, const char* path, std::string dev_name)
|
||||
{
|
||||
dev = dev_handle;
|
||||
location = path;
|
||||
name = dev_name;
|
||||
|
||||
SendCommit();
|
||||
}
|
||||
@@ -32,6 +33,11 @@ std::string AlienwareAW410KController::GetDeviceLocation()
|
||||
return("HID: " + location);
|
||||
}
|
||||
|
||||
std::string AlienwareAW410KController::GetDeviceName()
|
||||
{
|
||||
return(name);
|
||||
}
|
||||
|
||||
std::string AlienwareAW410KController::GetSerialString()
|
||||
{
|
||||
wchar_t serial_string[128];
|
||||
|
||||
+3
-1
@@ -75,10 +75,11 @@ struct SelectedButtons
|
||||
class AlienwareAW410KController
|
||||
{
|
||||
public:
|
||||
AlienwareAW410KController(hid_device* dev_handle, const char* path);
|
||||
AlienwareAW410KController(hid_device* dev_handle, const char* path, std::string dev_name);
|
||||
~AlienwareAW410KController();
|
||||
|
||||
std::string GetDeviceLocation();
|
||||
std::string GetDeviceName();
|
||||
std::string GetSerialString();
|
||||
|
||||
void SendInitialize();
|
||||
@@ -140,6 +141,7 @@ public:
|
||||
private:
|
||||
hid_device* dev;
|
||||
std::string location;
|
||||
std::string name;
|
||||
|
||||
void SendMode
|
||||
(
|
||||
|
||||
+1
-1
@@ -176,7 +176,7 @@ RGBController_AlienwareAW410K::RGBController_AlienwareAW410K(AlienwareAW410KCont
|
||||
{
|
||||
controller = controller_ptr;
|
||||
|
||||
name = "Alienware AW410K Keyboard Device";
|
||||
name = controller->GetDeviceName();
|
||||
vendor = "Alienware";
|
||||
type = DEVICE_TYPE_KEYBOARD;
|
||||
description = "Alienware AW410K Keyboard Device";
|
||||
|
||||
+7
-1
@@ -13,10 +13,11 @@
|
||||
#include "AlienwareAW510KController.h"
|
||||
#include "StringUtils.h"
|
||||
|
||||
AlienwareAW510KController::AlienwareAW510KController(hid_device* dev_handle, const char* path)
|
||||
AlienwareAW510KController::AlienwareAW510KController(hid_device* dev_handle, const char* path, std::string dev_name)
|
||||
{
|
||||
dev = dev_handle;
|
||||
location = path;
|
||||
name = dev_name;
|
||||
|
||||
SendCommit();
|
||||
}
|
||||
@@ -31,6 +32,11 @@ std::string AlienwareAW510KController::GetDeviceLocation()
|
||||
return("HID: " + location);
|
||||
}
|
||||
|
||||
std::string AlienwareAW510KController::GetDeviceName()
|
||||
{
|
||||
return(name);
|
||||
}
|
||||
|
||||
std::string AlienwareAW510KController::GetSerialString()
|
||||
{
|
||||
wchar_t serial_string[128];
|
||||
|
||||
+3
-1
@@ -77,10 +77,11 @@ struct SelectedKeys
|
||||
class AlienwareAW510KController
|
||||
{
|
||||
public:
|
||||
AlienwareAW510KController(hid_device* dev_handle, const char* path);
|
||||
AlienwareAW510KController(hid_device* dev_handle, const char* path, std::string dev_name);
|
||||
~AlienwareAW510KController();
|
||||
|
||||
std::string GetDeviceLocation();
|
||||
std::string GetDeviceName();
|
||||
std::string GetSerialString();
|
||||
|
||||
void SendInitialize();
|
||||
@@ -142,6 +143,7 @@ public:
|
||||
private:
|
||||
hid_device* dev;
|
||||
std::string location;
|
||||
std::string name;
|
||||
|
||||
void SendMode
|
||||
(
|
||||
|
||||
+1
-1
@@ -175,7 +175,7 @@ RGBController_AlienwareAW510K::RGBController_AlienwareAW510K(AlienwareAW510KCont
|
||||
{
|
||||
controller = controller_ptr;
|
||||
|
||||
name = "Alienware AW510K Keyboard Device";
|
||||
name = controller->GetDeviceName();
|
||||
vendor = "Alienware";
|
||||
type = DEVICE_TYPE_KEYBOARD;
|
||||
description = "Alienware AW510K Keyboard Device";
|
||||
|
||||
@@ -38,9 +38,9 @@ void DetectAlienwareAW510KControllers(hid_device_info* info, const std::string&
|
||||
hid_device* dev = hid_open_path(info->path);
|
||||
if( dev )
|
||||
{
|
||||
AlienwareAW510KController* controller = new AlienwareAW510KController(dev, info->path);
|
||||
AlienwareAW510KController* controller = new AlienwareAW510KController(dev, info->path, name);
|
||||
RGBController_AlienwareAW510K* rgb_controller = new RGBController_AlienwareAW510K(controller);
|
||||
rgb_controller->name = name;
|
||||
|
||||
ResourceManager::get()->RegisterRGBController(rgb_controller);
|
||||
}
|
||||
}
|
||||
@@ -50,9 +50,9 @@ void DetectAlienwareAW410KControllers(hid_device_info* info, const std::string&
|
||||
hid_device* dev = hid_open_path(info->path);
|
||||
if( dev )
|
||||
{
|
||||
AlienwareAW410KController* controller = new AlienwareAW410KController(dev, info->path);
|
||||
AlienwareAW410KController* controller = new AlienwareAW410KController(dev, info->path, name);
|
||||
RGBController_AlienwareAW410K* rgb_controller = new RGBController_AlienwareAW410K(controller);
|
||||
rgb_controller->name = name;
|
||||
|
||||
ResourceManager::get()->RegisterRGBController(rgb_controller);
|
||||
}
|
||||
}/* DetectAlienwareKeyboardControllers() */
|
||||
|
||||
@@ -127,7 +127,7 @@ std::vector<unsigned char> AlienwareAW3423DWFController::GenerateKey(
|
||||
if(response.size() > 14)
|
||||
{
|
||||
unsigned char idx = response[14] & 0x07;
|
||||
if((idx + 8) < response.size())
|
||||
if((idx + 8) < (unsigned char)response.size())
|
||||
{
|
||||
out_buffer[idx] ^= response[idx + 8];
|
||||
}
|
||||
|
||||
@@ -28,8 +28,6 @@ public:
|
||||
private:
|
||||
hid_device* dev;
|
||||
std::string location;
|
||||
unsigned char endpoint_out = 0x02;
|
||||
unsigned char endpoint_in = 0x81;
|
||||
|
||||
static const std::vector<std::vector<unsigned char>> OEM_KEYS;
|
||||
|
||||
|
||||
@@ -15,10 +15,11 @@
|
||||
|
||||
#include "AlienwareMonitorController.h"
|
||||
|
||||
AlienwareMonitorController::AlienwareMonitorController(hid_device *dev_handle, const char *path)
|
||||
AlienwareMonitorController::AlienwareMonitorController(hid_device *dev_handle, const char *path, std::string dev_name)
|
||||
{
|
||||
dev = dev_handle;
|
||||
location = path;
|
||||
name = dev_name;
|
||||
|
||||
Initialize();
|
||||
}
|
||||
@@ -33,6 +34,11 @@ std::string AlienwareMonitorController::GetLocation()
|
||||
return("HID: " + location);
|
||||
}
|
||||
|
||||
std::string AlienwareMonitorController::GetName()
|
||||
{
|
||||
return(name);
|
||||
}
|
||||
|
||||
std::string AlienwareMonitorController::GetSerialString()
|
||||
{
|
||||
return("");
|
||||
@@ -56,6 +62,7 @@ void AlienwareMonitorController::SendColor(unsigned char led_id, unsigned char r
|
||||
|
||||
memset(packet, 0xFF, sizeof(packet));
|
||||
|
||||
packet[0] = 0x00;
|
||||
packet[1] = 0x92;
|
||||
packet[2] = 0x37;
|
||||
packet[3] = 0x0a;
|
||||
@@ -87,6 +94,7 @@ void AlienwareMonitorController::Initialize()
|
||||
|
||||
memset(packet, 0xFF, sizeof(packet));
|
||||
|
||||
packet[0] = 0x00;
|
||||
packet[1] = 0x95;
|
||||
packet[2] = 0x00;
|
||||
packet[3] = 0x00;
|
||||
@@ -101,6 +109,7 @@ void AlienwareMonitorController::Initialize()
|
||||
|
||||
memset(packet, 0xFF, sizeof(packet));
|
||||
|
||||
packet[0] = 0x00;
|
||||
packet[1] = 0x92;
|
||||
packet[2] = 0x37;
|
||||
packet[3] = 0x08;
|
||||
@@ -123,6 +132,7 @@ void AlienwareMonitorController::Initialize()
|
||||
|
||||
memset(packet, 0x00, sizeof(packet));
|
||||
|
||||
packet[0] = 0x00;
|
||||
packet[1] = 0x93;
|
||||
packet[2] = 0x37;
|
||||
packet[3] = 0x12;
|
||||
|
||||
@@ -18,16 +18,18 @@
|
||||
class AlienwareMonitorController
|
||||
{
|
||||
public:
|
||||
AlienwareMonitorController(hid_device* dev_handle, const char* path);
|
||||
AlienwareMonitorController(hid_device* dev_handle, const char* path, std::string dev_name);
|
||||
~AlienwareMonitorController();
|
||||
|
||||
std::string GetLocation();
|
||||
std::string GetName();
|
||||
std::string GetSerialString();
|
||||
void SendColor(unsigned char led_id, unsigned char r, unsigned char g, unsigned char b);
|
||||
|
||||
private:
|
||||
hid_device* dev;
|
||||
std::string location;
|
||||
std::string name;
|
||||
|
||||
void Initialize();
|
||||
};
|
||||
|
||||
@@ -42,8 +42,9 @@ void DetectAlienwareAW3423DWFControllers(hid_device_info* info, const std::strin
|
||||
hid_device* dev = hid_open_path(info->path);
|
||||
if(dev)
|
||||
{
|
||||
AlienwareAW3423DWFController* controller = new AlienwareAW3423DWFController(dev, info->path);
|
||||
AlienwareAW3423DWFController* controller = new AlienwareAW3423DWFController(dev, info->path);
|
||||
RGBController_AlienwareAW3423DWF* rgb_controller = new RGBController_AlienwareAW3423DWF(controller);
|
||||
|
||||
ResourceManager::get()->RegisterRGBController(rgb_controller);
|
||||
}
|
||||
}
|
||||
@@ -54,9 +55,8 @@ void DetectAlienwareMonitorControllers(hid_device_info* info, const std::string&
|
||||
|
||||
if(dev)
|
||||
{
|
||||
AlienwareMonitorController* controller = new AlienwareMonitorController(dev, info->path);
|
||||
AlienwareMonitorController* controller = new AlienwareMonitorController(dev, info->path, name);
|
||||
RGBController_AlienwareMonitor* rgb_controller = new RGBController_AlienwareMonitor(controller);
|
||||
rgb_controller->name = name;
|
||||
|
||||
ResourceManager::get()->RegisterRGBController(rgb_controller);
|
||||
}
|
||||
|
||||
@@ -26,7 +26,7 @@ RGBController_AlienwareMonitor::RGBController_AlienwareMonitor(AlienwareMonitorC
|
||||
{
|
||||
controller = controller_ptr;
|
||||
|
||||
name = "Alienware Monitor";
|
||||
name = controller->GetName();
|
||||
description = "Alienware Monitor";
|
||||
vendor = "Alienware";
|
||||
type = DEVICE_TYPE_MONITOR;
|
||||
|
||||
@@ -40,11 +40,12 @@
|
||||
void DetectAnnePro2Controllers(hid_device_info* info, const std::string&)
|
||||
{
|
||||
hid_device* dev = hid_open_path(info->path);
|
||||
if( dev )
|
||||
|
||||
if(dev)
|
||||
{
|
||||
AnnePro2Controller* controller = new AnnePro2Controller(dev, info->path);
|
||||
RGBController_AnnePro2* rgb_controller = new RGBController_AnnePro2(controller);
|
||||
// Constructor sets the name
|
||||
|
||||
ResourceManager::get()->RegisterRGBController(rgb_controller);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -76,9 +76,9 @@ void ArcticController::SetChannels(std::vector<RGBColor> colors)
|
||||
{
|
||||
const unsigned int offset = ARCTIC_COMMAND_PAYLOAD_OFFSET + channel * 3;
|
||||
|
||||
buffer[offset + 0x00] = std::min<unsigned int>(254, RGBGetRValue(colors[channel]));
|
||||
buffer[offset + 0x01] = std::min<unsigned int>(254, RGBGetGValue(colors[channel]));
|
||||
buffer[offset + 0x02] = std::min<unsigned int>(254, RGBGetBValue(colors[channel]));
|
||||
buffer[offset + 0x00] = (char)std::min<unsigned int>(254, RGBGetRValue(colors[channel]));
|
||||
buffer[offset + 0x01] = (char)std::min<unsigned int>(254, RGBGetGValue(colors[channel]));
|
||||
buffer[offset + 0x02] = (char)std::min<unsigned int>(254, RGBGetBValue(colors[channel]));
|
||||
}
|
||||
|
||||
serialport.serial_write(buffer, sizeof(buffer));
|
||||
|
||||
@@ -35,7 +35,7 @@ void DetectAsusAuraCoreControllers(hid_device_info* info, const std::string& /*n
|
||||
{
|
||||
AuraCoreController* controller = new AuraCoreController(dev, info->path);
|
||||
RGBController_AuraCore* rgb_controller = new RGBController_AuraCore(controller);
|
||||
// Constructor sets the name
|
||||
|
||||
if(rgb_controller->type != DEVICE_TYPE_UNKNOWN)
|
||||
{
|
||||
ResourceManager::get()->RegisterRGBController(rgb_controller);
|
||||
@@ -55,7 +55,7 @@ void DetectAsusAuraCoreLaptopControllers(hid_device_info* info, const std::strin
|
||||
{
|
||||
AsusAuraCoreLaptopController* controller = new AsusAuraCoreLaptopController(dev, info->path);
|
||||
RGBController_AsusAuraCoreLaptop* rgb_controller = new RGBController_AsusAuraCoreLaptop(controller);
|
||||
// Constructor sets the name
|
||||
|
||||
ResourceManager::get()->RegisterRGBController(rgb_controller);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -13,12 +13,11 @@
|
||||
#include "AsusAuraGPUController.h"
|
||||
#include "pci_ids.h"
|
||||
|
||||
AuraGPUController::AuraGPUController(i2c_smbus_interface* bus, aura_gpu_dev_id dev)
|
||||
AuraGPUController::AuraGPUController(i2c_smbus_interface* bus, aura_gpu_dev_id dev, std::string dev_name)
|
||||
{
|
||||
this->bus = bus;
|
||||
this->dev = dev;
|
||||
|
||||
strcpy(device_name, "ASUS Aura GPU"); // Would be nice to get the actual GPU name. Using this as a placeholder.
|
||||
this->bus = bus;
|
||||
this->dev = dev;
|
||||
this->name = dev_name;
|
||||
}
|
||||
|
||||
AuraGPUController::~AuraGPUController()
|
||||
@@ -28,7 +27,7 @@ AuraGPUController::~AuraGPUController()
|
||||
|
||||
std::string AuraGPUController::GetDeviceName()
|
||||
{
|
||||
return(device_name);
|
||||
return(name);
|
||||
}
|
||||
|
||||
std::string AuraGPUController::GetDeviceLocation()
|
||||
|
||||
@@ -43,7 +43,7 @@ enum
|
||||
class AuraGPUController
|
||||
{
|
||||
public:
|
||||
AuraGPUController(i2c_smbus_interface* bus, aura_gpu_dev_id);
|
||||
AuraGPUController(i2c_smbus_interface* bus, aura_gpu_dev_id, std::string dev_name);
|
||||
~AuraGPUController();
|
||||
|
||||
std::string GetDeviceName();
|
||||
@@ -62,7 +62,7 @@ public:
|
||||
bool direct = false; // Temporary solution to check if we are in "Direct" mode
|
||||
|
||||
private:
|
||||
char device_name[16];
|
||||
i2c_smbus_interface * bus;
|
||||
aura_gpu_dev_id dev;
|
||||
std::string name;
|
||||
};
|
||||
|
||||
@@ -56,9 +56,8 @@ void DetectAsusAuraGPUControllers(i2c_smbus_interface* bus, uint8_t i2c_addr, co
|
||||
{
|
||||
if(TestForAsusAuraGPUController(bus, i2c_addr))
|
||||
{
|
||||
AuraGPUController* controller = new AuraGPUController(bus, i2c_addr);
|
||||
AuraGPUController* controller = new AuraGPUController(bus, i2c_addr, name);
|
||||
RGBController_AuraGPU* rgb_controller = new RGBController_AuraGPU(controller);
|
||||
rgb_controller->name = name;
|
||||
|
||||
ResourceManager::get()->RegisterRGBController(rgb_controller);
|
||||
}
|
||||
@@ -74,6 +73,7 @@ REGISTER_I2C_PCI_DETECTOR("ASUS ROG STRIX GeForce GTX 1050 Ti Gaming OC",
|
||||
REGISTER_I2C_PCI_DETECTOR("ASUS ROG STRIX GeForce GTX 1050 Ti Gaming OC", DetectAsusAuraGPUControllers, NVIDIA_VEN, NVIDIA_GTX1050TI_DEV, ASUS_SUB_VEN, ASUS_ROG_STRIX_GTX1050TI_O4G_GAMING_2, 0x29);
|
||||
REGISTER_I2C_PCI_DETECTOR("ASUS ROG STRIX GeForce GTX 1060 Gaming", DetectAsusAuraGPUControllers, NVIDIA_VEN, NVIDIA_GTX1060_DEV, ASUS_SUB_VEN, ASUS_ROG_STRIX_GTX1060_6G_GAMING, 0x29);
|
||||
REGISTER_I2C_PCI_DETECTOR("ASUS ROG STRIX GeForce GTX 1060 Gaming", DetectAsusAuraGPUControllers, NVIDIA_VEN, NVIDIA_GTX1060_DEV, ASUS_SUB_VEN, ASUS_ROG_STRIX_GTX1060, 0x29);
|
||||
REGISTER_I2C_PCI_DETECTOR("ASUS ROG STRIX GeForce GTX 1060 Gaming", DetectAsusAuraGPUControllers, NVIDIA_VEN, NVIDIA_GTX1060_DEV, ASUS_SUB_VEN, ASUS_ROG_STRIX_GTX1060_865B, 0x29);
|
||||
REGISTER_I2C_PCI_DETECTOR("ASUS ROG STRIX GeForce GTX 1070 Gaming", DetectAsusAuraGPUControllers, NVIDIA_VEN, NVIDIA_GTX1070_DEV, ASUS_SUB_VEN, ASUS_ROG_STRIX_GTX1070_8G_GAMING, 0x29);
|
||||
REGISTER_I2C_PCI_DETECTOR("ASUS ROG STRIX GeForce GTX 1070 Gaming OC", DetectAsusAuraGPUControllers, NVIDIA_VEN, NVIDIA_GTX1070_DEV, ASUS_SUB_VEN, ASUS_ROG_STRIX_GTX1070_O8G_GAMING, 0x29);
|
||||
REGISTER_I2C_PCI_DETECTOR("ASUS ROG STRIX GeForce GTX 1070 OC", DetectAsusAuraGPUControllers, NVIDIA_VEN, NVIDIA_GTX1070_DEV, ASUS_SUB_VEN, ASUS_ROG_STRIX_GTX1070_OC, 0x29);
|
||||
|
||||
+7
-1
@@ -13,10 +13,11 @@
|
||||
#include "AsusAuraHeadsetStandController.h"
|
||||
#include "StringUtils.h"
|
||||
|
||||
AuraHeadsetStandController::AuraHeadsetStandController(hid_device* dev_handle, const char* path)
|
||||
AuraHeadsetStandController::AuraHeadsetStandController(hid_device* dev_handle, const char* path, std::string dev_name)
|
||||
{
|
||||
dev = dev_handle;
|
||||
location = path;
|
||||
name = dev_name;
|
||||
}
|
||||
|
||||
AuraHeadsetStandController::~AuraHeadsetStandController()
|
||||
@@ -29,6 +30,11 @@ std::string AuraHeadsetStandController::GetDeviceLocation()
|
||||
return("HID: " + location);
|
||||
}
|
||||
|
||||
std::string AuraHeadsetStandController::GetName()
|
||||
{
|
||||
return(name);
|
||||
}
|
||||
|
||||
std::string AuraHeadsetStandController::GetSerialString()
|
||||
{
|
||||
wchar_t serial_string[128];
|
||||
|
||||
+19
-17
@@ -33,31 +33,33 @@ enum
|
||||
class AuraHeadsetStandController
|
||||
{
|
||||
public:
|
||||
AuraHeadsetStandController(hid_device* dev_handle, const char* path);
|
||||
AuraHeadsetStandController(hid_device* dev_handle, const char* path, std::string dev_name);
|
||||
virtual ~AuraHeadsetStandController();
|
||||
|
||||
std::string GetDeviceLocation();
|
||||
std::string GetName();
|
||||
std::string GetSerialString();
|
||||
std::string GetVersion();
|
||||
|
||||
void UpdateLeds
|
||||
(
|
||||
std::vector<RGBColor> colors
|
||||
);
|
||||
void UpdateLeds
|
||||
(
|
||||
std::vector<RGBColor> colors
|
||||
);
|
||||
|
||||
void UpdateDevice
|
||||
(
|
||||
unsigned char mode,
|
||||
unsigned char red,
|
||||
unsigned char grn,
|
||||
unsigned char blu,
|
||||
unsigned char speed,
|
||||
unsigned char brightness
|
||||
);
|
||||
void UpdateDevice
|
||||
(
|
||||
unsigned char mode,
|
||||
unsigned char red,
|
||||
unsigned char grn,
|
||||
unsigned char blu,
|
||||
unsigned char speed,
|
||||
unsigned char brightness
|
||||
);
|
||||
|
||||
void SaveMode();
|
||||
void SaveMode();
|
||||
|
||||
private:
|
||||
hid_device* dev;
|
||||
std::string location;
|
||||
hid_device* dev;
|
||||
std::string location;
|
||||
std::string name;
|
||||
};
|
||||
|
||||
+61
-61
@@ -24,88 +24,88 @@
|
||||
|
||||
RGBController_AuraHeadsetStand::RGBController_AuraHeadsetStand(AuraHeadsetStandController* controller_ptr)
|
||||
{
|
||||
controller = controller_ptr;
|
||||
controller = controller_ptr;
|
||||
|
||||
name = "ASUS Aura Headset Stand";
|
||||
vendor = "ASUS";
|
||||
type = DEVICE_TYPE_HEADSET_STAND;
|
||||
description = "ASUS Aura Headset Stand Device";
|
||||
version = controller->GetVersion();
|
||||
location = controller->GetDeviceLocation();
|
||||
serial = controller->GetSerialString();
|
||||
name = controller->GetName();
|
||||
vendor = "ASUS";
|
||||
type = DEVICE_TYPE_HEADSET_STAND;
|
||||
description = "ASUS Aura Headset Stand Device";
|
||||
version = controller->GetVersion();
|
||||
location = controller->GetDeviceLocation();
|
||||
serial = controller->GetSerialString();
|
||||
|
||||
mode Direct;
|
||||
Direct.name = "Direct";
|
||||
Direct.value = AURA_HEADSET_STAND_MODE_DIRECT;
|
||||
Direct.flags = MODE_FLAG_HAS_PER_LED_COLOR;
|
||||
Direct.color_mode = MODE_COLORS_PER_LED;
|
||||
Direct.name = "Direct";
|
||||
Direct.value = AURA_HEADSET_STAND_MODE_DIRECT;
|
||||
Direct.flags = MODE_FLAG_HAS_PER_LED_COLOR;
|
||||
Direct.color_mode = MODE_COLORS_PER_LED;
|
||||
modes.push_back(Direct);
|
||||
|
||||
mode Static;
|
||||
Static.name = "Static";
|
||||
Static.value = AURA_HEADSET_STAND_MODE_STATIC;
|
||||
Static.flags = MODE_FLAG_HAS_MODE_SPECIFIC_COLOR | MODE_FLAG_HAS_BRIGHTNESS | MODE_FLAG_MANUAL_SAVE;
|
||||
Static.brightness_min = AURA_HEADSETSTAND_BRIGHTNESS_MIN;
|
||||
Static.brightness_max = AURA_HEADSETSTAND_BRIGHTNESS_MAX;
|
||||
Static.brightness = AURA_HEADSETSTAND_BRIGHTNESS_DEFAULT;
|
||||
Static.color_mode = MODE_COLORS_MODE_SPECIFIC;
|
||||
Static.colors_min = 1;
|
||||
Static.colors_max = 1;
|
||||
Static.name = "Static";
|
||||
Static.value = AURA_HEADSET_STAND_MODE_STATIC;
|
||||
Static.flags = MODE_FLAG_HAS_MODE_SPECIFIC_COLOR | MODE_FLAG_HAS_BRIGHTNESS | MODE_FLAG_MANUAL_SAVE;
|
||||
Static.brightness_min = AURA_HEADSETSTAND_BRIGHTNESS_MIN;
|
||||
Static.brightness_max = AURA_HEADSETSTAND_BRIGHTNESS_MAX;
|
||||
Static.brightness = AURA_HEADSETSTAND_BRIGHTNESS_DEFAULT;
|
||||
Static.color_mode = MODE_COLORS_MODE_SPECIFIC;
|
||||
Static.colors_min = 1;
|
||||
Static.colors_max = 1;
|
||||
Static.colors.resize(1);
|
||||
modes.push_back(Static);
|
||||
|
||||
mode Breathing;
|
||||
Breathing.name = "Breathing";
|
||||
Breathing.value = AURA_HEADSET_STAND_MODE_BREATHING;
|
||||
Breathing.flags = MODE_FLAG_HAS_SPEED | MODE_FLAG_HAS_MODE_SPECIFIC_COLOR | MODE_FLAG_HAS_BRIGHTNESS | MODE_FLAG_MANUAL_SAVE;
|
||||
Breathing.color_mode = MODE_COLORS_MODE_SPECIFIC;
|
||||
Breathing.speed_min = AURA_HEADSETSTAND_SPEED_MIN;
|
||||
Breathing.speed_max = AURA_HEADSETSTAND_SPEED_MAX;
|
||||
Breathing.speed = AURA_HEADSETSTAND_SPEED_DEFAULT;
|
||||
Breathing.brightness_min = AURA_HEADSETSTAND_BRIGHTNESS_MIN;
|
||||
Breathing.brightness_max = AURA_HEADSETSTAND_BRIGHTNESS_MAX;
|
||||
Breathing.brightness = AURA_HEADSETSTAND_BRIGHTNESS_DEFAULT;
|
||||
Breathing.colors_min = 1;
|
||||
Breathing.colors_max = 1;
|
||||
Breathing.name = "Breathing";
|
||||
Breathing.value = AURA_HEADSET_STAND_MODE_BREATHING;
|
||||
Breathing.flags = MODE_FLAG_HAS_SPEED | MODE_FLAG_HAS_MODE_SPECIFIC_COLOR | MODE_FLAG_HAS_BRIGHTNESS | MODE_FLAG_MANUAL_SAVE;
|
||||
Breathing.color_mode = MODE_COLORS_MODE_SPECIFIC;
|
||||
Breathing.speed_min = AURA_HEADSETSTAND_SPEED_MIN;
|
||||
Breathing.speed_max = AURA_HEADSETSTAND_SPEED_MAX;
|
||||
Breathing.speed = AURA_HEADSETSTAND_SPEED_DEFAULT;
|
||||
Breathing.brightness_min = AURA_HEADSETSTAND_BRIGHTNESS_MIN;
|
||||
Breathing.brightness_max = AURA_HEADSETSTAND_BRIGHTNESS_MAX;
|
||||
Breathing.brightness = AURA_HEADSETSTAND_BRIGHTNESS_DEFAULT;
|
||||
Breathing.colors_min = 1;
|
||||
Breathing.colors_max = 1;
|
||||
Breathing.colors.resize(1);
|
||||
modes.push_back(Breathing);
|
||||
|
||||
mode Strobing;
|
||||
Strobing.name = "Flashing";
|
||||
Strobing.value = AURA_HEADSET_STAND_MODE_STROBING;
|
||||
Strobing.flags = MODE_FLAG_HAS_MODE_SPECIFIC_COLOR | MODE_FLAG_HAS_BRIGHTNESS | MODE_FLAG_MANUAL_SAVE;
|
||||
Strobing.brightness_min = AURA_HEADSETSTAND_BRIGHTNESS_MIN;
|
||||
Strobing.brightness_max = AURA_HEADSETSTAND_BRIGHTNESS_MAX;
|
||||
Strobing.brightness = AURA_HEADSETSTAND_BRIGHTNESS_DEFAULT;
|
||||
Strobing.color_mode = MODE_COLORS_MODE_SPECIFIC;
|
||||
Strobing.colors_min = 1;
|
||||
Strobing.colors_max = 1;
|
||||
Strobing.name = "Flashing";
|
||||
Strobing.value = AURA_HEADSET_STAND_MODE_STROBING;
|
||||
Strobing.flags = MODE_FLAG_HAS_MODE_SPECIFIC_COLOR | MODE_FLAG_HAS_BRIGHTNESS | MODE_FLAG_MANUAL_SAVE;
|
||||
Strobing.brightness_min = AURA_HEADSETSTAND_BRIGHTNESS_MIN;
|
||||
Strobing.brightness_max = AURA_HEADSETSTAND_BRIGHTNESS_MAX;
|
||||
Strobing.brightness = AURA_HEADSETSTAND_BRIGHTNESS_DEFAULT;
|
||||
Strobing.color_mode = MODE_COLORS_MODE_SPECIFIC;
|
||||
Strobing.colors_min = 1;
|
||||
Strobing.colors_max = 1;
|
||||
Strobing.colors.resize(1);
|
||||
modes.push_back(Strobing);
|
||||
|
||||
mode SpectrumCycle;
|
||||
SpectrumCycle.name = "Spectrum Cycle";
|
||||
SpectrumCycle.value = AURA_HEADSET_STAND_MODE_COLOR_CYCLE;
|
||||
SpectrumCycle.flags = MODE_FLAG_HAS_SPEED | MODE_FLAG_HAS_BRIGHTNESS | MODE_FLAG_MANUAL_SAVE;
|
||||
SpectrumCycle.speed_min = AURA_HEADSETSTAND_SPEED_MIN;
|
||||
SpectrumCycle.speed_max = AURA_HEADSETSTAND_SPEED_MAX;
|
||||
SpectrumCycle.speed = AURA_HEADSETSTAND_SPEED_DEFAULT;
|
||||
SpectrumCycle.brightness_min = AURA_HEADSETSTAND_BRIGHTNESS_MIN;
|
||||
SpectrumCycle.brightness_max = AURA_HEADSETSTAND_BRIGHTNESS_MAX;
|
||||
SpectrumCycle.brightness = AURA_HEADSETSTAND_BRIGHTNESS_DEFAULT;
|
||||
SpectrumCycle.color_mode = MODE_COLORS_NONE;
|
||||
SpectrumCycle.name = "Spectrum Cycle";
|
||||
SpectrumCycle.value = AURA_HEADSET_STAND_MODE_COLOR_CYCLE;
|
||||
SpectrumCycle.flags = MODE_FLAG_HAS_SPEED | MODE_FLAG_HAS_BRIGHTNESS | MODE_FLAG_MANUAL_SAVE;
|
||||
SpectrumCycle.speed_min = AURA_HEADSETSTAND_SPEED_MIN;
|
||||
SpectrumCycle.speed_max = AURA_HEADSETSTAND_SPEED_MAX;
|
||||
SpectrumCycle.speed = AURA_HEADSETSTAND_SPEED_DEFAULT;
|
||||
SpectrumCycle.brightness_min = AURA_HEADSETSTAND_BRIGHTNESS_MIN;
|
||||
SpectrumCycle.brightness_max = AURA_HEADSETSTAND_BRIGHTNESS_MAX;
|
||||
SpectrumCycle.brightness = AURA_HEADSETSTAND_BRIGHTNESS_DEFAULT;
|
||||
SpectrumCycle.color_mode = MODE_COLORS_NONE;
|
||||
modes.push_back(SpectrumCycle);
|
||||
|
||||
mode Rainbow;
|
||||
Rainbow.name = "Rainbow Wave";
|
||||
Rainbow.value = AURA_HEADSET_STAND_MODE_RAINBOW;
|
||||
Rainbow.flags = MODE_FLAG_HAS_SPEED | MODE_FLAG_HAS_BRIGHTNESS | MODE_FLAG_MANUAL_SAVE;
|
||||
Rainbow.speed_min = AURA_HEADSETSTAND_SPEED_MIN;
|
||||
Rainbow.speed_max = AURA_HEADSETSTAND_SPEED_MAX;
|
||||
Rainbow.speed = AURA_HEADSETSTAND_SPEED_DEFAULT;
|
||||
Rainbow.brightness_min = AURA_HEADSETSTAND_BRIGHTNESS_MIN;
|
||||
Rainbow.brightness_max = AURA_HEADSETSTAND_BRIGHTNESS_MAX;
|
||||
Rainbow.brightness = AURA_HEADSETSTAND_BRIGHTNESS_DEFAULT;
|
||||
Rainbow.name = "Rainbow Wave";
|
||||
Rainbow.value = AURA_HEADSET_STAND_MODE_RAINBOW;
|
||||
Rainbow.flags = MODE_FLAG_HAS_SPEED | MODE_FLAG_HAS_BRIGHTNESS | MODE_FLAG_MANUAL_SAVE;
|
||||
Rainbow.speed_min = AURA_HEADSETSTAND_SPEED_MIN;
|
||||
Rainbow.speed_max = AURA_HEADSETSTAND_SPEED_MAX;
|
||||
Rainbow.speed = AURA_HEADSETSTAND_SPEED_DEFAULT;
|
||||
Rainbow.brightness_min = AURA_HEADSETSTAND_BRIGHTNESS_MIN;
|
||||
Rainbow.brightness_max = AURA_HEADSETSTAND_BRIGHTNESS_MAX;
|
||||
Rainbow.brightness = AURA_HEADSETSTAND_BRIGHTNESS_DEFAULT;
|
||||
modes.push_back(Rainbow);
|
||||
SetupZones();
|
||||
}
|
||||
|
||||
+7
-1
@@ -13,10 +13,11 @@
|
||||
#include "AsusAuraKeyboardController.h"
|
||||
#include "StringUtils.h"
|
||||
|
||||
AuraKeyboardController::AuraKeyboardController(hid_device* dev_handle, const char* path)
|
||||
AuraKeyboardController::AuraKeyboardController(hid_device* dev_handle, const char* path, std::string dev_name)
|
||||
{
|
||||
dev = dev_handle;
|
||||
location = path;
|
||||
name = dev_name;
|
||||
}
|
||||
|
||||
AuraKeyboardController::~AuraKeyboardController()
|
||||
@@ -29,6 +30,11 @@ std::string AuraKeyboardController::GetDeviceLocation()
|
||||
return("HID: " + location);
|
||||
}
|
||||
|
||||
std::string AuraKeyboardController::GetNameString()
|
||||
{
|
||||
return(name);
|
||||
}
|
||||
|
||||
std::string AuraKeyboardController::GetSerialString()
|
||||
{
|
||||
wchar_t serial_string[128];
|
||||
|
||||
+10
-8
@@ -19,19 +19,21 @@
|
||||
class AuraKeyboardController
|
||||
{
|
||||
public:
|
||||
AuraKeyboardController(hid_device* dev_handle, const char* path);
|
||||
AuraKeyboardController(hid_device* dev_handle, const char* path, std::string dev_name);
|
||||
virtual ~AuraKeyboardController();
|
||||
|
||||
std::string GetDeviceLocation();
|
||||
std::string GetNameString();
|
||||
std::string GetSerialString();
|
||||
|
||||
void SendDirect
|
||||
(
|
||||
unsigned char frame_count,
|
||||
unsigned char * frame_data
|
||||
);
|
||||
void SendDirect
|
||||
(
|
||||
unsigned char frame_count,
|
||||
unsigned char * frame_data
|
||||
);
|
||||
|
||||
private:
|
||||
hid_device* dev;
|
||||
std::string location;
|
||||
hid_device* dev;
|
||||
std::string location;
|
||||
std::string name;
|
||||
};
|
||||
|
||||
+12
-12
@@ -358,21 +358,21 @@ static const std::vector<aura_keyboard_led> default_65pct_led_names =
|
||||
|
||||
RGBController_AuraKeyboard::RGBController_AuraKeyboard(AuraKeyboardController* controller_ptr, AuraKeyboardMappingLayoutType keyboard_layout)
|
||||
{
|
||||
controller = controller_ptr;
|
||||
layout = keyboard_layout;
|
||||
controller = controller_ptr;
|
||||
layout = keyboard_layout;
|
||||
|
||||
name = "ASUS Aura Keyboard";
|
||||
vendor = "ASUS";
|
||||
type = DEVICE_TYPE_KEYBOARD;
|
||||
description = "ASUS Aura Keyboard Device";
|
||||
location = controller->GetDeviceLocation();
|
||||
serial = controller->GetSerialString();
|
||||
name = controller->GetNameString();
|
||||
vendor = "ASUS";
|
||||
type = DEVICE_TYPE_KEYBOARD;
|
||||
description = "ASUS Aura Keyboard Device";
|
||||
location = controller->GetDeviceLocation();
|
||||
serial = controller->GetSerialString();
|
||||
|
||||
mode Direct;
|
||||
Direct.name = "Direct";
|
||||
Direct.value = 0;
|
||||
Direct.flags = MODE_FLAG_HAS_PER_LED_COLOR;
|
||||
Direct.color_mode = MODE_COLORS_PER_LED;
|
||||
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();
|
||||
|
||||
+7
-1
@@ -14,11 +14,12 @@
|
||||
#include "LogManager.h"
|
||||
#include "StringUtils.h"
|
||||
|
||||
AuraMonitorController::AuraMonitorController(hid_device* dev_handle, const char* path, uint16_t pid)
|
||||
AuraMonitorController::AuraMonitorController(hid_device* dev_handle, const char* path, uint16_t pid, std::string dev_name)
|
||||
{
|
||||
dev = dev_handle;
|
||||
location = path;
|
||||
device_pid = pid;
|
||||
name = dev_name;
|
||||
}
|
||||
|
||||
AuraMonitorController::~AuraMonitorController()
|
||||
@@ -31,6 +32,11 @@ std::string AuraMonitorController::GetDeviceLocation()
|
||||
return("HID: " + location);
|
||||
}
|
||||
|
||||
std::string AuraMonitorController::GetNameString()
|
||||
{
|
||||
return(name);
|
||||
}
|
||||
|
||||
std::string AuraMonitorController::GetSerialString()
|
||||
{
|
||||
wchar_t serial_string[128];
|
||||
|
||||
+9
-7
@@ -27,19 +27,21 @@ enum
|
||||
class AuraMonitorController
|
||||
{
|
||||
public:
|
||||
AuraMonitorController(hid_device* dev_handle, const char* path, uint16_t pid);
|
||||
AuraMonitorController(hid_device* dev_handle, const char* path, uint16_t pid, std::string dev_name);
|
||||
virtual ~AuraMonitorController();
|
||||
|
||||
std::string GetDeviceLocation();
|
||||
std::string GetNameString();
|
||||
std::string GetSerialString();
|
||||
|
||||
void BeginUpdate();
|
||||
void UpdateLed(int led, unsigned char red, unsigned char green, unsigned char blue);
|
||||
void ApplyChanges();
|
||||
void BeginUpdate();
|
||||
void UpdateLed(int led, unsigned char red, unsigned char green, unsigned char blue);
|
||||
void ApplyChanges();
|
||||
|
||||
uint16_t device_pid;
|
||||
uint16_t device_pid;
|
||||
|
||||
private:
|
||||
hid_device* dev;
|
||||
std::string location;
|
||||
hid_device* dev;
|
||||
std::string location;
|
||||
std::string name;
|
||||
};
|
||||
|
||||
+11
-11
@@ -24,20 +24,20 @@
|
||||
|
||||
RGBController_AuraMonitor::RGBController_AuraMonitor(AuraMonitorController* controller_ptr)
|
||||
{
|
||||
controller = controller_ptr;
|
||||
controller = controller_ptr;
|
||||
|
||||
name = "ASUS Aura Monitor";
|
||||
vendor = "ASUS";
|
||||
type = DEVICE_TYPE_MONITOR;
|
||||
description = "ASUS Aura Monitor Device";
|
||||
location = controller->GetDeviceLocation();
|
||||
serial = controller->GetSerialString();
|
||||
name = controller->GetNameString();
|
||||
vendor = "ASUS";
|
||||
type = DEVICE_TYPE_MONITOR;
|
||||
description = "ASUS Aura Monitor Device";
|
||||
location = controller->GetDeviceLocation();
|
||||
serial = controller->GetSerialString();
|
||||
|
||||
mode Direct;
|
||||
Direct.name = "Direct";
|
||||
Direct.value = 0;
|
||||
Direct.flags = MODE_FLAG_HAS_PER_LED_COLOR;
|
||||
Direct.color_mode = MODE_COLORS_PER_LED;
|
||||
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();
|
||||
|
||||
+32
-24
@@ -13,11 +13,14 @@
|
||||
#include "AsusAuraMouseController.h"
|
||||
#include "StringUtils.h"
|
||||
|
||||
AuraMouseController::AuraMouseController(hid_device* dev_handle, const char* path, uint16_t pid)
|
||||
#define HID_MAX_STR 255
|
||||
|
||||
AuraMouseController::AuraMouseController(hid_device* dev_handle, const char* path, uint16_t pid, std::string dev_name)
|
||||
{
|
||||
dev = dev_handle;
|
||||
location = path;
|
||||
device_pid = pid;
|
||||
name = dev_name;
|
||||
}
|
||||
|
||||
AuraMouseController::~AuraMouseController()
|
||||
@@ -30,30 +33,9 @@ std::string AuraMouseController::GetDeviceLocation()
|
||||
return("HID: " + location);
|
||||
}
|
||||
|
||||
std::string AuraMouseController::CleanSerial(const std::wstring& wstr)
|
||||
std::string AuraMouseController::GetName()
|
||||
{
|
||||
/*---------------------------------------------------------------*\
|
||||
| Cleans garbage at the end of serial numbers |
|
||||
| (apparently 2 characters too much, but maybe variable) |
|
||||
| Limited to new devices, old ones don't even have serial numbers |
|
||||
\*---------------------------------------------------------------*/
|
||||
std::string result;
|
||||
for(wchar_t c : wstr)
|
||||
{
|
||||
/*-----------------------------------------------------*\
|
||||
| Forbid anything besides digits and upper case letters |
|
||||
\*-----------------------------------------------------*/
|
||||
bool isUpperCaseLetter = (c >= 64 && c <= 90);
|
||||
bool isDigit = (c >= 48 && c <= 57);
|
||||
if(!isUpperCaseLetter && !isDigit)
|
||||
{
|
||||
break;
|
||||
}
|
||||
|
||||
result += (char)c;
|
||||
}
|
||||
|
||||
return(result);
|
||||
return(name);
|
||||
}
|
||||
|
||||
std::string AuraMouseController::GetSerialString()
|
||||
@@ -123,6 +105,32 @@ std::string AuraMouseController::GetVersion(bool wireless, int protocol)
|
||||
return str;
|
||||
}
|
||||
|
||||
std::string AuraMouseController::CleanSerial(const std::wstring& wstr)
|
||||
{
|
||||
/*---------------------------------------------------------------*\
|
||||
| Cleans garbage at the end of serial numbers |
|
||||
| (apparently 2 characters too much, but maybe variable) |
|
||||
| Limited to new devices, old ones don't even have serial numbers |
|
||||
\*---------------------------------------------------------------*/
|
||||
std::string result;
|
||||
for(wchar_t c : wstr)
|
||||
{
|
||||
/*-----------------------------------------------------*\
|
||||
| Forbid anything besides digits and upper case letters |
|
||||
\*-----------------------------------------------------*/
|
||||
bool isUpperCaseLetter = (c >= 64 && c <= 90);
|
||||
bool isDigit = (c >= 48 && c <= 57);
|
||||
if(!isUpperCaseLetter && !isDigit)
|
||||
{
|
||||
break;
|
||||
}
|
||||
|
||||
result += (char)c;
|
||||
}
|
||||
|
||||
return(result);
|
||||
}
|
||||
|
||||
void AuraMouseController::SaveMode()
|
||||
{
|
||||
unsigned char usb_save_buf[ASUS_AURA_MOUSE_PACKET_SIZE] = { 0x00, 0x50, 0x03 };
|
||||
|
||||
+25
-23
@@ -17,40 +17,42 @@
|
||||
#include "AsusAuraMouseDevices.h"
|
||||
|
||||
#define ASUS_AURA_MOUSE_PACKET_SIZE 65
|
||||
#define HID_MAX_STR 255
|
||||
|
||||
class AuraMouseController
|
||||
{
|
||||
public:
|
||||
AuraMouseController(hid_device* dev_handle, const char* path, uint16_t pid);
|
||||
AuraMouseController(hid_device* dev_handle, const char* path, uint16_t pid, std::string dev_name);
|
||||
virtual ~AuraMouseController();
|
||||
|
||||
std::string GetDeviceLocation();
|
||||
std::string CleanSerial(const std::wstring& wstr);
|
||||
std::string GetName();
|
||||
std::string GetSerialString();
|
||||
std::string GetVersion(bool wireless, int protocol);
|
||||
|
||||
void SaveMode();
|
||||
void SendUpdate
|
||||
(
|
||||
unsigned char zone,
|
||||
unsigned char mode,
|
||||
unsigned char red,
|
||||
unsigned char grn,
|
||||
unsigned char blu,
|
||||
unsigned char dir,
|
||||
bool random,
|
||||
unsigned char speed,
|
||||
unsigned char brightness
|
||||
);
|
||||
void SendDirect
|
||||
(
|
||||
std::vector<RGBColor> zone_colors
|
||||
);
|
||||
std::string CleanSerial(const std::wstring& wstr);
|
||||
|
||||
uint16_t device_pid;
|
||||
void SaveMode();
|
||||
void SendUpdate
|
||||
(
|
||||
unsigned char zone,
|
||||
unsigned char mode,
|
||||
unsigned char red,
|
||||
unsigned char grn,
|
||||
unsigned char blu,
|
||||
unsigned char dir,
|
||||
bool random,
|
||||
unsigned char speed,
|
||||
unsigned char brightness
|
||||
);
|
||||
void SendDirect
|
||||
(
|
||||
std::vector<RGBColor> zone_colors
|
||||
);
|
||||
|
||||
uint16_t device_pid;
|
||||
|
||||
private:
|
||||
hid_device* dev;
|
||||
std::string location;
|
||||
hid_device* dev;
|
||||
std::string location;
|
||||
std::string name;
|
||||
};
|
||||
|
||||
+11
-11
@@ -33,19 +33,19 @@ static std::string aura_mouse_zone_names[5]
|
||||
|
||||
RGBController_AuraMouse::RGBController_AuraMouse(AuraMouseController* controller_ptr)
|
||||
{
|
||||
controller = controller_ptr;
|
||||
controller = controller_ptr;
|
||||
|
||||
pid = controller->device_pid;
|
||||
pid = controller->device_pid;
|
||||
|
||||
name = "ASUS Aura Mouse";
|
||||
vendor = "ASUS";
|
||||
type = DEVICE_TYPE_MOUSE;
|
||||
description = "ASUS Aura Mouse Device";
|
||||
version = controller->GetVersion(aura_mouse_devices[pid].wireless, aura_mouse_devices[pid].version_protocol);
|
||||
location = controller->GetDeviceLocation();
|
||||
serial = controller->GetSerialString();
|
||||
name = controller->GetName();
|
||||
vendor = "ASUS";
|
||||
type = DEVICE_TYPE_MOUSE;
|
||||
description = "ASUS Aura Mouse Device";
|
||||
version = controller->GetVersion(aura_mouse_devices[pid].wireless, aura_mouse_devices[pid].version_protocol);
|
||||
location = controller->GetDeviceLocation();
|
||||
serial = controller->GetSerialString();
|
||||
|
||||
std::vector<uint8_t> mm = aura_mouse_devices[pid].mouse_modes;
|
||||
std::vector<uint8_t> mm = aura_mouse_devices[pid].mouse_modes;
|
||||
|
||||
if(aura_mouse_devices[pid].direct)
|
||||
{
|
||||
@@ -57,7 +57,7 @@ RGBController_AuraMouse::RGBController_AuraMouse(AuraMouseController* controller
|
||||
modes.push_back(Direct);
|
||||
}
|
||||
|
||||
int mode_value = 0;
|
||||
int mode_value = 0;
|
||||
|
||||
for(std::vector<uint8_t>::iterator it = mm.begin(); it != mm.end(); it++)
|
||||
{
|
||||
|
||||
+7
-1
@@ -15,11 +15,12 @@
|
||||
#include "AsusAuraMouseGen1Controller.h"
|
||||
#include "StringUtils.h"
|
||||
|
||||
AsusAuraMouseGen1Controller::AsusAuraMouseGen1Controller(hid_device* dev_handle, const char* path, uint16_t pid)
|
||||
AsusAuraMouseGen1Controller::AsusAuraMouseGen1Controller(hid_device* dev_handle, const char* path, uint16_t pid, std::string dev_name)
|
||||
{
|
||||
dev = dev_handle;
|
||||
location = path;
|
||||
device_pid = pid;
|
||||
name = dev_name;
|
||||
}
|
||||
|
||||
AsusAuraMouseGen1Controller::~AsusAuraMouseGen1Controller()
|
||||
@@ -32,6 +33,11 @@ std::string AsusAuraMouseGen1Controller::GetDeviceLocation()
|
||||
return("HID: " + location);
|
||||
}
|
||||
|
||||
std::string AsusAuraMouseGen1Controller::GetName()
|
||||
{
|
||||
return(name);
|
||||
}
|
||||
|
||||
std::string AsusAuraMouseGen1Controller::GetSerialString()
|
||||
{
|
||||
wchar_t serial_string[HID_MAX_STR];
|
||||
|
||||
+22
-18
@@ -21,33 +21,37 @@
|
||||
class AsusAuraMouseGen1Controller
|
||||
{
|
||||
public:
|
||||
AsusAuraMouseGen1Controller(hid_device* dev_handle, const char* path, uint16_t pid);
|
||||
AsusAuraMouseGen1Controller(hid_device* dev_handle, const char* path, uint16_t pid, std::string dev_name);
|
||||
virtual ~AsusAuraMouseGen1Controller();
|
||||
|
||||
std::string GetDeviceLocation();
|
||||
std::string GetName();
|
||||
std::string GetSerialString();
|
||||
std::string GetVersion();
|
||||
int GetActiveProfile();
|
||||
|
||||
void SendUpdate
|
||||
(
|
||||
unsigned char key,
|
||||
unsigned char value
|
||||
);
|
||||
int GetActiveProfile();
|
||||
|
||||
void UpdateProfile
|
||||
(
|
||||
unsigned char key,
|
||||
unsigned char profile,
|
||||
unsigned char value
|
||||
);
|
||||
void SendDirectSpatha(std::vector<RGBColor> colors);
|
||||
void SendUpdate
|
||||
(
|
||||
unsigned char key,
|
||||
unsigned char value
|
||||
);
|
||||
|
||||
void ResetToSavedLighting();
|
||||
void UpdateProfile
|
||||
(
|
||||
unsigned char key,
|
||||
unsigned char profile,
|
||||
unsigned char value
|
||||
);
|
||||
|
||||
uint16_t device_pid;
|
||||
void SendDirectSpatha(std::vector<RGBColor> colors);
|
||||
|
||||
void ResetToSavedLighting();
|
||||
|
||||
uint16_t device_pid;
|
||||
|
||||
private:
|
||||
hid_device* dev;
|
||||
std::string location;
|
||||
hid_device* dev;
|
||||
std::string location;
|
||||
std::string name;
|
||||
};
|
||||
|
||||
+1
-1
@@ -30,7 +30,7 @@ RGBController_AsusROGSpatha::RGBController_AsusROGSpatha(AsusAuraMouseGen1Contro
|
||||
{
|
||||
controller = controller_ptr;
|
||||
|
||||
name = "ASUS ROG Spatha";
|
||||
name = controller->GetName();
|
||||
vendor = "ASUS";
|
||||
type = DEVICE_TYPE_MOUSE;
|
||||
description = "ASUS Aura Mouse Device";
|
||||
|
||||
+1
-1
@@ -26,7 +26,7 @@ RGBController_AsusROGStrixEvolve::RGBController_AsusROGStrixEvolve(AsusAuraMouse
|
||||
{
|
||||
controller = controller_ptr;
|
||||
|
||||
name = "ASUS ROG Strix Evolve";
|
||||
name = controller->GetName();
|
||||
vendor = "ASUS";
|
||||
type = DEVICE_TYPE_MOUSE;
|
||||
description = "ASUS Aura Mouse Device";
|
||||
|
||||
+7
-1
@@ -13,10 +13,11 @@
|
||||
#include "AsusAuraMousematController.h"
|
||||
#include "StringUtils.h"
|
||||
|
||||
AuraMousematController::AuraMousematController(hid_device* dev_handle, const char* path)
|
||||
AuraMousematController::AuraMousematController(hid_device* dev_handle, const char* path, std::string dev_name)
|
||||
{
|
||||
dev = dev_handle;
|
||||
location = path;
|
||||
name = dev_name;
|
||||
}
|
||||
|
||||
AuraMousematController::~AuraMousematController()
|
||||
@@ -29,6 +30,11 @@ std::string AuraMousematController::GetDeviceLocation()
|
||||
return("HID: " + location);
|
||||
}
|
||||
|
||||
std::string AuraMousematController::GetName()
|
||||
{
|
||||
return(name);
|
||||
}
|
||||
|
||||
std::string AuraMousematController::GetSerialString()
|
||||
{
|
||||
wchar_t serial_string[128];
|
||||
|
||||
+18
-16
@@ -31,30 +31,32 @@ enum
|
||||
class AuraMousematController
|
||||
{
|
||||
public:
|
||||
AuraMousematController(hid_device* dev_handle, const char* path);
|
||||
AuraMousematController(hid_device* dev_handle, const char* path, std::string dev_name);
|
||||
virtual ~AuraMousematController();
|
||||
|
||||
std::string GetDeviceLocation();
|
||||
std::string GetName();
|
||||
std::string GetSerialString();
|
||||
std::string GetVersion();
|
||||
|
||||
void UpdateLeds
|
||||
(
|
||||
std::vector<RGBColor> colors
|
||||
);
|
||||
void UpdateLeds
|
||||
(
|
||||
std::vector<RGBColor> colors
|
||||
);
|
||||
|
||||
void UpdateDevice
|
||||
(
|
||||
unsigned char mode,
|
||||
std::vector<RGBColor> colors,
|
||||
unsigned char speed,
|
||||
unsigned char brightness,
|
||||
unsigned char pattern
|
||||
);
|
||||
void UpdateDevice
|
||||
(
|
||||
unsigned char mode,
|
||||
std::vector<RGBColor> colors,
|
||||
unsigned char speed,
|
||||
unsigned char brightness,
|
||||
unsigned char pattern
|
||||
);
|
||||
|
||||
void SaveMode();
|
||||
void SaveMode();
|
||||
|
||||
private:
|
||||
hid_device* dev;
|
||||
std::string location;
|
||||
hid_device* dev;
|
||||
std::string location;
|
||||
std::string name;
|
||||
};
|
||||
|
||||
+1
-1
@@ -26,7 +26,7 @@ RGBController_AuraMousemat::RGBController_AuraMousemat(AuraMousematController* c
|
||||
{
|
||||
controller = controller_ptr;
|
||||
|
||||
name = "ASUS Aura Mousemat";
|
||||
name = controller->GetName();
|
||||
vendor = "ASUS";
|
||||
type = DEVICE_TYPE_MOUSEMAT;
|
||||
description = "ASUS Aura Mousemat Device";
|
||||
|
||||
+1
-1
@@ -12,7 +12,7 @@
|
||||
|
||||
#include "AsusAuraRyuoAIOController.h"
|
||||
|
||||
AsusAuraRyuoAIOController::AsusAuraRyuoAIOController(hid_device* dev_handle, const char* path) : AuraUSBController(dev_handle, path)
|
||||
AsusAuraRyuoAIOController::AsusAuraRyuoAIOController(hid_device* dev_handle, const char* path, std::string dev_name) : AuraUSBController(dev_handle, path, dev_name)
|
||||
{
|
||||
/*-----------------------------------------------------*\
|
||||
| Add addressable devices |
|
||||
|
||||
+1
-1
@@ -60,7 +60,7 @@ public:
|
||||
SPEED_FASTEST = 0x00, // Fastest speed
|
||||
};
|
||||
|
||||
AsusAuraRyuoAIOController(hid_device* dev_handle, const char* path);
|
||||
AsusAuraRyuoAIOController(hid_device* dev_handle, const char* path, std::string dev_name);
|
||||
~AsusAuraRyuoAIOController();
|
||||
|
||||
std::string GetLocation();
|
||||
|
||||
+1
-1
@@ -29,7 +29,7 @@ RGBController_AsusAuraRyuoAIO::RGBController_AsusAuraRyuoAIO(AsusAuraRyuoAIOCont
|
||||
controller = controller_ptr;
|
||||
uint8_t speed = controller->SPEED_NORMAL;
|
||||
|
||||
name = "ROG Ryuo AIO";
|
||||
name = controller->GetDeviceName();
|
||||
vendor = "ASUS";
|
||||
type = DEVICE_TYPE_COOLER;
|
||||
description = "ASUS Liquid Cooler with 120mm and 240mm radiators.";
|
||||
|
||||
+9
-1
@@ -19,10 +19,13 @@
|
||||
#include "AsusAuraTUFKeyboardController.h"
|
||||
#include "StringUtils.h"
|
||||
|
||||
AuraTUFKeyboardController::AuraTUFKeyboardController(hid_device* dev_handle, const char* path, uint16_t pid, unsigned short version)
|
||||
#define HID_MAX_STR 128
|
||||
|
||||
AuraTUFKeyboardController::AuraTUFKeyboardController(hid_device* dev_handle, const char* path, uint16_t pid, unsigned short version, std::string dev_name)
|
||||
{
|
||||
dev = dev_handle;
|
||||
location = path;
|
||||
name = dev_name;
|
||||
device_pid = pid;
|
||||
rev_version = version;
|
||||
|
||||
@@ -39,6 +42,11 @@ std::string AuraTUFKeyboardController::GetDeviceLocation()
|
||||
return("HID: " + location);
|
||||
}
|
||||
|
||||
std::string AuraTUFKeyboardController::GetName()
|
||||
{
|
||||
return(name);
|
||||
}
|
||||
|
||||
std::string AuraTUFKeyboardController::GetSerialString()
|
||||
{
|
||||
wchar_t serial_string[HID_MAX_STR];
|
||||
|
||||
+58
-56
@@ -17,8 +17,6 @@
|
||||
#include "RGBController.h"
|
||||
#include "AsusAuraTUFKeyboardLayouts.h"
|
||||
|
||||
#define HID_MAX_STR 128
|
||||
|
||||
enum
|
||||
{
|
||||
AURA_KEYBOARD_MODE_STATIC = 0,
|
||||
@@ -69,77 +67,81 @@ struct led_color
|
||||
class AuraTUFKeyboardController
|
||||
{
|
||||
public:
|
||||
AuraTUFKeyboardController(hid_device* dev_handle, const char* path, uint16_t pid, unsigned short version);
|
||||
AuraTUFKeyboardController(hid_device* dev_handle, const char* path, uint16_t pid, unsigned short version, std::string dev_name);
|
||||
~AuraTUFKeyboardController();
|
||||
|
||||
std::string GetDeviceLocation();
|
||||
std::string GetName();
|
||||
std::string GetSerialString();
|
||||
std::string GetVersion();
|
||||
|
||||
int GetLayout();
|
||||
int GetNumpadLocation();
|
||||
void SaveMode();
|
||||
void AllowRemoteControl(unsigned char type);
|
||||
|
||||
void UpdateSingleLed
|
||||
(
|
||||
int led,
|
||||
unsigned char red,
|
||||
unsigned char green,
|
||||
unsigned char blue
|
||||
);
|
||||
void UpdateSingleLed
|
||||
(
|
||||
int led,
|
||||
unsigned char red,
|
||||
unsigned char green,
|
||||
unsigned char blue
|
||||
);
|
||||
|
||||
void UpdateLeds
|
||||
(
|
||||
std::vector<led_color> colors
|
||||
);
|
||||
void UpdateLeds
|
||||
(
|
||||
std::vector<led_color> colors
|
||||
);
|
||||
|
||||
void UpdateK1Wave
|
||||
(
|
||||
std::vector<RGBColor> colors,
|
||||
unsigned char direction,
|
||||
unsigned char speed,
|
||||
unsigned char brightness
|
||||
);
|
||||
void UpdateK1Wave
|
||||
(
|
||||
std::vector<RGBColor> colors,
|
||||
unsigned char direction,
|
||||
unsigned char speed,
|
||||
unsigned char brightness
|
||||
);
|
||||
|
||||
void UpdateScopeIIRainbowRipple
|
||||
(
|
||||
unsigned char mode,
|
||||
std::vector<RGBColor> colors,
|
||||
unsigned char direction,
|
||||
unsigned char color_mode,
|
||||
unsigned char speed,
|
||||
unsigned char brightness
|
||||
);
|
||||
void UpdateScopeIIRainbowRipple
|
||||
(
|
||||
unsigned char mode,
|
||||
std::vector<RGBColor> colors,
|
||||
unsigned char direction,
|
||||
unsigned char color_mode,
|
||||
unsigned char speed,
|
||||
unsigned char brightness
|
||||
);
|
||||
|
||||
void UpdateScopeIIQuicksand
|
||||
(
|
||||
std::vector<RGBColor> colors,
|
||||
unsigned char direction,
|
||||
unsigned char color_mode,
|
||||
unsigned char speed,
|
||||
unsigned char brightness
|
||||
);
|
||||
void UpdateScopeIIQuicksand
|
||||
(
|
||||
std::vector<RGBColor> colors,
|
||||
unsigned char direction,
|
||||
unsigned char color_mode,
|
||||
unsigned char speed,
|
||||
unsigned char brightness
|
||||
);
|
||||
|
||||
void UpdateDevice
|
||||
(
|
||||
unsigned char mode,
|
||||
std::vector<RGBColor> colors,
|
||||
unsigned char direction,
|
||||
unsigned char color_mode,
|
||||
unsigned char speed,
|
||||
unsigned char brightness
|
||||
);
|
||||
void UpdateQuicksandColors(std::vector<RGBColor> colors);
|
||||
void UpdateMode(unsigned char mode);
|
||||
void AwaitResponse(int ms);
|
||||
void ClearResponses();
|
||||
void UpdateDevice
|
||||
(
|
||||
unsigned char mode,
|
||||
std::vector<RGBColor> colors,
|
||||
unsigned char direction,
|
||||
unsigned char color_mode,
|
||||
unsigned char speed,
|
||||
unsigned char brightness
|
||||
);
|
||||
|
||||
uint16_t device_pid;
|
||||
bool is_per_led_keyboard;
|
||||
void UpdateQuicksandColors(std::vector<RGBColor> colors);
|
||||
void UpdateMode(unsigned char mode);
|
||||
void AwaitResponse(int ms);
|
||||
void ClearResponses();
|
||||
|
||||
uint16_t device_pid;
|
||||
bool is_per_led_keyboard;
|
||||
|
||||
private:
|
||||
hid_device* dev;
|
||||
std::string location;
|
||||
unsigned short rev_version;
|
||||
hid_device* dev;
|
||||
std::string location;
|
||||
std::string name;
|
||||
unsigned short rev_version;
|
||||
};
|
||||
|
||||
|
||||
+155
-147
@@ -26,19 +26,19 @@
|
||||
|
||||
RGBController_AuraTUFKeyboard::RGBController_AuraTUFKeyboard(AuraTUFKeyboardController* controller_ptr)
|
||||
{
|
||||
controller = controller_ptr;
|
||||
controller = controller_ptr;
|
||||
|
||||
pid = controller->device_pid;
|
||||
pid = controller->device_pid;
|
||||
|
||||
if(pid != AURA_ROG_CLAYMORE_PID)
|
||||
{
|
||||
name = "ASUS Aura Keyboard";
|
||||
vendor = "ASUS";
|
||||
type = DEVICE_TYPE_KEYBOARD;
|
||||
description = "ASUS Aura Keyboard Device";
|
||||
version = controller->GetVersion();
|
||||
location = controller->GetDeviceLocation();
|
||||
serial = controller->GetSerialString();
|
||||
name = controller->GetName();
|
||||
vendor = "ASUS";
|
||||
type = DEVICE_TYPE_KEYBOARD;
|
||||
description = "ASUS Aura Keyboard Device";
|
||||
version = controller->GetVersion();
|
||||
location = controller->GetDeviceLocation();
|
||||
serial = controller->GetSerialString();
|
||||
|
||||
unsigned char AURA_KEYBOARD_SPEED_MIN = 0;
|
||||
unsigned char AURA_KEYBOARD_SPEED_MAX = 0;
|
||||
@@ -51,6 +51,7 @@ RGBController_AuraTUFKeyboard::RGBController_AuraTUFKeyboard(AuraTUFKeyboardCont
|
||||
AURA_KEYBOARD_SPEED_MAX = 2;
|
||||
AURA_KEYBOARD_SPEED_DEFAULT = 1;
|
||||
break;
|
||||
|
||||
case AURA_ROG_STRIX_FLARE_PID:
|
||||
case AURA_ROG_STRIX_FLARE_PNK_LTD_PID:
|
||||
case AURA_ROG_STRIX_FLARE_COD_BO4_PID:
|
||||
@@ -60,6 +61,7 @@ RGBController_AuraTUFKeyboard::RGBController_AuraTUFKeyboard(AuraTUFKeyboardCont
|
||||
AURA_KEYBOARD_SPEED_MAX = 0;
|
||||
AURA_KEYBOARD_SPEED_DEFAULT = 8;
|
||||
break;
|
||||
|
||||
case AURA_ROG_AZOTH_USB_PID:
|
||||
case AURA_ROG_AZOTH_2_4_PID:
|
||||
case AURA_ROG_FALCHION_WIRED_PID:
|
||||
@@ -79,77 +81,83 @@ RGBController_AuraTUFKeyboard::RGBController_AuraTUFKeyboard(AuraTUFKeyboardCont
|
||||
AURA_KEYBOARD_SPEED_MAX = 0;
|
||||
AURA_KEYBOARD_SPEED_DEFAULT = 30;
|
||||
break;
|
||||
|
||||
default:
|
||||
AURA_KEYBOARD_SPEED_MIN = 15;
|
||||
AURA_KEYBOARD_SPEED_MAX = 0;
|
||||
AURA_KEYBOARD_SPEED_DEFAULT = 8;
|
||||
break;
|
||||
}
|
||||
|
||||
mode Direct;
|
||||
Direct.name = "Direct";
|
||||
Direct.value = AURA_KEYBOARD_MODE_DIRECT;
|
||||
Direct.flags = MODE_FLAG_HAS_PER_LED_COLOR;
|
||||
Direct.color_mode = MODE_COLORS_PER_LED;
|
||||
Direct.name = "Direct";
|
||||
Direct.value = AURA_KEYBOARD_MODE_DIRECT;
|
||||
Direct.flags = MODE_FLAG_HAS_PER_LED_COLOR;
|
||||
Direct.color_mode = MODE_COLORS_PER_LED;
|
||||
modes.push_back(Direct);
|
||||
|
||||
mode Static;
|
||||
Static.name = "Static";
|
||||
Static.value = AURA_KEYBOARD_MODE_STATIC;
|
||||
Static.flags = MODE_FLAG_HAS_MODE_SPECIFIC_COLOR | MODE_FLAG_MANUAL_SAVE | MODE_FLAG_HAS_BRIGHTNESS;
|
||||
Static.brightness_min = AURA_KEYBOARD_BRIGHTNESS_MIN;
|
||||
Static.brightness_max = AURA_KEYBOARD_BRIGHTNESS_MAX;
|
||||
Static.brightness = AURA_KEYBOARD_BRIGHTNESS_DEFAULT;
|
||||
Static.color_mode = MODE_COLORS_MODE_SPECIFIC;
|
||||
Static.colors_min = 1;
|
||||
Static.colors_max = 1;
|
||||
Static.name = "Static";
|
||||
Static.value = AURA_KEYBOARD_MODE_STATIC;
|
||||
Static.flags = MODE_FLAG_HAS_MODE_SPECIFIC_COLOR | MODE_FLAG_MANUAL_SAVE | MODE_FLAG_HAS_BRIGHTNESS;
|
||||
Static.brightness_min = AURA_KEYBOARD_BRIGHTNESS_MIN;
|
||||
Static.brightness_max = AURA_KEYBOARD_BRIGHTNESS_MAX;
|
||||
Static.brightness = AURA_KEYBOARD_BRIGHTNESS_DEFAULT;
|
||||
Static.color_mode = MODE_COLORS_MODE_SPECIFIC;
|
||||
Static.colors_min = 1;
|
||||
Static.colors_max = 1;
|
||||
Static.colors.resize(1);
|
||||
modes.push_back(Static);
|
||||
|
||||
mode Breathing;
|
||||
Breathing.name = "Breathing";
|
||||
Breathing.value = AURA_KEYBOARD_MODE_BREATHING;
|
||||
Breathing.flags = MODE_FLAG_HAS_MODE_SPECIFIC_COLOR | MODE_FLAG_HAS_SPEED | MODE_FLAG_MANUAL_SAVE | MODE_FLAG_HAS_BRIGHTNESS;
|
||||
if(controller->is_per_led_keyboard) Breathing.flags |= MODE_FLAG_HAS_RANDOM_COLOR;
|
||||
|
||||
Breathing.speed_min = AURA_KEYBOARD_SPEED_MIN;
|
||||
Breathing.speed_max = AURA_KEYBOARD_SPEED_MAX;
|
||||
Breathing.speed = AURA_KEYBOARD_SPEED_DEFAULT;
|
||||
Breathing.brightness_min = AURA_KEYBOARD_BRIGHTNESS_MIN;
|
||||
Breathing.brightness_max = AURA_KEYBOARD_BRIGHTNESS_MAX;
|
||||
Breathing.brightness = AURA_KEYBOARD_BRIGHTNESS_DEFAULT;
|
||||
Breathing.color_mode = MODE_COLORS_MODE_SPECIFIC;
|
||||
Breathing.colors_min = 1;
|
||||
Breathing.colors_max = 2;
|
||||
Breathing.name = "Breathing";
|
||||
Breathing.value = AURA_KEYBOARD_MODE_BREATHING;
|
||||
Breathing.flags = MODE_FLAG_HAS_MODE_SPECIFIC_COLOR | MODE_FLAG_HAS_SPEED | MODE_FLAG_MANUAL_SAVE | MODE_FLAG_HAS_BRIGHTNESS;
|
||||
if(controller->is_per_led_keyboard)
|
||||
{
|
||||
Breathing.flags |= MODE_FLAG_HAS_RANDOM_COLOR;
|
||||
}
|
||||
Breathing.speed_min = AURA_KEYBOARD_SPEED_MIN;
|
||||
Breathing.speed_max = AURA_KEYBOARD_SPEED_MAX;
|
||||
Breathing.speed = AURA_KEYBOARD_SPEED_DEFAULT;
|
||||
Breathing.brightness_min = AURA_KEYBOARD_BRIGHTNESS_MIN;
|
||||
Breathing.brightness_max = AURA_KEYBOARD_BRIGHTNESS_MAX;
|
||||
Breathing.brightness = AURA_KEYBOARD_BRIGHTNESS_DEFAULT;
|
||||
Breathing.color_mode = MODE_COLORS_MODE_SPECIFIC;
|
||||
Breathing.colors_min = 1;
|
||||
Breathing.colors_max = 2;
|
||||
Breathing.colors.resize(1);
|
||||
modes.push_back(Breathing);
|
||||
|
||||
mode Color_Cycle;
|
||||
Color_Cycle.name = "Spectrum Cycle";
|
||||
Color_Cycle.value = AURA_KEYBOARD_MODE_COLOR_CYCLE;
|
||||
Color_Cycle.flags = MODE_FLAG_HAS_SPEED | MODE_FLAG_MANUAL_SAVE | MODE_FLAG_HAS_BRIGHTNESS;
|
||||
Color_Cycle.speed_min = AURA_KEYBOARD_SPEED_MIN;
|
||||
Color_Cycle.speed_max = AURA_KEYBOARD_SPEED_MAX;
|
||||
Color_Cycle.speed = AURA_KEYBOARD_SPEED_DEFAULT;
|
||||
Color_Cycle.brightness_min = AURA_KEYBOARD_BRIGHTNESS_MIN;
|
||||
Color_Cycle.brightness_max = AURA_KEYBOARD_BRIGHTNESS_MAX;
|
||||
Color_Cycle.brightness = AURA_KEYBOARD_BRIGHTNESS_DEFAULT;
|
||||
Color_Cycle.color_mode = MODE_COLORS_NONE;
|
||||
Color_Cycle.name = "Spectrum Cycle";
|
||||
Color_Cycle.value = AURA_KEYBOARD_MODE_COLOR_CYCLE;
|
||||
Color_Cycle.flags = MODE_FLAG_HAS_SPEED | MODE_FLAG_MANUAL_SAVE | MODE_FLAG_HAS_BRIGHTNESS;
|
||||
Color_Cycle.speed_min = AURA_KEYBOARD_SPEED_MIN;
|
||||
Color_Cycle.speed_max = AURA_KEYBOARD_SPEED_MAX;
|
||||
Color_Cycle.speed = AURA_KEYBOARD_SPEED_DEFAULT;
|
||||
Color_Cycle.brightness_min = AURA_KEYBOARD_BRIGHTNESS_MIN;
|
||||
Color_Cycle.brightness_max = AURA_KEYBOARD_BRIGHTNESS_MAX;
|
||||
Color_Cycle.brightness = AURA_KEYBOARD_BRIGHTNESS_DEFAULT;
|
||||
Color_Cycle.color_mode = MODE_COLORS_NONE;
|
||||
modes.push_back(Color_Cycle);
|
||||
|
||||
mode Wave;
|
||||
Wave.name = "Rainbow Wave";
|
||||
Wave.value = AURA_KEYBOARD_MODE_WAVE;
|
||||
Wave.flags = MODE_FLAG_HAS_MODE_SPECIFIC_COLOR | MODE_FLAG_HAS_SPEED | MODE_FLAG_HAS_DIRECTION_LR | MODE_FLAG_HAS_DIRECTION_HV | MODE_FLAG_MANUAL_SAVE | MODE_FLAG_HAS_BRIGHTNESS;
|
||||
if(controller->is_per_led_keyboard) Wave.flags |= MODE_FLAG_HAS_DIRECTION_UD;
|
||||
|
||||
Wave.speed_min = AURA_KEYBOARD_SPEED_MIN;
|
||||
Wave.speed_max = AURA_KEYBOARD_SPEED_MAX;
|
||||
Wave.speed = AURA_KEYBOARD_SPEED_DEFAULT;
|
||||
Wave.brightness_min = AURA_KEYBOARD_BRIGHTNESS_MIN;
|
||||
Wave.brightness_max = AURA_KEYBOARD_BRIGHTNESS_MAX;
|
||||
Wave.brightness = AURA_KEYBOARD_BRIGHTNESS_DEFAULT;
|
||||
Wave.direction = MODE_DIRECTION_LEFT;
|
||||
Wave.color_mode = MODE_COLORS_MODE_SPECIFIC;
|
||||
Wave.name = "Rainbow Wave";
|
||||
Wave.value = AURA_KEYBOARD_MODE_WAVE;
|
||||
Wave.flags = MODE_FLAG_HAS_MODE_SPECIFIC_COLOR | MODE_FLAG_HAS_SPEED | MODE_FLAG_HAS_DIRECTION_LR | MODE_FLAG_HAS_DIRECTION_HV | MODE_FLAG_MANUAL_SAVE | MODE_FLAG_HAS_BRIGHTNESS;
|
||||
if(controller->is_per_led_keyboard)
|
||||
{
|
||||
Wave.flags |= MODE_FLAG_HAS_DIRECTION_UD;
|
||||
}
|
||||
Wave.speed_min = AURA_KEYBOARD_SPEED_MIN;
|
||||
Wave.speed_max = AURA_KEYBOARD_SPEED_MAX;
|
||||
Wave.speed = AURA_KEYBOARD_SPEED_DEFAULT;
|
||||
Wave.brightness_min = AURA_KEYBOARD_BRIGHTNESS_MIN;
|
||||
Wave.brightness_max = AURA_KEYBOARD_BRIGHTNESS_MAX;
|
||||
Wave.brightness = AURA_KEYBOARD_BRIGHTNESS_DEFAULT;
|
||||
Wave.direction = MODE_DIRECTION_LEFT;
|
||||
Wave.color_mode = MODE_COLORS_MODE_SPECIFIC;
|
||||
|
||||
if(!controller->is_per_led_keyboard)
|
||||
{
|
||||
@@ -268,129 +276,129 @@ RGBController_AuraTUFKeyboard::RGBController_AuraTUFKeyboard(AuraTUFKeyboardCont
|
||||
else
|
||||
{
|
||||
|
||||
name = "ASUS ROG Claymore";
|
||||
vendor = "ASUS";
|
||||
type = DEVICE_TYPE_KEYBOARD;
|
||||
description = "ASUS Aura Keyboard Device";
|
||||
version = controller->GetVersion();
|
||||
location = controller->GetDeviceLocation();
|
||||
serial = controller->GetSerialString();
|
||||
name = controller->GetName();
|
||||
vendor = "ASUS";
|
||||
type = DEVICE_TYPE_KEYBOARD;
|
||||
description = "ASUS Aura Keyboard Device";
|
||||
version = controller->GetVersion();
|
||||
location = controller->GetDeviceLocation();
|
||||
serial = controller->GetSerialString();
|
||||
|
||||
mode Direct;
|
||||
Direct.name = "Direct";
|
||||
Direct.value = AURA_KEYBOARD_MODE_DIRECT;
|
||||
Direct.flags = MODE_FLAG_HAS_PER_LED_COLOR;
|
||||
Direct.color_mode = MODE_COLORS_PER_LED;
|
||||
Direct.name = "Direct";
|
||||
Direct.value = AURA_KEYBOARD_MODE_DIRECT;
|
||||
Direct.flags = MODE_FLAG_HAS_PER_LED_COLOR;
|
||||
Direct.color_mode = MODE_COLORS_PER_LED;
|
||||
modes.push_back(Direct);
|
||||
|
||||
mode Static;
|
||||
Static.name = "Static";
|
||||
Static.value = AURA_KEYBOARD_MODE_STATIC;
|
||||
Static.flags = MODE_FLAG_HAS_MODE_SPECIFIC_COLOR | MODE_FLAG_AUTOMATIC_SAVE;
|
||||
Static.color_mode = MODE_COLORS_MODE_SPECIFIC;
|
||||
Static.colors_min = 1;
|
||||
Static.colors_max = 1;
|
||||
Static.name = "Static";
|
||||
Static.value = AURA_KEYBOARD_MODE_STATIC;
|
||||
Static.flags = MODE_FLAG_HAS_MODE_SPECIFIC_COLOR | MODE_FLAG_AUTOMATIC_SAVE;
|
||||
Static.color_mode = MODE_COLORS_MODE_SPECIFIC;
|
||||
Static.colors_min = 1;
|
||||
Static.colors_max = 1;
|
||||
Static.colors.resize(1);
|
||||
modes.push_back(Static);
|
||||
|
||||
mode Breathing;
|
||||
Breathing.name = "Breathing";
|
||||
Breathing.value = AURA_KEYBOARD_MODE_BREATHING;
|
||||
Breathing.flags = MODE_FLAG_HAS_MODE_SPECIFIC_COLOR | MODE_FLAG_HAS_SPEED | MODE_FLAG_AUTOMATIC_SAVE;
|
||||
Breathing.speed_min = AURA_CLAYMORE_SPEED_MIN;
|
||||
Breathing.speed_max = AURA_CLAYMORE_SPEED_MAX;
|
||||
Breathing.speed = AURA_CLAYMORE_SPEED_DEFAULT_BREATHING;
|
||||
Breathing.color_mode = MODE_COLORS_MODE_SPECIFIC;
|
||||
Breathing.colors_min = 1;
|
||||
Breathing.colors_max = 2;
|
||||
Breathing.name = "Breathing";
|
||||
Breathing.value = AURA_KEYBOARD_MODE_BREATHING;
|
||||
Breathing.flags = MODE_FLAG_HAS_MODE_SPECIFIC_COLOR | MODE_FLAG_HAS_SPEED | MODE_FLAG_AUTOMATIC_SAVE;
|
||||
Breathing.speed_min = AURA_CLAYMORE_SPEED_MIN;
|
||||
Breathing.speed_max = AURA_CLAYMORE_SPEED_MAX;
|
||||
Breathing.speed = AURA_CLAYMORE_SPEED_DEFAULT_BREATHING;
|
||||
Breathing.color_mode = MODE_COLORS_MODE_SPECIFIC;
|
||||
Breathing.colors_min = 1;
|
||||
Breathing.colors_max = 2;
|
||||
Breathing.colors.resize(2);
|
||||
modes.push_back(Breathing);
|
||||
|
||||
mode Color_Cycle;
|
||||
Color_Cycle.name = "Spectrum Cycle";
|
||||
Color_Cycle.value = AURA_KEYBOARD_MODE_COLOR_CYCLE;
|
||||
Color_Cycle.flags = MODE_FLAG_HAS_SPEED | MODE_FLAG_AUTOMATIC_SAVE;
|
||||
Color_Cycle.speed_min = AURA_CLAYMORE_SPEED_MIN;
|
||||
Color_Cycle.speed_max = AURA_CLAYMORE_SPEED_MAX;
|
||||
Color_Cycle.speed = AURA_CLAYMORE_SPEED_DEFAULT_COLOR_CYCLE;
|
||||
Color_Cycle.color_mode = MODE_COLORS_NONE;
|
||||
Color_Cycle.name = "Spectrum Cycle";
|
||||
Color_Cycle.value = AURA_KEYBOARD_MODE_COLOR_CYCLE;
|
||||
Color_Cycle.flags = MODE_FLAG_HAS_SPEED | MODE_FLAG_AUTOMATIC_SAVE;
|
||||
Color_Cycle.speed_min = AURA_CLAYMORE_SPEED_MIN;
|
||||
Color_Cycle.speed_max = AURA_CLAYMORE_SPEED_MAX;
|
||||
Color_Cycle.speed = AURA_CLAYMORE_SPEED_DEFAULT_COLOR_CYCLE;
|
||||
Color_Cycle.color_mode = MODE_COLORS_NONE;
|
||||
modes.push_back(Color_Cycle);
|
||||
|
||||
mode Reactive;
|
||||
Reactive.name = "Reactive";
|
||||
Reactive.value = AURA_KEYBOARD_MODE_REACTIVE;
|
||||
Reactive.flags = MODE_FLAG_HAS_MODE_SPECIFIC_COLOR | MODE_FLAG_HAS_RANDOM_COLOR | MODE_FLAG_HAS_SPEED | MODE_FLAG_AUTOMATIC_SAVE;
|
||||
Reactive.speed_min = AURA_CLAYMORE_SPEED_MIN;
|
||||
Reactive.speed_max = AURA_CLAYMORE_SPEED_MAX;
|
||||
Reactive.speed = AURA_CLAYMORE_SPEED_DEFAULT_REACTIVE;
|
||||
Reactive.color_mode = MODE_COLORS_MODE_SPECIFIC;
|
||||
Reactive.colors_min = 1;
|
||||
Reactive.colors_max = 2;
|
||||
Reactive.name = "Reactive";
|
||||
Reactive.value = AURA_KEYBOARD_MODE_REACTIVE;
|
||||
Reactive.flags = MODE_FLAG_HAS_MODE_SPECIFIC_COLOR | MODE_FLAG_HAS_RANDOM_COLOR | MODE_FLAG_HAS_SPEED | MODE_FLAG_AUTOMATIC_SAVE;
|
||||
Reactive.speed_min = AURA_CLAYMORE_SPEED_MIN;
|
||||
Reactive.speed_max = AURA_CLAYMORE_SPEED_MAX;
|
||||
Reactive.speed = AURA_CLAYMORE_SPEED_DEFAULT_REACTIVE;
|
||||
Reactive.color_mode = MODE_COLORS_MODE_SPECIFIC;
|
||||
Reactive.colors_min = 1;
|
||||
Reactive.colors_max = 2;
|
||||
Reactive.colors.resize(2);
|
||||
modes.push_back(Reactive);
|
||||
|
||||
mode Wave;
|
||||
Wave.name = "Rainbow Wave";
|
||||
Wave.value = AURA_KEYBOARD_MODE_WAVE;
|
||||
Wave.flags = MODE_COLORS_NONE | MODE_FLAG_HAS_SPEED | MODE_FLAG_HAS_DIRECTION_LR | MODE_FLAG_HAS_DIRECTION_UD | MODE_FLAG_AUTOMATIC_SAVE;
|
||||
Wave.speed_min = AURA_CLAYMORE_SPEED_MIN;
|
||||
Wave.speed_max = AURA_CLAYMORE_SPEED_MAX;
|
||||
Wave.speed = AURA_CLAYMORE_SPEED_DEFAULT_WAVE;
|
||||
Wave.direction = MODE_DIRECTION_LEFT;
|
||||
Wave.color_mode = MODE_COLORS_NONE;
|
||||
Wave.name = "Rainbow Wave";
|
||||
Wave.value = AURA_KEYBOARD_MODE_WAVE;
|
||||
Wave.flags = MODE_COLORS_NONE | MODE_FLAG_HAS_SPEED | MODE_FLAG_HAS_DIRECTION_LR | MODE_FLAG_HAS_DIRECTION_UD | MODE_FLAG_AUTOMATIC_SAVE;
|
||||
Wave.speed_min = AURA_CLAYMORE_SPEED_MIN;
|
||||
Wave.speed_max = AURA_CLAYMORE_SPEED_MAX;
|
||||
Wave.speed = AURA_CLAYMORE_SPEED_DEFAULT_WAVE;
|
||||
Wave.direction = MODE_DIRECTION_LEFT;
|
||||
Wave.color_mode = MODE_COLORS_NONE;
|
||||
modes.push_back(Wave);
|
||||
|
||||
mode Color_Wave;
|
||||
Color_Wave.name = "Color Wave";
|
||||
Color_Wave.value = AURA_KEYBOARD_MODE_WAVE;
|
||||
Color_Wave.flags = MODE_FLAG_HAS_MODE_SPECIFIC_COLOR | MODE_FLAG_HAS_SPEED | MODE_FLAG_HAS_DIRECTION_LR | MODE_FLAG_HAS_DIRECTION_UD | MODE_FLAG_AUTOMATIC_SAVE;
|
||||
Color_Wave.speed_min = AURA_CLAYMORE_SPEED_MIN;
|
||||
Color_Wave.speed_max = AURA_CLAYMORE_SPEED_MAX;
|
||||
Color_Wave.speed = AURA_CLAYMORE_SPEED_DEFAULT_WAVE;
|
||||
Color_Wave.direction = MODE_DIRECTION_LEFT;
|
||||
Color_Wave.color_mode = MODE_COLORS_MODE_SPECIFIC;
|
||||
Color_Wave.colors_min = 1;
|
||||
Color_Wave.colors_max = 2;
|
||||
Color_Wave.name = "Color Wave";
|
||||
Color_Wave.value = AURA_KEYBOARD_MODE_WAVE;
|
||||
Color_Wave.flags = MODE_FLAG_HAS_MODE_SPECIFIC_COLOR | MODE_FLAG_HAS_SPEED | MODE_FLAG_HAS_DIRECTION_LR | MODE_FLAG_HAS_DIRECTION_UD | MODE_FLAG_AUTOMATIC_SAVE;
|
||||
Color_Wave.speed_min = AURA_CLAYMORE_SPEED_MIN;
|
||||
Color_Wave.speed_max = AURA_CLAYMORE_SPEED_MAX;
|
||||
Color_Wave.speed = AURA_CLAYMORE_SPEED_DEFAULT_WAVE;
|
||||
Color_Wave.direction = MODE_DIRECTION_LEFT;
|
||||
Color_Wave.color_mode = MODE_COLORS_MODE_SPECIFIC;
|
||||
Color_Wave.colors_min = 1;
|
||||
Color_Wave.colors_max = 2;
|
||||
Color_Wave.colors.resize(2);
|
||||
modes.push_back(Color_Wave);
|
||||
|
||||
mode Ripple;
|
||||
Ripple.name = "Ripple";
|
||||
Ripple.value = AURA_KEYBOARD_MODE_RIPPLE;
|
||||
Ripple.flags = MODE_FLAG_HAS_MODE_SPECIFIC_COLOR | MODE_FLAG_HAS_RANDOM_COLOR | MODE_FLAG_HAS_SPEED | MODE_FLAG_AUTOMATIC_SAVE;
|
||||
Ripple.speed_min = AURA_CLAYMORE_SPEED_MIN;
|
||||
Ripple.speed_max = AURA_CLAYMORE_SPEED_MAX;
|
||||
Ripple.speed = AURA_CLAYMORE_SPEED_DEFAULT_RIPPLE;
|
||||
Ripple.color_mode = MODE_COLORS_MODE_SPECIFIC;
|
||||
Ripple.colors_min = 1;
|
||||
Ripple.colors_max = 2;
|
||||
Ripple.name = "Ripple";
|
||||
Ripple.value = AURA_KEYBOARD_MODE_RIPPLE;
|
||||
Ripple.flags = MODE_FLAG_HAS_MODE_SPECIFIC_COLOR | MODE_FLAG_HAS_RANDOM_COLOR | MODE_FLAG_HAS_SPEED | MODE_FLAG_AUTOMATIC_SAVE;
|
||||
Ripple.speed_min = AURA_CLAYMORE_SPEED_MIN;
|
||||
Ripple.speed_max = AURA_CLAYMORE_SPEED_MAX;
|
||||
Ripple.speed = AURA_CLAYMORE_SPEED_DEFAULT_RIPPLE;
|
||||
Ripple.color_mode = MODE_COLORS_MODE_SPECIFIC;
|
||||
Ripple.colors_min = 1;
|
||||
Ripple.colors_max = 2;
|
||||
Ripple.colors.resize(2);
|
||||
modes.push_back(Ripple);
|
||||
|
||||
mode Starry_Night;
|
||||
Starry_Night.name = "Starry Night";
|
||||
Starry_Night.value = AURA_KEYBOARD_MODE_STARRY_NIGHT;
|
||||
Starry_Night.flags = MODE_FLAG_HAS_MODE_SPECIFIC_COLOR | MODE_FLAG_HAS_RANDOM_COLOR | MODE_FLAG_HAS_SPEED | MODE_FLAG_AUTOMATIC_SAVE;
|
||||
Starry_Night.speed_min = AURA_CLAYMORE_SPEED_MIN;
|
||||
Starry_Night.speed_max = AURA_CLAYMORE_SPEED_MAX;
|
||||
Starry_Night.speed = AURA_CLAYMORE_SPEED_DEFAULT_STARRY_NIGHT;
|
||||
Starry_Night.color_mode = MODE_COLORS_MODE_SPECIFIC;
|
||||
Starry_Night.colors_min = 1;
|
||||
Starry_Night.colors_max = 2;
|
||||
Starry_Night.name = "Starry Night";
|
||||
Starry_Night.value = AURA_KEYBOARD_MODE_STARRY_NIGHT;
|
||||
Starry_Night.flags = MODE_FLAG_HAS_MODE_SPECIFIC_COLOR | MODE_FLAG_HAS_RANDOM_COLOR | MODE_FLAG_HAS_SPEED | MODE_FLAG_AUTOMATIC_SAVE;
|
||||
Starry_Night.speed_min = AURA_CLAYMORE_SPEED_MIN;
|
||||
Starry_Night.speed_max = AURA_CLAYMORE_SPEED_MAX;
|
||||
Starry_Night.speed = AURA_CLAYMORE_SPEED_DEFAULT_STARRY_NIGHT;
|
||||
Starry_Night.color_mode = MODE_COLORS_MODE_SPECIFIC;
|
||||
Starry_Night.colors_min = 1;
|
||||
Starry_Night.colors_max = 2;
|
||||
Starry_Night.colors.resize(2);
|
||||
modes.push_back(Starry_Night);
|
||||
|
||||
mode Quicksand;
|
||||
Quicksand.name = "Quicksand";
|
||||
Quicksand.value = AURA_KEYBOARD_MODE_QUICKSAND;
|
||||
Quicksand.flags = MODE_FLAG_HAS_MODE_SPECIFIC_COLOR | MODE_FLAG_HAS_RANDOM_COLOR | MODE_FLAG_HAS_SPEED | MODE_FLAG_AUTOMATIC_SAVE;
|
||||
Quicksand.direction = MODE_DIRECTION_DOWN;
|
||||
Quicksand.speed_min = AURA_CLAYMORE_SPEED_MIN;
|
||||
Quicksand.speed_max = AURA_CLAYMORE_SPEED_MAX;
|
||||
Quicksand.speed = AURA_CLAYMORE_SPEED_DEFAULT_QUICKSAND;
|
||||
Quicksand.color_mode = MODE_COLORS_MODE_SPECIFIC;
|
||||
Quicksand.colors_min = 6;
|
||||
Quicksand.colors_max = 6;
|
||||
Quicksand.name = "Quicksand";
|
||||
Quicksand.value = AURA_KEYBOARD_MODE_QUICKSAND;
|
||||
Quicksand.flags = MODE_FLAG_HAS_MODE_SPECIFIC_COLOR | MODE_FLAG_HAS_RANDOM_COLOR | MODE_FLAG_HAS_SPEED | MODE_FLAG_AUTOMATIC_SAVE;
|
||||
Quicksand.direction = MODE_DIRECTION_DOWN;
|
||||
Quicksand.speed_min = AURA_CLAYMORE_SPEED_MIN;
|
||||
Quicksand.speed_max = AURA_CLAYMORE_SPEED_MAX;
|
||||
Quicksand.speed = AURA_CLAYMORE_SPEED_DEFAULT_QUICKSAND;
|
||||
Quicksand.color_mode = MODE_COLORS_MODE_SPECIFIC;
|
||||
Quicksand.colors_min = 6;
|
||||
Quicksand.colors_max = 6;
|
||||
Quicksand.colors.resize(6);
|
||||
modes.push_back(Quicksand);
|
||||
}
|
||||
|
||||
+1
-1
@@ -12,7 +12,7 @@
|
||||
#include <cstring>
|
||||
#include "AsusAuraAddressableController.h"
|
||||
|
||||
AuraAddressableController::AuraAddressableController(hid_device* dev_handle, const char* path) : AuraUSBController(dev_handle, path)
|
||||
AuraAddressableController::AuraAddressableController(hid_device* dev_handle, const char* path, std::string dev_name) : AuraUSBController(dev_handle, path, dev_name)
|
||||
{
|
||||
/*-----------------------------------------------------*\
|
||||
| Add addressable devices |
|
||||
|
||||
+1
-1
@@ -24,7 +24,7 @@ enum
|
||||
class AuraAddressableController : public AuraUSBController
|
||||
{
|
||||
public:
|
||||
AuraAddressableController(hid_device* dev_handle, const char* path);
|
||||
AuraAddressableController(hid_device* dev_handle, const char* path, std::string dev_name);
|
||||
~AuraAddressableController();
|
||||
|
||||
void SetChannelLEDs
|
||||
|
||||
+1
-1
@@ -12,7 +12,7 @@
|
||||
#include <cstring>
|
||||
#include "AsusAuraMainboardController.h"
|
||||
|
||||
AuraMainboardController::AuraMainboardController(hid_device* dev_handle, const char* path) : AuraUSBController(dev_handle, path), mode(AURA_MODE_DIRECT)
|
||||
AuraMainboardController::AuraMainboardController(hid_device* dev_handle, const char* path, std::string dev_name) : AuraUSBController(dev_handle, path, dev_name), mode(AURA_MODE_DIRECT)
|
||||
{
|
||||
unsigned char num_total_mainboard_leds = config_table[0x1B];
|
||||
unsigned char num_rgb_headers = config_table[0x1D];
|
||||
|
||||
+1
-1
@@ -26,7 +26,7 @@ enum
|
||||
class AuraMainboardController : public AuraUSBController
|
||||
{
|
||||
public:
|
||||
AuraMainboardController(hid_device* dev_handle, const char* path);
|
||||
AuraMainboardController(hid_device* dev_handle, const char* path, std::string dev_name);
|
||||
~AuraMainboardController();
|
||||
|
||||
void SetChannelLEDs
|
||||
|
||||
@@ -14,10 +14,11 @@
|
||||
#include "LogManager.h"
|
||||
#include "StringUtils.h"
|
||||
|
||||
AuraUSBController::AuraUSBController(hid_device* dev_handle, const char* path)
|
||||
AuraUSBController::AuraUSBController(hid_device* dev_handle, const char* path, std::string dev_name)
|
||||
{
|
||||
dev = dev_handle;
|
||||
location = path;
|
||||
name = dev_name;
|
||||
|
||||
GetFirmwareVersion();
|
||||
GetConfigTable();
|
||||
@@ -40,7 +41,7 @@ std::string AuraUSBController::GetDeviceLocation()
|
||||
|
||||
std::string AuraUSBController::GetDeviceName()
|
||||
{
|
||||
return(device_name);
|
||||
return(name);
|
||||
}
|
||||
|
||||
std::string AuraUSBController::GetSerialString()
|
||||
@@ -56,6 +57,11 @@ std::string AuraUSBController::GetSerialString()
|
||||
return(StringUtils::wstring_to_string(serial_string));
|
||||
}
|
||||
|
||||
std::string AuraUSBController::GetDeviceVersion()
|
||||
{
|
||||
return(std::string(version));
|
||||
}
|
||||
|
||||
const std::vector<AuraDeviceInfo>& AuraUSBController::GetAuraDevices() const
|
||||
{
|
||||
return(device_info);
|
||||
@@ -89,11 +95,11 @@ void AuraUSBController::GetConfigTable()
|
||||
{
|
||||
memcpy(config_table, &usb_buf[4], 60);
|
||||
|
||||
LOG_DEBUG("[%s] ASUS Aura USB config table:", device_name);
|
||||
LOG_DEBUG("[%s] ASUS Aura USB config table:", version);
|
||||
|
||||
for(int i = 0; i < 60; i+=6)
|
||||
{
|
||||
LOG_DEBUG("[%s] %02X %02X %02X %02X %02X %02X", device_name,
|
||||
LOG_DEBUG("[%s] %02X %02X %02X %02X %02X %02X", version,
|
||||
config_table[i + 0],
|
||||
config_table[i + 1],
|
||||
config_table[i + 2],
|
||||
@@ -104,7 +110,7 @@ void AuraUSBController::GetConfigTable()
|
||||
}
|
||||
else
|
||||
{
|
||||
LOG_INFO("[%s] Could not read config table, can not add device", device_name);
|
||||
LOG_INFO("[%s] Could not read config table, can not add device", version);
|
||||
delete this;
|
||||
}
|
||||
}
|
||||
@@ -135,7 +141,7 @@ void AuraUSBController::GetFirmwareVersion()
|
||||
\*-----------------------------------------------------*/
|
||||
if(usb_buf[1] == 0x02)
|
||||
{
|
||||
memcpy(device_name, &usb_buf[2], 16);
|
||||
memcpy(version, &usb_buf[2], 16);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -54,17 +54,17 @@ enum class AuraDeviceType
|
||||
|
||||
struct AuraDeviceInfo
|
||||
{
|
||||
unsigned char effect_channel;
|
||||
unsigned char direct_channel;
|
||||
unsigned char num_leds;
|
||||
unsigned char num_headers;
|
||||
AuraDeviceType device_type;
|
||||
unsigned char effect_channel;
|
||||
unsigned char direct_channel;
|
||||
unsigned char num_leds;
|
||||
unsigned char num_headers;
|
||||
AuraDeviceType device_type;
|
||||
};
|
||||
|
||||
class AuraUSBController
|
||||
{
|
||||
public:
|
||||
AuraUSBController(hid_device* dev_handle, const char* path);
|
||||
AuraUSBController(hid_device* dev_handle, const char* path, std::string dev_name);
|
||||
virtual ~AuraUSBController();
|
||||
|
||||
unsigned int GetChannelCount();
|
||||
@@ -72,6 +72,7 @@ public:
|
||||
std::string GetDeviceLocation();
|
||||
std::string GetDeviceName();
|
||||
std::string GetSerialString();
|
||||
std::string GetDeviceVersion();
|
||||
|
||||
const std::vector<AuraDeviceInfo>& GetAuraDevices() const;
|
||||
|
||||
@@ -96,6 +97,8 @@ protected:
|
||||
unsigned char config_table[60];
|
||||
std::vector<AuraDeviceInfo> device_info;
|
||||
std::string location;
|
||||
std::string name;
|
||||
char version[16];
|
||||
|
||||
void SendDirect
|
||||
(
|
||||
@@ -103,10 +106,8 @@ protected:
|
||||
unsigned char led_count,
|
||||
RGBColor * colors
|
||||
);
|
||||
|
||||
private:
|
||||
char device_name[16];
|
||||
|
||||
void GetConfigTable();
|
||||
|
||||
void GetFirmwareVersion();
|
||||
};
|
||||
|
||||
-1
@@ -26,7 +26,6 @@
|
||||
RGBController_AuraMainboard::RGBController_AuraMainboard(AuraMainboardController* controller_ptr) :
|
||||
RGBController_AuraUSB(controller_ptr)
|
||||
{
|
||||
name = "ASUS Aura USB Mainboard";
|
||||
description = "ASUS Aura USB Mainboard Device";
|
||||
|
||||
/*-------------------------------------------------------*\
|
||||
|
||||
+54
-54
@@ -26,91 +26,91 @@
|
||||
RGBController_AuraUSB::RGBController_AuraUSB(AuraUSBController* controller_ptr) :
|
||||
initializedMode(false)
|
||||
{
|
||||
controller = controller_ptr;
|
||||
controller = controller_ptr;
|
||||
|
||||
name = "ASUS Aura USB";
|
||||
vendor = "ASUS";
|
||||
version = controller->GetDeviceName();
|
||||
type = DEVICE_TYPE_MOTHERBOARD;
|
||||
description = "ASUS Aura USB Device";
|
||||
location = controller->GetDeviceLocation();
|
||||
serial = controller->GetSerialString();
|
||||
name = controller->GetDeviceName();
|
||||
vendor = "ASUS";
|
||||
type = DEVICE_TYPE_MOTHERBOARD;
|
||||
description = "ASUS Aura USB Device";
|
||||
location = controller->GetDeviceLocation();
|
||||
serial = controller->GetSerialString();
|
||||
version = controller->GetDeviceVersion();
|
||||
|
||||
mode Direct;
|
||||
Direct.name = "Direct";
|
||||
Direct.value = AURA_MODE_DIRECT;
|
||||
Direct.flags = MODE_FLAG_HAS_PER_LED_COLOR;
|
||||
Direct.color_mode = MODE_COLORS_PER_LED;
|
||||
Direct.name = "Direct";
|
||||
Direct.value = AURA_MODE_DIRECT;
|
||||
Direct.flags = MODE_FLAG_HAS_PER_LED_COLOR;
|
||||
Direct.color_mode = MODE_COLORS_PER_LED;
|
||||
modes.push_back(Direct);
|
||||
|
||||
mode Off;
|
||||
Off.name = "Off";
|
||||
Off.value = AURA_MODE_OFF;
|
||||
Off.flags = 0;
|
||||
Off.color_mode = MODE_COLORS_NONE;
|
||||
Off.name = "Off";
|
||||
Off.value = AURA_MODE_OFF;
|
||||
Off.flags = 0;
|
||||
Off.color_mode = MODE_COLORS_NONE;
|
||||
modes.push_back(Off);
|
||||
|
||||
mode Static;
|
||||
Static.name = "Static";
|
||||
Static.value = AURA_MODE_STATIC;
|
||||
Static.flags = MODE_FLAG_HAS_MODE_SPECIFIC_COLOR;
|
||||
Static.colors_min = 1;
|
||||
Static.colors_max = 1;
|
||||
Static.color_mode = MODE_COLORS_MODE_SPECIFIC;
|
||||
Static.name = "Static";
|
||||
Static.value = AURA_MODE_STATIC;
|
||||
Static.flags = MODE_FLAG_HAS_MODE_SPECIFIC_COLOR;
|
||||
Static.colors_min = 1;
|
||||
Static.colors_max = 1;
|
||||
Static.color_mode = MODE_COLORS_MODE_SPECIFIC;
|
||||
Static.colors.resize(1);
|
||||
modes.push_back(Static);
|
||||
|
||||
mode Breathing;
|
||||
Breathing.name = "Breathing";
|
||||
Breathing.value = AURA_MODE_BREATHING;
|
||||
Breathing.flags = MODE_FLAG_HAS_MODE_SPECIFIC_COLOR;
|
||||
Breathing.colors_min = 1;
|
||||
Breathing.colors_max = 1;
|
||||
Breathing.color_mode = MODE_COLORS_MODE_SPECIFIC;
|
||||
Breathing.name = "Breathing";
|
||||
Breathing.value = AURA_MODE_BREATHING;
|
||||
Breathing.flags = MODE_FLAG_HAS_MODE_SPECIFIC_COLOR;
|
||||
Breathing.colors_min = 1;
|
||||
Breathing.colors_max = 1;
|
||||
Breathing.color_mode = MODE_COLORS_MODE_SPECIFIC;
|
||||
Breathing.colors.resize(1);
|
||||
modes.push_back(Breathing);
|
||||
|
||||
mode Flashing;
|
||||
Flashing.name = "Flashing";
|
||||
Flashing.value = AURA_MODE_FLASHING;
|
||||
Flashing.flags = MODE_FLAG_HAS_MODE_SPECIFIC_COLOR;
|
||||
Flashing.colors_min = 1;
|
||||
Flashing.colors_max = 1;
|
||||
Flashing.color_mode = MODE_COLORS_MODE_SPECIFIC;
|
||||
Flashing.name = "Flashing";
|
||||
Flashing.value = AURA_MODE_FLASHING;
|
||||
Flashing.flags = MODE_FLAG_HAS_MODE_SPECIFIC_COLOR;
|
||||
Flashing.colors_min = 1;
|
||||
Flashing.colors_max = 1;
|
||||
Flashing.color_mode = MODE_COLORS_MODE_SPECIFIC;
|
||||
Flashing.colors.resize(1);
|
||||
modes.push_back(Flashing);
|
||||
|
||||
mode SpectrumCycle;
|
||||
SpectrumCycle.name = "Spectrum Cycle";
|
||||
SpectrumCycle.value = AURA_MODE_SPECTRUM_CYCLE;
|
||||
SpectrumCycle.flags = 0;
|
||||
SpectrumCycle.color_mode = MODE_COLORS_NONE;
|
||||
SpectrumCycle.name = "Spectrum Cycle";
|
||||
SpectrumCycle.value = AURA_MODE_SPECTRUM_CYCLE;
|
||||
SpectrumCycle.flags = 0;
|
||||
SpectrumCycle.color_mode = MODE_COLORS_NONE;
|
||||
modes.push_back(SpectrumCycle);
|
||||
|
||||
mode Rainbow;
|
||||
Rainbow.name = "Rainbow";
|
||||
Rainbow.value = AURA_MODE_RAINBOW;
|
||||
Rainbow.flags = 0;
|
||||
Rainbow.color_mode = MODE_COLORS_NONE;
|
||||
Rainbow.name = "Rainbow";
|
||||
Rainbow.value = AURA_MODE_RAINBOW;
|
||||
Rainbow.flags = 0;
|
||||
Rainbow.color_mode = MODE_COLORS_NONE;
|
||||
modes.push_back(Rainbow);
|
||||
|
||||
mode ChaseFade;
|
||||
ChaseFade.name = "Chase Fade";
|
||||
ChaseFade.value = AURA_MODE_CHASE_FADE;
|
||||
ChaseFade.flags = MODE_FLAG_HAS_MODE_SPECIFIC_COLOR;
|
||||
ChaseFade.colors_min = 1;
|
||||
ChaseFade.colors_max = 1;
|
||||
ChaseFade.color_mode = MODE_COLORS_MODE_SPECIFIC;
|
||||
ChaseFade.name = "Chase Fade";
|
||||
ChaseFade.value = AURA_MODE_CHASE_FADE;
|
||||
ChaseFade.flags = MODE_FLAG_HAS_MODE_SPECIFIC_COLOR;
|
||||
ChaseFade.colors_min = 1;
|
||||
ChaseFade.colors_max = 1;
|
||||
ChaseFade.color_mode = MODE_COLORS_MODE_SPECIFIC;
|
||||
ChaseFade.colors.resize(1);
|
||||
modes.push_back(ChaseFade);
|
||||
|
||||
mode Chase;
|
||||
Chase.name = "Chase";
|
||||
Chase.value = AURA_MODE_CHASE;
|
||||
Chase.flags = MODE_FLAG_HAS_MODE_SPECIFIC_COLOR;
|
||||
Chase.colors_min = 1;
|
||||
Chase.colors_max = 1;
|
||||
Chase.color_mode = MODE_COLORS_MODE_SPECIFIC;
|
||||
Chase.name = "Chase";
|
||||
Chase.value = AURA_MODE_CHASE;
|
||||
Chase.flags = MODE_FLAG_HAS_MODE_SPECIFIC_COLOR;
|
||||
Chase.colors_min = 1;
|
||||
Chase.colors_max = 1;
|
||||
Chase.color_mode = MODE_COLORS_MODE_SPECIFIC;
|
||||
Chase.colors.resize(1);
|
||||
modes.push_back(Chase);
|
||||
|
||||
|
||||
@@ -37,19 +37,19 @@
|
||||
#include "RGBController_AsusAuraRyuoAIO.h"
|
||||
#include "dmiinfo.h"
|
||||
|
||||
#define AURA_USB_VID 0x0B05
|
||||
#define AURA_USB_VID 0x0B05
|
||||
|
||||
/*-----------------------------------------------------------------*\
|
||||
| MOTHERBOARDS |
|
||||
\*-----------------------------------------------------------------*/
|
||||
#define AURA_ADDRESSABLE_1_PID 0x1867
|
||||
#define AURA_ADDRESSABLE_2_PID 0x1872
|
||||
#define AURA_ADDRESSABLE_3_PID 0x18A3
|
||||
#define AURA_ADDRESSABLE_4_PID 0x18A5
|
||||
#define AURA_MOTHERBOARD_1_PID 0x18F3
|
||||
#define AURA_MOTHERBOARD_2_PID 0x1939
|
||||
#define AURA_MOTHERBOARD_3_PID 0x19AF
|
||||
#define AURA_MOTHERBOARD_4_PID 0x1AA6
|
||||
#define AURA_ADDRESSABLE_1_PID 0x1867
|
||||
#define AURA_ADDRESSABLE_2_PID 0x1872
|
||||
#define AURA_ADDRESSABLE_3_PID 0x18A3
|
||||
#define AURA_ADDRESSABLE_4_PID 0x18A5
|
||||
#define AURA_MOTHERBOARD_1_PID 0x18F3
|
||||
#define AURA_MOTHERBOARD_2_PID 0x1939
|
||||
#define AURA_MOTHERBOARD_3_PID 0x19AF
|
||||
#define AURA_MOTHERBOARD_4_PID 0x1AA6
|
||||
|
||||
/*-----------------------------------------------------------------*\
|
||||
| KEYBOARDS |
|
||||
@@ -83,44 +83,41 @@
|
||||
/*-----------------------------------------------------------------*\
|
||||
| MICE - defined in AsusAuraMouseDevices.h |
|
||||
\*-----------------------------------------------------------------*/
|
||||
|
||||
#define AURA_ROG_STRIX_EVOLVE_PID 0x185B
|
||||
#define AURA_ROG_SPATHA_WIRED_PID 0x181C
|
||||
#define AURA_ROG_SPATHA_WIRELESS_PID 0x1824
|
||||
#define AURA_ROG_STRIX_EVOLVE_PID 0x185B
|
||||
#define AURA_ROG_SPATHA_WIRED_PID 0x181C
|
||||
#define AURA_ROG_SPATHA_WIRELESS_PID 0x1824
|
||||
|
||||
/*-----------------------------------------------------------------*\
|
||||
| MOUSEMATS |
|
||||
\*-----------------------------------------------------------------*/
|
||||
#define AURA_ROG_BALTEUS_PID 0x1891
|
||||
#define AURA_ROG_BALTEUS_QI_PID 0x1890
|
||||
#define AURA_ROG_BALTEUS_PID 0x1891
|
||||
#define AURA_ROG_BALTEUS_QI_PID 0x1890
|
||||
|
||||
/*-----------------------------------------------------------------*\
|
||||
| MONITORS |
|
||||
\*-----------------------------------------------------------------*/
|
||||
|
||||
#define AURA_ROG_STRIX_XG27AQ_PID 0x198C
|
||||
#define AURA_ROG_STRIX_XG27AQM_PID 0x19BB
|
||||
#define AURA_ROG_STRIX_XG279Q_PID 0x1919
|
||||
#define AURA_ROG_STRIX_XG27W_PID 0x1933
|
||||
#define AURA_ROG_STRIX_XG32VC_PID 0x1968
|
||||
#define AURA_ROG_PG32UQ_PID 0x19B9
|
||||
#define AURA_ROG_STRIX_XG27AQ_PID 0x198C
|
||||
#define AURA_ROG_STRIX_XG27AQM_PID 0x19BB
|
||||
#define AURA_ROG_STRIX_XG279Q_PID 0x1919
|
||||
#define AURA_ROG_STRIX_XG27W_PID 0x1933
|
||||
#define AURA_ROG_STRIX_XG32VC_PID 0x1968
|
||||
#define AURA_ROG_PG32UQ_PID 0x19B9
|
||||
|
||||
/*-----------------------------------------------------------------*\
|
||||
| HEADSETSTANDS |
|
||||
| HEADSET STANDS |
|
||||
\*-----------------------------------------------------------------*/
|
||||
|
||||
#define AURA_ROG_THRONE_PID 0x18D9
|
||||
#define AURA_ROG_THRONE_QI_PID 0x18C5
|
||||
#define AURA_ROG_THRONE_QI_GUNDAM_PID 0x1994
|
||||
#define AURA_ROG_THRONE_PID 0x18D9
|
||||
#define AURA_ROG_THRONE_QI_PID 0x18C5
|
||||
#define AURA_ROG_THRONE_QI_GUNDAM_PID 0x1994
|
||||
|
||||
/*-----------------------------------------------------------------*\
|
||||
| OTHER |
|
||||
\*-----------------------------------------------------------------*/
|
||||
#define AURA_TERMINAL_PID 0x1889
|
||||
#define ROG_STRIX_LC120_PID 0x879E
|
||||
#define AURA_RYUO_AIO_PID 0x1887
|
||||
#define ASUS_ROG_ALLY_PID 0x1ABE
|
||||
#define ASUS_ROG_ALLY_X_PID 0x1B4C
|
||||
#define AURA_TERMINAL_PID 0x1889
|
||||
#define ROG_STRIX_LC120_PID 0x879E
|
||||
#define AURA_RYUO_AIO_PID 0x1887
|
||||
#define ASUS_ROG_ALLY_PID 0x1ABE
|
||||
#define ASUS_ROG_ALLY_X_PID 0x1B4C
|
||||
|
||||
AuraKeyboardMappingLayoutType GetKeyboardMappingLayoutType(int pid)
|
||||
{
|
||||
@@ -148,9 +145,9 @@ void DetectAsusAuraUSBTerminal(hid_device_info* info, const std::string& name)
|
||||
|
||||
if(dev)
|
||||
{
|
||||
AuraAddressableController* controller = new AuraAddressableController(dev, info->path);
|
||||
AuraAddressableController* controller = new AuraAddressableController(dev, info->path, name);
|
||||
RGBController_AuraUSB* rgb_controller = new RGBController_AuraUSB(controller);
|
||||
rgb_controller->name = name;
|
||||
|
||||
ResourceManager::get()->RegisterRGBController(rgb_controller);
|
||||
}
|
||||
}
|
||||
@@ -161,10 +158,10 @@ void DetectAsusAuraUSBAddressable(hid_device_info* info, const std::string& /*na
|
||||
|
||||
if(dev)
|
||||
{
|
||||
DMIInfo dmi;
|
||||
AuraAddressableController* controller = new AuraAddressableController(dev, info->path);
|
||||
DMIInfo dmi;
|
||||
AuraAddressableController* controller = new AuraAddressableController(dev, info->path, "ASUS " + dmi.getMainboard() + " Addressable");
|
||||
RGBController_AuraUSB* rgb_controller = new RGBController_AuraUSB(controller);
|
||||
rgb_controller->name = "ASUS " + dmi.getMainboard() + " Addressable";
|
||||
|
||||
ResourceManager::get()->RegisterRGBController(rgb_controller);
|
||||
}
|
||||
}
|
||||
@@ -177,10 +174,10 @@ void DetectAsusAuraUSBMotherboards(hid_device_info* info, const std::string& /*n
|
||||
{
|
||||
try
|
||||
{
|
||||
DMIInfo dmi;
|
||||
AuraMainboardController* controller = new AuraMainboardController(dev, info->path);
|
||||
RGBController_AuraMainboard* rgb_controller = new RGBController_AuraMainboard(controller);
|
||||
rgb_controller->name = "ASUS " + dmi.getMainboard();
|
||||
DMIInfo dmi;
|
||||
AuraMainboardController* controller = new AuraMainboardController(dev, info->path, "ASUS " + dmi.getMainboard());
|
||||
RGBController_AuraMainboard* rgb_controller = new RGBController_AuraMainboard(controller);
|
||||
|
||||
ResourceManager::get()->RegisterRGBController(rgb_controller);
|
||||
}
|
||||
catch(const std::runtime_error& ex)
|
||||
@@ -197,10 +194,10 @@ void DetectAsusAuraUSBKeyboards(hid_device_info* info, const std::string& name)
|
||||
|
||||
if(dev)
|
||||
{
|
||||
AuraKeyboardController* controller = new AuraKeyboardController(dev, info->path);
|
||||
AuraKeyboardController* controller = new AuraKeyboardController(dev, info->path, name);
|
||||
AuraKeyboardMappingLayoutType layout = GetKeyboardMappingLayoutType(info->product_id);
|
||||
RGBController_AuraKeyboard* rgb_controller = new RGBController_AuraKeyboard(controller, layout);
|
||||
rgb_controller->name = name;
|
||||
|
||||
ResourceManager::get()->RegisterRGBController(rgb_controller);
|
||||
}
|
||||
}
|
||||
@@ -212,9 +209,9 @@ void DetectAsusAuraUSBMice(hid_device_info* info, const std::string& name)
|
||||
if(dev)
|
||||
{
|
||||
uint16_t pid = (name == "Asus ROG Spatha X Dock") ? AURA_ROG_SPATHA_X_DOCK_FAKE_PID : info->product_id;
|
||||
AuraMouseController* controller = new AuraMouseController(dev, info->path, pid);
|
||||
AuraMouseController* controller = new AuraMouseController(dev, info->path, pid, name);
|
||||
RGBController_AuraMouse* rgb_controller = new RGBController_AuraMouse(controller);
|
||||
rgb_controller->name = name;
|
||||
|
||||
ResourceManager::get()->RegisterRGBController(rgb_controller);
|
||||
}
|
||||
}
|
||||
@@ -225,9 +222,9 @@ void DetectAsusAuraUSBMousemats(hid_device_info* info, const std::string& name)
|
||||
|
||||
if(dev)
|
||||
{
|
||||
AuraMousematController* controller = new AuraMousematController(dev, info->path);
|
||||
AuraMousematController* controller = new AuraMousematController(dev, info->path, name);
|
||||
RGBController_AuraMousemat* rgb_controller = new RGBController_AuraMousemat(controller);
|
||||
rgb_controller->name = name;
|
||||
|
||||
ResourceManager::get()->RegisterRGBController(rgb_controller);
|
||||
}
|
||||
}
|
||||
@@ -238,9 +235,9 @@ void DetectAsusAuraUSBROGStrixLC(hid_device_info* info, const std::string& name)
|
||||
|
||||
if(dev)
|
||||
{
|
||||
AsusROGStrixLCController* controller = new AsusROGStrixLCController(dev, info->path);
|
||||
AsusROGStrixLCController* controller = new AsusROGStrixLCController(dev, info->path, name);
|
||||
RGBController_AsusROGStrixLC* rgb_controller = new RGBController_AsusROGStrixLC(controller);
|
||||
rgb_controller->name = name;
|
||||
|
||||
ResourceManager::get()->RegisterRGBController(rgb_controller);
|
||||
}
|
||||
}
|
||||
@@ -251,9 +248,9 @@ void DetectAsusAuraUSBRyuoAIO(hid_device_info* info, const std::string& name)
|
||||
|
||||
if(dev)
|
||||
{
|
||||
AsusAuraRyuoAIOController* controller = new AsusAuraRyuoAIOController(dev, info->path);
|
||||
AsusAuraRyuoAIOController* controller = new AsusAuraRyuoAIOController(dev, info->path, name);
|
||||
RGBController_AsusAuraRyuoAIO* rgb_controller = new RGBController_AsusAuraRyuoAIO(controller);
|
||||
rgb_controller->name = name;
|
||||
|
||||
ResourceManager::get()->RegisterRGBController(rgb_controller);
|
||||
}
|
||||
}
|
||||
@@ -264,9 +261,9 @@ void DetectAsusAuraUSBStrixEvolve(hid_device_info* info, const std::string& name
|
||||
|
||||
if(dev)
|
||||
{
|
||||
AsusAuraMouseGen1Controller* controller = new AsusAuraMouseGen1Controller(dev, info->path, info->product_id);
|
||||
AsusAuraMouseGen1Controller* controller = new AsusAuraMouseGen1Controller(dev, info->path, info->product_id, name);
|
||||
RGBController_AsusROGStrixEvolve* rgb_controller = new RGBController_AsusROGStrixEvolve(controller);
|
||||
rgb_controller->name = name;
|
||||
|
||||
ResourceManager::get()->RegisterRGBController(rgb_controller);
|
||||
}
|
||||
}
|
||||
@@ -277,9 +274,9 @@ void DetectAsusAuraUSBSpatha(hid_device_info* info, const std::string& name)
|
||||
|
||||
if(dev)
|
||||
{
|
||||
AsusAuraMouseGen1Controller* controller = new AsusAuraMouseGen1Controller(dev, info->path, info->product_id);
|
||||
AsusAuraMouseGen1Controller* controller = new AsusAuraMouseGen1Controller(dev, info->path, info->product_id, name);
|
||||
RGBController_AsusROGSpatha* rgb_controller = new RGBController_AsusROGSpatha(controller);
|
||||
rgb_controller->name = name;
|
||||
|
||||
ResourceManager::get()->RegisterRGBController(rgb_controller);
|
||||
}
|
||||
}
|
||||
@@ -290,9 +287,9 @@ void DetectAsusAuraUSBHeadsetStand(hid_device_info* info, const std::string& nam
|
||||
|
||||
if(dev)
|
||||
{
|
||||
AuraHeadsetStandController* controller = new AuraHeadsetStandController(dev, info->path);
|
||||
AuraHeadsetStandController* controller = new AuraHeadsetStandController(dev, info->path, name);
|
||||
RGBController_AuraHeadsetStand* rgb_controller = new RGBController_AuraHeadsetStand(controller);
|
||||
rgb_controller->name = name;
|
||||
|
||||
ResourceManager::get()->RegisterRGBController(rgb_controller);
|
||||
}
|
||||
}
|
||||
@@ -303,9 +300,9 @@ void DetectAsusAuraTUFUSBKeyboard(hid_device_info* info, const std::string& name
|
||||
|
||||
if(dev)
|
||||
{
|
||||
AuraTUFKeyboardController* controller = new AuraTUFKeyboardController(dev, info->path, info->product_id, info->release_number);
|
||||
AuraTUFKeyboardController* controller = new AuraTUFKeyboardController(dev, info->path, info->product_id, info->release_number, name);
|
||||
RGBController_AuraTUFKeyboard* rgb_controller = new RGBController_AuraTUFKeyboard(controller);
|
||||
rgb_controller->name = name;
|
||||
|
||||
ResourceManager::get()->RegisterRGBController(rgb_controller);
|
||||
}
|
||||
}
|
||||
@@ -316,9 +313,9 @@ void DetectAsusAuraUSBMonitor(hid_device_info* info, const std::string& name)
|
||||
|
||||
if(dev)
|
||||
{
|
||||
AuraMonitorController* controller = new AuraMonitorController(dev, info->path, info->product_id);
|
||||
AuraMonitorController* controller = new AuraMonitorController(dev, info->path, info->product_id, name);
|
||||
RGBController_AuraMonitor* rgb_controller = new RGBController_AuraMonitor(controller);
|
||||
rgb_controller->name = name;
|
||||
|
||||
ResourceManager::get()->RegisterRGBController(rgb_controller);
|
||||
}
|
||||
}
|
||||
@@ -329,9 +326,9 @@ void DetectAsusROGAlly(hid_device_info* info, const std::string& name)
|
||||
|
||||
if(dev)
|
||||
{
|
||||
ROGAllyController* controller = new ROGAllyController(dev, info->path);
|
||||
ROGAllyController* controller = new ROGAllyController(dev, info->path, name);
|
||||
RGBController_AsusROGAlly* rgb_controller = new RGBController_AsusROGAlly(controller);
|
||||
rgb_controller->name = name;
|
||||
|
||||
ResourceManager::get()->RegisterRGBController(rgb_controller);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -13,10 +13,11 @@
|
||||
#include "AsusROGAllyController.h"
|
||||
#include "StringUtils.h"
|
||||
|
||||
ROGAllyController::ROGAllyController(hid_device* dev_handle, const char* path)
|
||||
ROGAllyController::ROGAllyController(hid_device* dev_handle, const char* path, std::string dev_name)
|
||||
{
|
||||
dev = dev_handle;
|
||||
location = path;
|
||||
name = dev_name;
|
||||
|
||||
SendInitialization();
|
||||
}
|
||||
@@ -31,6 +32,11 @@ std::string ROGAllyController::GetDeviceLocation()
|
||||
return("HID: " + location);
|
||||
}
|
||||
|
||||
std::string ROGAllyController::GetName()
|
||||
{
|
||||
return(name);
|
||||
}
|
||||
|
||||
std::string ROGAllyController::GetSerialString()
|
||||
{
|
||||
wchar_t serial_string[128];
|
||||
|
||||
@@ -40,36 +40,38 @@ enum
|
||||
class ROGAllyController
|
||||
{
|
||||
public:
|
||||
ROGAllyController(hid_device* dev_handle, const char* path);
|
||||
ROGAllyController(hid_device* dev_handle, const char* path, std::string dev_name);
|
||||
virtual ~ROGAllyController();
|
||||
|
||||
std::string GetDeviceLocation();
|
||||
std::string GetName();
|
||||
std::string GetSerialString();
|
||||
std::string GetVersion();
|
||||
|
||||
void SendInitialization();
|
||||
void SendInitialization();
|
||||
|
||||
void UpdateBrightness
|
||||
(
|
||||
unsigned char brightness
|
||||
);
|
||||
void UpdateBrightness
|
||||
(
|
||||
unsigned char brightness
|
||||
);
|
||||
|
||||
void UpdateLeds
|
||||
(
|
||||
std::vector<RGBColor> colors
|
||||
);
|
||||
void UpdateLeds
|
||||
(
|
||||
std::vector<RGBColor> colors
|
||||
);
|
||||
|
||||
void UpdateDevice
|
||||
(
|
||||
unsigned char mode,
|
||||
std::vector<RGBColor> colors,
|
||||
unsigned char speed,
|
||||
unsigned char direction
|
||||
);
|
||||
void UpdateDevice
|
||||
(
|
||||
unsigned char mode,
|
||||
std::vector<RGBColor> colors,
|
||||
unsigned char speed,
|
||||
unsigned char direction
|
||||
);
|
||||
|
||||
void SaveMode();
|
||||
void SaveMode();
|
||||
|
||||
private:
|
||||
hid_device* dev;
|
||||
std::string location;
|
||||
hid_device* dev;
|
||||
std::string location;
|
||||
std::string name;
|
||||
};
|
||||
|
||||
+1
-1
@@ -26,7 +26,7 @@ RGBController_AsusROGAlly::RGBController_AsusROGAlly(ROGAllyController* controll
|
||||
{
|
||||
controller = controller_ptr;
|
||||
|
||||
name = "ASUS ROG Ally";
|
||||
name = controller->GetName();
|
||||
vendor = "ASUS";
|
||||
type = DEVICE_TYPE_GAMEPAD;
|
||||
description = "ASUS ROG Ally Device";
|
||||
|
||||
+1
-1
@@ -11,7 +11,7 @@
|
||||
|
||||
#include "AsusROGStrixLCController.h"
|
||||
|
||||
AsusROGStrixLCController::AsusROGStrixLCController(hid_device* dev_handle, const char* path) : AuraUSBController(dev_handle, path)
|
||||
AsusROGStrixLCController::AsusROGStrixLCController(hid_device* dev_handle, const char* path, std::string dev_name) : AuraUSBController(dev_handle, path, dev_name)
|
||||
{
|
||||
/*-----------------------------------------------------*\
|
||||
| Add addressable devices |
|
||||
|
||||
+1
-1
@@ -58,7 +58,7 @@ enum
|
||||
class AsusROGStrixLCController : public AuraUSBController
|
||||
{
|
||||
public:
|
||||
AsusROGStrixLCController(hid_device* dev_handle, const char* path);
|
||||
AsusROGStrixLCController(hid_device* dev_handle, const char* path, std::string dev_name);
|
||||
~AsusROGStrixLCController();
|
||||
|
||||
std::string GetLocation();
|
||||
|
||||
+1
-1
@@ -28,7 +28,7 @@ RGBController_AsusROGStrixLC::RGBController_AsusROGStrixLC(AsusROGStrixLCControl
|
||||
controller = controller_ptr;
|
||||
uint8_t speed = ROGSTRIXLC_CONTROLLER_SPEED_NORMAL;
|
||||
|
||||
name = "ROG Strix LC";
|
||||
name = controller->GetDeviceName();
|
||||
vendor = "ASUS";
|
||||
type = DEVICE_TYPE_COOLER;
|
||||
description = "ASUS Liquid Cooler including 120mm, 140mm, 240mm, 280mm and 360mm radiators.";
|
||||
|
||||
+7
-1
@@ -21,10 +21,11 @@
|
||||
|
||||
#define ASUS_CERBERUS_KB_PACKET_SIZE 8
|
||||
|
||||
AsusCerberusKeyboardController::AsusCerberusKeyboardController(hid_device* dev_handle, const char* path, unsigned short rev_version)
|
||||
AsusCerberusKeyboardController::AsusCerberusKeyboardController(hid_device* dev_handle, const char* path, unsigned short rev_version, std::string dev_name)
|
||||
{
|
||||
dev = dev_handle;
|
||||
location = path;
|
||||
name = dev_name;
|
||||
version = rev_version;
|
||||
}
|
||||
|
||||
@@ -38,6 +39,11 @@ std::string AsusCerberusKeyboardController::GetDeviceLocation()
|
||||
return("HID: " + location);
|
||||
}
|
||||
|
||||
std::string AsusCerberusKeyboardController::GetDeviceName()
|
||||
{
|
||||
return(name);
|
||||
}
|
||||
|
||||
std::string AsusCerberusKeyboardController::GetSerialString()
|
||||
{
|
||||
wchar_t serial_string[128];
|
||||
|
||||
+3
-1
@@ -30,10 +30,11 @@ enum
|
||||
class AsusCerberusKeyboardController
|
||||
{
|
||||
public:
|
||||
AsusCerberusKeyboardController(hid_device* dev_handle, const char* path, unsigned short rev_version);
|
||||
AsusCerberusKeyboardController(hid_device* dev_handle, const char* path, unsigned short rev_version, std::string dev_name);
|
||||
~AsusCerberusKeyboardController();
|
||||
|
||||
std::string GetDeviceLocation();
|
||||
std::string GetDeviceName();
|
||||
std::string GetSerialString();
|
||||
std::string GetVersion();
|
||||
|
||||
@@ -47,5 +48,6 @@ public:
|
||||
private:
|
||||
hid_device* dev;
|
||||
std::string location;
|
||||
std::string name;
|
||||
unsigned short version;
|
||||
};
|
||||
|
||||
+8
-8
@@ -176,7 +176,7 @@ static const std::vector<led_value> led_names =
|
||||
|
||||
RGBController_AsusCerberusKeyboard::RGBController_AsusCerberusKeyboard(AsusCerberusKeyboardController* controller_ptr)
|
||||
{
|
||||
controller = controller_ptr;
|
||||
controller = controller_ptr;
|
||||
|
||||
/*------------------------------------------------------------------------------------------------------*\
|
||||
| this device has 6 different profiles, but there is no way to fetch them from the device, |
|
||||
@@ -185,13 +185,13 @@ RGBController_AsusCerberusKeyboard::RGBController_AsusCerberusKeyboard(AsusCerbe
|
||||
|
||||
controller->SetProfile(1);
|
||||
|
||||
name = "ASUS Cerberus Keyboard";
|
||||
vendor = "ASUS";
|
||||
type = DEVICE_TYPE_KEYBOARD;
|
||||
description = "ASUS Cerberus Keyboard Device";
|
||||
location = controller->GetDeviceLocation();
|
||||
serial = controller->GetSerialString();
|
||||
version = controller->GetVersion();
|
||||
name = controller->GetDeviceName();
|
||||
vendor = "ASUS";
|
||||
type = DEVICE_TYPE_KEYBOARD;
|
||||
description = "ASUS Cerberus Keyboard Device";
|
||||
location = controller->GetDeviceLocation();
|
||||
serial = controller->GetSerialString();
|
||||
version = controller->GetVersion();
|
||||
|
||||
mode Custom;
|
||||
Custom.name = "Custom";
|
||||
|
||||
@@ -29,9 +29,9 @@ void DetectAsusCerberusMech(hid_device_info* info, const std::string& name)
|
||||
|
||||
if(dev)
|
||||
{
|
||||
AsusCerberusKeyboardController* controller = new AsusCerberusKeyboardController(dev, info->path, info->release_number);
|
||||
AsusCerberusKeyboardController* controller = new AsusCerberusKeyboardController(dev, info->path, info->release_number, name);
|
||||
RGBController_AsusCerberusKeyboard* rgb_controller = new RGBController_AsusCerberusKeyboard(controller);
|
||||
rgb_controller->name = name;
|
||||
|
||||
ResourceManager::get()->RegisterRGBController(rgb_controller);
|
||||
}
|
||||
}
|
||||
@@ -42,9 +42,9 @@ void DetectAsusSagarisKeyboard(hid_device_info* info, const std::string& name)
|
||||
|
||||
if(dev)
|
||||
{
|
||||
AsusSagarisKeyboardController* controller = new AsusSagarisKeyboardController(dev, info->path, info->release_number);
|
||||
AsusSagarisKeyboardController* controller = new AsusSagarisKeyboardController(dev, info->path, info->release_number, name);
|
||||
RGBController_AsusSagarisKeyboard* rgb_controller = new RGBController_AsusSagarisKeyboard(controller);
|
||||
rgb_controller->name = name;
|
||||
|
||||
ResourceManager::get()->RegisterRGBController(rgb_controller);
|
||||
}
|
||||
}
|
||||
@@ -55,9 +55,9 @@ void DetectAsusStrixClaw(hid_device_info* info, const std::string& name)
|
||||
|
||||
if(dev)
|
||||
{
|
||||
StrixClawController* controller = new StrixClawController(dev, info->path);
|
||||
StrixClawController* controller = new StrixClawController(dev, info->path, name);
|
||||
RGBController_StrixClaw* rgb_controller = new RGBController_StrixClaw(controller);
|
||||
rgb_controller->name = name;
|
||||
|
||||
ResourceManager::get()->RegisterRGBController(rgb_controller);
|
||||
}
|
||||
}
|
||||
|
||||
+7
-1
@@ -20,10 +20,11 @@
|
||||
|
||||
#define ASUS_SAGARIS_KB_PACKET_SIZE 65
|
||||
|
||||
AsusSagarisKeyboardController::AsusSagarisKeyboardController(hid_device* dev_handle, const char* path, unsigned short rev_version)
|
||||
AsusSagarisKeyboardController::AsusSagarisKeyboardController(hid_device* dev_handle, const char* path, unsigned short rev_version, std::string dev_name)
|
||||
{
|
||||
dev = dev_handle;
|
||||
location = path;
|
||||
name = dev_name;
|
||||
version = rev_version;
|
||||
}
|
||||
|
||||
@@ -42,6 +43,11 @@ std::string AsusSagarisKeyboardController::GetDeviceLocation()
|
||||
return("HID: " + location);
|
||||
}
|
||||
|
||||
std::string AsusSagarisKeyboardController::GetDeviceName()
|
||||
{
|
||||
return(name);
|
||||
}
|
||||
|
||||
std::string AsusSagarisKeyboardController::GetSerialString()
|
||||
{
|
||||
wchar_t serial_string[128];
|
||||
|
||||
+3
-1
@@ -54,11 +54,12 @@ typedef struct
|
||||
class AsusSagarisKeyboardController
|
||||
{
|
||||
public:
|
||||
AsusSagarisKeyboardController(hid_device* dev_handle, const char* path, unsigned short rev_version);
|
||||
AsusSagarisKeyboardController(hid_device* dev_handle, const char* path, unsigned short rev_version, std::string dev_name);
|
||||
~AsusSagarisKeyboardController();
|
||||
|
||||
std::string GetVersion();
|
||||
std::string GetDeviceLocation();
|
||||
std::string GetDeviceName();
|
||||
std::string GetSerialString();
|
||||
|
||||
sagaris_mode GetMode();
|
||||
@@ -73,5 +74,6 @@ public:
|
||||
private:
|
||||
hid_device* dev;
|
||||
std::string location;
|
||||
std::string name;
|
||||
unsigned short version;
|
||||
};
|
||||
|
||||
+1
-1
@@ -28,7 +28,7 @@ RGBController_AsusSagarisKeyboard::RGBController_AsusSagarisKeyboard(AsusSagaris
|
||||
{
|
||||
controller = controller_ptr;
|
||||
|
||||
name = "ASUS Sagaris Keyboard";
|
||||
name = controller->GetDeviceName();
|
||||
vendor = "ASUS";
|
||||
type = DEVICE_TYPE_KEYBOARD;
|
||||
description = "ASUS Sagaris Keyboard Device";
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user