Compare commits
236
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
3aa5e2648f | ||
|
|
1f3415bdab | ||
|
|
9200834172 | ||
|
|
f569077c68 | ||
|
|
2cb08ec4b4 | ||
|
|
aeb1e364c4 | ||
|
|
e61b6cd3d7 | ||
|
|
7276d254d6 | ||
|
|
79b49873ec | ||
|
|
7faa3b4875 | ||
|
|
6ae5242ed5 | ||
|
|
45755c79ae | ||
|
|
2f720615c2 | ||
|
|
48118821d7 | ||
|
|
d75556c3cb | ||
|
|
95bdcbc5c2 | ||
|
|
bc5fedbbec | ||
|
|
6cd4dc8674 | ||
|
|
a81d22ee0a | ||
|
|
4f50b64e1d | ||
|
|
0aae02feab | ||
|
|
0029046b9a | ||
|
|
e9eca70e72 | ||
|
|
42b95509ac | ||
|
|
87778842c9 | ||
|
|
30c80adbe1 | ||
|
|
0b515ba901 | ||
|
|
eca8ee3a31 | ||
|
|
1ac4e127cb | ||
|
|
f91d4d7af1 | ||
|
|
bc10e3f772 | ||
|
|
fb7e388e3f | ||
|
|
54ba9aca02 | ||
|
|
6709fe4a1a | ||
|
|
b0ed2684a2 | ||
|
|
452ea9ec91 | ||
|
|
45478b0d9f | ||
|
|
14c73d2eac | ||
|
|
328e5f562f | ||
|
|
aae734a361 | ||
|
|
b4231e2a6e | ||
|
|
139a9c4010 | ||
|
|
8619d77445 | ||
|
|
34b20a78ea | ||
|
|
9cf99d142b | ||
|
|
e0ef12af10 | ||
|
|
a70b616a1b | ||
|
|
0d0ac0af52 | ||
|
|
f4da04f544 | ||
|
|
a03c4674cf | ||
|
|
2c1c80334b | ||
|
|
b2c6028cb8 | ||
|
|
41389f4746 | ||
|
|
0c784ac560 | ||
|
|
119f20cfee | ||
|
|
795427bcb7 | ||
|
|
6e3c418264 | ||
|
|
a56b0da600 | ||
|
|
505d7f89ad | ||
|
|
04c1ad363e | ||
|
|
e0e2c9e20b | ||
|
|
19c2b98e8a | ||
|
|
14d7347d66 | ||
|
|
c013d476ba | ||
|
|
8fa85b3f27 | ||
|
|
965380b6f6 | ||
|
|
eddbcc2b8b | ||
|
|
7d27fadbc4 | ||
|
|
8a7f3b4a3a | ||
|
|
4f9eb7e4be | ||
|
|
97155d240b | ||
|
|
a935e15631 | ||
|
|
39b36bbc28 | ||
|
|
b586a631b6 | ||
|
|
f33fc26810 | ||
|
|
3c1b168676 | ||
|
|
7ab784aa16 | ||
|
|
56334ed7c5 | ||
|
|
0b202fc1ba | ||
|
|
c8b34ccb0d | ||
|
|
a07425026c | ||
|
|
287618ebe5 | ||
|
|
f96028cba4 | ||
|
|
17b7a5f518 | ||
|
|
74b9253c25 | ||
|
|
0311aa399f | ||
|
|
2c8a826c11 | ||
|
|
c9572bd4e0 | ||
|
|
1a34d3d167 | ||
|
|
bf5ce6c239 | ||
|
|
a712c64ece | ||
|
|
ae84bcb862 | ||
|
|
ae1c73497a | ||
|
|
4538085e1e | ||
|
|
70b2a9c842 | ||
|
|
8bb7ab8099 | ||
|
|
d8f28b546d | ||
|
|
ddeb5de65e | ||
|
|
d8e7cd694d | ||
|
|
a84842730e | ||
|
|
268ed8abde | ||
|
|
d3629a1d34 | ||
|
|
c226e2c4fb | ||
|
|
2bb5cfcab8 | ||
|
|
59732ed47e | ||
|
|
ea0c19d31e | ||
|
|
8120fcdd5a | ||
|
|
41ef951e8b | ||
|
|
8b5a23148a | ||
|
|
06f4851ddc | ||
|
|
238d1c0162 | ||
|
|
783259a870 | ||
|
|
e1513f9abe | ||
|
|
bcd97dd51d | ||
|
|
9b5d200a36 | ||
|
|
823809718e | ||
|
|
72ab809d25 | ||
|
|
9f29af1852 | ||
|
|
a926d4ec43 | ||
|
|
3bcfa7cc7e | ||
|
|
be15e5a1cf | ||
|
|
a47ae7ed48 | ||
|
|
f1c5905cba | ||
|
|
d8e023b4c8 | ||
|
|
aabba4ed62 | ||
|
|
0e750b6e9e | ||
|
|
069e07c690 | ||
|
|
e1f0cd785d | ||
|
|
6709cfb735 | ||
|
|
5b4d55bb42 | ||
|
|
5ae6ef2c79 | ||
|
|
236154da67 | ||
|
|
0f23fe27a9 | ||
|
|
8156b0167a | ||
|
|
79134859cd | ||
|
|
14f77e0d1e | ||
|
|
8b8845105a | ||
|
|
601b5c08ad | ||
|
|
d7a6f2ebba | ||
|
|
9bcc3e5a4f | ||
|
|
e3cc9b9dac | ||
|
|
e322835f89 | ||
|
|
dbc503b3e1 | ||
|
|
be46543f4c | ||
|
|
c966b04e45 | ||
|
|
08549c43d7 | ||
|
|
972d199a90 | ||
|
|
d5850f1694 | ||
|
|
dab2f8cc39 | ||
|
|
dfb8eb54ac | ||
|
|
e9401d6f46 | ||
|
|
6c58f9ffb6 | ||
|
|
45fafdbadb | ||
|
|
db458fbb80 | ||
|
|
0bbc63aaf5 | ||
|
|
f2cb861ec7 | ||
|
|
9a68c4d3ba | ||
|
|
c5a337f389 | ||
|
|
5a1d2affb5 | ||
|
|
7ea36a5948 | ||
|
|
ce71a3d566 | ||
|
|
36382b6526 | ||
|
|
c335afa6b6 | ||
|
|
cd06401edd | ||
|
|
8b1424a150 | ||
|
|
d90ea6b843 | ||
|
|
3e45e4201d | ||
|
|
cbe79f7c6a | ||
|
|
7f5fc72af0 | ||
|
|
5c988f5786 | ||
|
|
fe51cc7c5d | ||
|
|
05d4f8e7a8 | ||
|
|
0d296b5b3b | ||
|
|
f1ed2abe53 | ||
|
|
f11f242ded | ||
|
|
a219ac693c | ||
|
|
e448143377 | ||
|
|
c07f43c8d5 | ||
|
|
c09e4c9c92 | ||
|
|
97e154ea84 | ||
|
|
26ba09fee1 | ||
|
|
7d34e27019 | ||
|
|
e7f4b9f921 | ||
|
|
f8e34104af | ||
|
|
59b34a9dcf | ||
|
|
97d5a9e84d | ||
|
|
25d86c7d33 | ||
|
|
1e0169bed9 | ||
|
|
390d4de256 | ||
|
|
8120a348bf | ||
|
|
01041a56b8 | ||
|
|
d6b5032a5c | ||
|
|
fa105550a5 | ||
|
|
f01557a3fa | ||
|
|
1568d6f612 | ||
|
|
73ace603ac | ||
|
|
4332659b86 | ||
|
|
a079e4a7f1 | ||
|
|
e0f5e06559 | ||
|
|
661218b4f1 | ||
|
|
cb6b701b8d | ||
|
|
c901144ede | ||
|
|
b36af1b917 | ||
|
|
be3846cf8b | ||
|
|
c5364264b1 | ||
|
|
85dcb31c5c | ||
|
|
15a7c87056 | ||
|
|
4281ada659 | ||
|
|
8e44d59b6a | ||
|
|
79272f9e2f | ||
|
|
4d26af6422 | ||
|
|
d8637af917 | ||
|
|
f89c56d864 | ||
|
|
f4c4d13f6d | ||
|
|
b9407606bd | ||
|
|
165798628b | ||
|
|
a1dd83240d | ||
|
|
22cf62af29 | ||
|
|
3b78a7bca9 | ||
|
|
fd1af2f45d | ||
|
|
48d1a4f7b6 | ||
|
|
c6bb160bfe | ||
|
|
7dba4e318a | ||
|
|
01eba8968b | ||
|
|
2d8700c28d | ||
|
|
09bae42c3b | ||
|
|
72563a3883 | ||
|
|
d6a9f664ff | ||
|
|
de7abef0e9 | ||
|
|
1d6e43d516 | ||
|
|
914c4be553 | ||
|
|
d7c08bcf91 | ||
|
|
2c70a4616c | ||
|
|
b7a13c0285 | ||
|
|
b03f0206ee | ||
|
|
ee6e3d946c |
@@ -0,0 +1,17 @@
|
||||
# EditorConfig helps developers define and maintain consistent coding styles between different editors and IDEs
|
||||
# editorconfig.org
|
||||
|
||||
root = true
|
||||
|
||||
[*]
|
||||
indent_style = space
|
||||
indent_size = 4
|
||||
|
||||
# We recommend you to keep these unchanged
|
||||
charset = utf-8
|
||||
trim_trailing_whitespace = true
|
||||
insert_final_newline = true
|
||||
|
||||
[*.md]
|
||||
trim_trailing_whitespace = false
|
||||
indent_size = 4
|
||||
+108
-6
@@ -1,11 +1,113 @@
|
||||
*.pro.user*
|
||||
*.o
|
||||
ui_*
|
||||
moc_*
|
||||
qrc_*
|
||||
# This file is used to ignore files that should not be pushed to the repo.
|
||||
# ----------------------------------------------------------------------------
|
||||
|
||||
# OpenRGB Specific
|
||||
OpenRGB
|
||||
openrgb
|
||||
Makefile
|
||||
OpenRGB-x86_64.AppImage
|
||||
|
||||
# Directories
|
||||
.build/
|
||||
.cache/
|
||||
.moc/
|
||||
.obj/
|
||||
.pch/
|
||||
.rcc/
|
||||
.uic/
|
||||
.clangd/
|
||||
*_debug/
|
||||
*_release/
|
||||
debug/
|
||||
release/
|
||||
build/
|
||||
Build/
|
||||
.qmake.cache
|
||||
.qmake.stash
|
||||
.vscode
|
||||
.vs
|
||||
|
||||
# Generic Files
|
||||
.DS_Store
|
||||
Thumbs.db
|
||||
|
||||
# Binaries
|
||||
*.exe
|
||||
!dependencies/**/*.exe
|
||||
*.bat
|
||||
!dependencies/**/*.bat
|
||||
|
||||
# C++ objects and libs
|
||||
*.slo
|
||||
*.lo
|
||||
*.o
|
||||
*.a
|
||||
*.la
|
||||
*.lai
|
||||
*.so
|
||||
*.so.*
|
||||
*.dll
|
||||
!dependencies/**/*.dll
|
||||
*.dylib
|
||||
|
||||
# Qt-es
|
||||
object_script.*.Release
|
||||
object_script.*.Debug
|
||||
*_plugin_import.cpp
|
||||
*.pro.user
|
||||
*.pro.user.*
|
||||
*.qbs.user
|
||||
*.qbs.user.*
|
||||
*.moc
|
||||
moc_*.cpp
|
||||
moc_*.h
|
||||
qrc_*.cpp
|
||||
ui_*.h
|
||||
*.qmlc
|
||||
*.jsc
|
||||
Makefile*
|
||||
*build-*
|
||||
*.qm
|
||||
*.prl
|
||||
|
||||
# Qt unit tests
|
||||
target_wrapper.*
|
||||
|
||||
# QtCreator
|
||||
*.autosave
|
||||
|
||||
# QtCreator Qml
|
||||
*.qmlproject.user
|
||||
*.qmlproject.user.*
|
||||
|
||||
# QtCreator CMake
|
||||
CMakeLists.txt.user*
|
||||
|
||||
# QtCreator 4.8< compilation database
|
||||
compile_commands.json
|
||||
|
||||
# QtCreator local machine specific files for imported projects
|
||||
*creator.user*
|
||||
|
||||
*_qmlcache.qrc
|
||||
|
||||
# Visual Studio generated files
|
||||
*.ib_pdb_index
|
||||
*.idb
|
||||
*.ilk
|
||||
*.ncb
|
||||
*.opensdf
|
||||
*.pdb
|
||||
*.sdf
|
||||
*.sln
|
||||
*.suo
|
||||
*.vcproj
|
||||
*.vcxproj
|
||||
*vcproj.*.*.user
|
||||
*vcxproj.*
|
||||
|
||||
# MinGW generated files
|
||||
*.Debug
|
||||
*.Release
|
||||
|
||||
# Clang tooling files
|
||||
compile_commands.json
|
||||
+71
-28
@@ -13,7 +13,7 @@
|
||||
- shared-windows
|
||||
- windows
|
||||
- windows-1809
|
||||
|
||||
|
||||
stages:
|
||||
- build
|
||||
- test
|
||||
@@ -37,7 +37,7 @@ before_script:
|
||||
script:
|
||||
- export $(dpkg-architecture)
|
||||
- ./scripts/build-appimage.sh
|
||||
|
||||
|
||||
artifacts:
|
||||
name: "${CI_PROJECT_NAME}_Linux_32_${CI_COMMIT_SHORT_SHA}"
|
||||
paths:
|
||||
@@ -56,7 +56,7 @@ before_script:
|
||||
script:
|
||||
- export $(dpkg-architecture)
|
||||
- ./scripts/build-appimage.sh
|
||||
|
||||
|
||||
artifacts:
|
||||
name: "${CI_PROJECT_NAME}_Linux_64_${CI_COMMIT_SHORT_SHA}"
|
||||
paths:
|
||||
@@ -127,7 +127,7 @@ before_script:
|
||||
exclude:
|
||||
- openrgb-dbgsym*.deb
|
||||
expire_in: 30 days
|
||||
|
||||
|
||||
#-----------------------------------------------------------------------#
|
||||
# Linux (.deb) Debian Bullseye 64-bit Build Target #
|
||||
#-----------------------------------------------------------------------#
|
||||
@@ -150,10 +150,10 @@ before_script:
|
||||
expire_in: 30 days
|
||||
|
||||
#-----------------------------------------------------------------------#
|
||||
# Linux (.rpm) 64-bit Build Target #
|
||||
# Linux (.rpm, f35) 64-bit Build Target #
|
||||
#-----------------------------------------------------------------------#
|
||||
"Linux 64 rpm":
|
||||
image: fedora:34
|
||||
"Linux 64 f35 rpm":
|
||||
image: fedora:35
|
||||
stage: build
|
||||
script:
|
||||
- dnf install rpmdevtools dnf-plugins-core -y
|
||||
@@ -176,6 +176,33 @@ before_script:
|
||||
- openrgb*.rpm
|
||||
expire_in: 30 days
|
||||
|
||||
#-----------------------------------------------------------------------#
|
||||
# Linux (.rpm, f36) 64-bit Build Target #
|
||||
#-----------------------------------------------------------------------#
|
||||
"Linux 64 f36 rpm":
|
||||
image: fedora:36
|
||||
stage: build
|
||||
script:
|
||||
- dnf install rpmdevtools dnf-plugins-core libcurl-devel -y
|
||||
- rpmdev-setuptree
|
||||
- ls /root/
|
||||
- cp fedora/OpenRGB.spec /root/rpmbuild/SPECS
|
||||
- cp ../OpenRGB /root/rpmbuild/SOURCES/ -r
|
||||
- cd /root/rpmbuild/SOURCES
|
||||
- tar -cf OpenRGB.tar.gz OpenRGB/
|
||||
- cd ..
|
||||
- dnf builddep SPECS/OpenRGB.spec -y
|
||||
- rpmbuild -ba SPECS/OpenRGB.spec
|
||||
- cd RPMS/x86_64/
|
||||
- mv openrgb*.rpm ${CI_PROJECT_DIR}/
|
||||
- cd ${CI_PROJECT_DIR}
|
||||
|
||||
artifacts:
|
||||
name: "${CI_PROJECT_NAME}_Linux_64_rpm_${CI_COMMIT_SHORT_SHA}"
|
||||
paths:
|
||||
- openrgb*.rpm
|
||||
expire_in: 30 days
|
||||
|
||||
#-----------------------------------------------------------------------#
|
||||
# Debian 32 Buster test #
|
||||
#-----------------------------------------------------------------------#
|
||||
@@ -279,10 +306,10 @@ before_script:
|
||||
- "Linux 64 .deb (Debian Bullseye)"
|
||||
|
||||
#-----------------------------------------------------------------------#
|
||||
# Fedora 64 v34 test #
|
||||
# Fedora 64 v35 test #
|
||||
#-----------------------------------------------------------------------#
|
||||
"Fedora 64 v34":
|
||||
image: fedora:34
|
||||
"Fedora 64 v35":
|
||||
image: fedora:35
|
||||
stage: test
|
||||
script:
|
||||
- yum -y localinstall ./openrgb*64.rpm
|
||||
@@ -290,9 +317,25 @@ before_script:
|
||||
- openrgb -l
|
||||
- yum -y remove openrgb
|
||||
dependencies:
|
||||
- "Linux 64 rpm"
|
||||
- "Linux 64 f35 rpm"
|
||||
needs:
|
||||
- "Linux 64 rpm"
|
||||
- "Linux 64 f35 rpm"
|
||||
|
||||
#-----------------------------------------------------------------------#
|
||||
# Fedora 64 v36 test #
|
||||
#-----------------------------------------------------------------------#
|
||||
"Fedora 64 v36":
|
||||
image: fedora:36
|
||||
stage: test
|
||||
script:
|
||||
- yum -y localinstall ./openrgb*64.rpm
|
||||
- openrgb --version
|
||||
- openrgb -l
|
||||
- yum -y remove openrgb
|
||||
dependencies:
|
||||
- "Linux 64 f36 rpm"
|
||||
needs:
|
||||
- "Linux 64 f36 rpm"
|
||||
|
||||
#-----------------------------------------------------------------------#
|
||||
# Windows (32-bit) Build Target #
|
||||
@@ -314,42 +357,42 @@ before_script:
|
||||
- '& cmd.exe /C "vcvarsall.bat x86 & set" | Foreach-Object { if ($_ -match "(.*?)=(.*)") { Set-Item -force -path "Env:\$($matches[1])" -value "$($matches[2])" } }'
|
||||
- Pop-Location
|
||||
- _fold_final_
|
||||
|
||||
|
||||
- _fold_start_ 'downloading precompiled versions of qtbase, qttools (for windeployqt) and jom (for a more parallel nmake)'
|
||||
- mkdir _qt
|
||||
- mkdir _qt_download
|
||||
- Push-Location _qt_download
|
||||
- curl.exe -LJ -o qt-base.7z 'https://qt-mirror.dannhauer.de/online/qtsdkrepository/windows_x86/desktop/qt5_5150/qt.qt5.5150.win32_msvc2019/5.15.0-0-202005150700qtbase-Windows-Windows_10-MSVC2019-Windows-Windows_10-X86.7z'
|
||||
- curl.exe -LJ -o qt-base.7z 'https://qt-mirror.dannhauer.de/online/qtsdkrepository/windows_x86/desktop/qt5_5150/qt.qt5.5150.win32_msvc2019/5.15.0-0-202005150700qtbase-Windows-Windows_10-MSVC2019-Windows-Windows_10-X86.7z'
|
||||
- curl.exe -LJ -o qt-tools.7z 'https://qt-mirror.dannhauer.de/online/qtsdkrepository/windows_x86/desktop/qt5_5150/qt.qt5.5150.win32_msvc2019/5.15.0-0-202005150700qttools-Windows-Windows_10-MSVC2019-Windows-Windows_10-X86.7z'
|
||||
- curl.exe -LJ -o qt-jom.zip 'https://qt-mirror.dannhauer.de/official_releases/jom/jom.zip'
|
||||
- _fold_final_
|
||||
|
||||
|
||||
- _fold_start_ 'extracting the downloaded qt binaries'
|
||||
- 7z x qt-base.7z '-o../_qt' -y
|
||||
- 7z x qt-tools.7z '-o../_qt' -y
|
||||
- 7z x qt-jom.zip '-o../_qt' -y
|
||||
- _fold_final_
|
||||
|
||||
|
||||
- _fold_start_ 'turn the qt install from enterprise to foss; remove the licensing checks'
|
||||
- ${qconfig-pri-folder} = '..\_qt\5.15.0\msvc2019\mkspecs\qconfig.pri'
|
||||
- (Get-Content ${qconfig-pri-folder}).replace('QT_EDITION = Enterprise', 'QT_EDITION = OpenSource') | Set-Content ${qconfig-pri-folder}
|
||||
- (Get-Content ${qconfig-pri-folder}).replace('QT_LICHECK = licheck.exe', '') | Set-Content ${qconfig-pri-folder}
|
||||
- Pop-Location
|
||||
- _fold_final_
|
||||
|
||||
|
||||
- _fold_start_ 'run qmake and generate the msvc nmake makefile'
|
||||
- mkdir _build; cd _build
|
||||
- ..\_qt\5.15.0\msvc2019\bin\qmake ..\OpenRGB.pro
|
||||
- _fold_final_
|
||||
|
||||
|
||||
- _fold_start_ 'start the actual build with jom instead of nmake; for speed'
|
||||
- ..\_qt\jom
|
||||
- _fold_final_
|
||||
|
||||
|
||||
- _fold_start_ 'run windeployqt to automatically copy the needed dll files'
|
||||
- ..\_qt\5.15.0\msvc2019\bin\windeployqt --no-angle --no-translations --no-opengl-sw --no-system-d3d-compiler --no-compiler-runtime --no-webkit2 .\release\
|
||||
- _fold_final_
|
||||
|
||||
|
||||
- _fold_start_ 'Moving results for upload'
|
||||
- mv release ../'OpenRGB Windows 32-bit'
|
||||
- _fold_final_
|
||||
@@ -383,42 +426,42 @@ before_script:
|
||||
- '& cmd.exe /C "vcvarsall.bat x64 & set" | Foreach-Object { if ($_ -match "(.*?)=(.*)") { Set-Item -force -path "Env:\$($matches[1])" -value "$($matches[2])" } }'
|
||||
- Pop-Location
|
||||
- _fold_final_
|
||||
|
||||
|
||||
- _fold_start_ 'downloading precompiled versions of qtbase, qttools (for windeployqt) and jom (for a more parallel nmake)'
|
||||
- mkdir _qt
|
||||
- mkdir _qt_download
|
||||
- Push-Location _qt_download
|
||||
- curl.exe -LJ -o qt-base.7z 'https://qt-mirror.dannhauer.de/online/qtsdkrepository/windows_x86/desktop/qt5_5150/qt.qt5.5150.win64_msvc2019_64/5.15.0-0-202005150700qtbase-Windows-Windows_10-MSVC2019-Windows-Windows_10-X86_64.7z'
|
||||
- curl.exe -LJ -o qt-base.7z 'https://qt-mirror.dannhauer.de/online/qtsdkrepository/windows_x86/desktop/qt5_5150/qt.qt5.5150.win64_msvc2019_64/5.15.0-0-202005150700qtbase-Windows-Windows_10-MSVC2019-Windows-Windows_10-X86_64.7z'
|
||||
- curl.exe -LJ -o qt-tools.7z 'https://qt-mirror.dannhauer.de/online/qtsdkrepository/windows_x86/desktop/qt5_5150/qt.qt5.5150.win64_msvc2019_64/5.15.0-0-202005150700qttools-Windows-Windows_10-MSVC2019-Windows-Windows_10-X86_64.7z'
|
||||
- curl.exe -LJ -o qt-jom.zip 'https://qt-mirror.dannhauer.de/official_releases/jom/jom.zip'
|
||||
- _fold_final_
|
||||
|
||||
|
||||
- _fold_start_ 'extracting the downloaded qt binaries'
|
||||
- 7z x qt-base.7z '-o../_qt' -y
|
||||
- 7z x qt-tools.7z '-o../_qt' -y
|
||||
- 7z x qt-jom.zip '-o../_qt' -y
|
||||
- _fold_final_
|
||||
|
||||
|
||||
- _fold_start_ 'turn the qt install from enterprise to foss; remove the licensing checks'
|
||||
- ${qconfig-pri-folder} = '..\_qt\5.15.0\msvc2019_64\mkspecs\qconfig.pri'
|
||||
- (Get-Content ${qconfig-pri-folder}).replace('QT_EDITION = Enterprise', 'QT_EDITION = OpenSource') | Set-Content ${qconfig-pri-folder}
|
||||
- (Get-Content ${qconfig-pri-folder}).replace('QT_LICHECK = licheck.exe', '') | Set-Content ${qconfig-pri-folder}
|
||||
- Pop-Location
|
||||
- _fold_final_
|
||||
|
||||
|
||||
- _fold_start_ 'run qmake and generate the msvc nmake makefile'
|
||||
- mkdir _build; cd _build
|
||||
- ..\_qt\5.15.0\msvc2019_64\bin\qmake ..\OpenRGB.pro
|
||||
- _fold_final_
|
||||
|
||||
|
||||
- _fold_start_ 'start the actual build with jom instead of nmake; for speed'
|
||||
- ..\_qt\jom
|
||||
- _fold_final_
|
||||
|
||||
|
||||
- _fold_start_ 'run windeployqt to automatically copy the needed dll files'
|
||||
- ..\_qt\5.15.0\msvc2019_64\bin\windeployqt --no-angle --no-translations --no-opengl-sw --no-system-d3d-compiler --no-compiler-runtime --no-webkit2 .\release\
|
||||
- _fold_final_
|
||||
|
||||
|
||||
- _fold_start_ 'Moving results for upload'
|
||||
- mv release ../'OpenRGB Windows 64-bit'
|
||||
- _fold_final_
|
||||
|
||||
@@ -0,0 +1,106 @@
|
||||
# OpenRGB CODEOWNERS
|
||||
|
||||
# Default Code Owner
|
||||
* @Calcprogrammer1
|
||||
|
||||
CODEOWNERS @Calcprogrammer1
|
||||
|
||||
#-----------------------------------------------------------------------------#
|
||||
# Controllers - Directories #
|
||||
#-----------------------------------------------------------------------------#
|
||||
[Controllers]
|
||||
/Controllers/AMDWraithPrismController/
|
||||
/Controllers/ASRockPolychromeSMBusController/
|
||||
/Controllers/ASRockPolychromeUSBController/
|
||||
/Controllers/AlienwareController/
|
||||
/Controllers/AlienwareKeyboardController/
|
||||
/Controllers/AnnePro2Controller/
|
||||
/Controllers/AsusAuraCoreController/
|
||||
/Controllers/AsusAuraGPUController/
|
||||
/Controllers/AsusAuraUSBController/
|
||||
/Controllers/AsusTUFLaptopController/
|
||||
/Controllers/BlinkyTapeController/
|
||||
/Controllers/CoolerMasterController/ @Dr_No
|
||||
/Controllers/CorsairCommanderCoreController/
|
||||
/Controllers/CorsairDominatorPlatinumController/
|
||||
/Controllers/CorsairHydroController/
|
||||
/Controllers/CorsairHydroPlatinumController/
|
||||
/Controllers/CorsairLightingNodeController/
|
||||
/Controllers/CorsairPeripheralController/
|
||||
/Controllers/CorsairVengeanceController/
|
||||
/Controllers/CorsairVengeanceProController/
|
||||
/Controllers/CorsairWirelessController/
|
||||
/Controllers/CreativeController/
|
||||
/Controllers/CrucialController/
|
||||
/Controllers/DasKeyboardController/
|
||||
/Controllers/DebugController/
|
||||
/Controllers/DuckyKeyboardController/
|
||||
/Controllers/DygmaRaiseController/
|
||||
/Controllers/E131Controller/
|
||||
/Controllers/EKController/ @Dr_No
|
||||
/Controllers/ENESMBusController/
|
||||
/Controllers/EVGAAmpereGPUController/ @TheRogueZeta
|
||||
/Controllers/EVGAGP102GPUController/
|
||||
/Controllers/EVGAPascalGPUController/
|
||||
/Controllers/EVGATuringGPUController/ @TheRogueZeta
|
||||
/Controllers/EVGAUSBController/ @Dr_No
|
||||
/Controllers/EVisionKeyboardController/
|
||||
/Controllers/EspurnaController/
|
||||
/Controllers/FanBusController/
|
||||
/Controllers/FaustusController/
|
||||
/Controllers/GainwardGPUController/
|
||||
/Controllers/GalaxGPUController/
|
||||
/Controllers/GigabyteAorusCPUCoolerController/
|
||||
/Controllers/GigabyteRGBFusion2DRAMController/
|
||||
/Controllers/GigabyteRGBFusion2GPUController/
|
||||
/Controllers/GigabyteRGBFusion2SMBusController/ @Dr_No
|
||||
/Controllers/GigabyteRGBFusion2USBController/ @Dr_No
|
||||
/Controllers/GigabyteRGBFusionController/
|
||||
/Controllers/GigabyteRGBFusionGPUController/
|
||||
/Controllers/HPOmen30LController/
|
||||
/Controllers/HoltekController/
|
||||
/Controllers/HyperXDRAMController/
|
||||
/Controllers/HyperXKeyboardController/
|
||||
/Controllers/HyperXMouseController/
|
||||
/Controllers/HyperXMousematController/
|
||||
/Controllers/LEDStripController/
|
||||
/Controllers/LianLiController/
|
||||
/Controllers/LinuxLEDController/
|
||||
/Controllers/LogitechController/ @Dr_No
|
||||
/Controllers/MSI3ZoneController/
|
||||
/Controllers/MSIGPUController/
|
||||
/Controllers/MSIMysticLightController/
|
||||
/Controllers/MSIRGBController/
|
||||
/Controllers/NZXTHue2Controller/
|
||||
/Controllers/NZXTHuePlusController/
|
||||
/Controllers/NZXTKrakenController/
|
||||
/Controllers/OpenRazerController/
|
||||
/Controllers/PNYGPUController/
|
||||
/Controllers/PatriotViperController/
|
||||
/Controllers/PhilipsHueController/
|
||||
/Controllers/PhilipsWizController/
|
||||
/Controllers/QMKOpenRGBController/
|
||||
/Controllers/RazerController/
|
||||
/Controllers/RedragonController/
|
||||
/Controllers/RoccatController/
|
||||
/Controllers/SapphireGPUController/
|
||||
/Controllers/SinowealthController/
|
||||
/Controllers/SonyDS4Controller/
|
||||
/Controllers/SteelSeriesController/
|
||||
/Controllers/TecknetController/
|
||||
/Controllers/ThermaltakePoseidonZRGBController/
|
||||
/Controllers/ThermaltakeRiingController/
|
||||
/Controllers/ThingMController/
|
||||
/Controllers/WootingKeyboardController/ @Dr_No
|
||||
/Controllers/YeelightController/
|
||||
/Controllers/ZalmanZSyncController/
|
||||
|
||||
#-----------------------------------------------------------------------------#
|
||||
# Controllers - File exceptions #
|
||||
# #
|
||||
# As sections get combined and the last rule applies any specific file #
|
||||
# that is an exception to the above should be explicitly named here #
|
||||
#-----------------------------------------------------------------------------#
|
||||
[Controllers]
|
||||
/Controllers/ASRockPolychromeSMBusController/ASRockPolychromeSMBusController.cpp @TheRogueZeta
|
||||
/Controllers/ASRockPolychromeSMBusController/ASRockPolychromeSMBusController.h @TheRogueZeta
|
||||
@@ -1,6 +1,7 @@
|
||||
<!--
|
||||
Found a bug? Something isn't working as expected?
|
||||
To help us keep track of the requests please start the title with [Bug Report]
|
||||
But before that, first you should check it out with the latest pipeline.
|
||||
-->
|
||||
|
||||
### Description of Bug
|
||||
@@ -10,7 +11,20 @@ Explain any steps taken to reproduce the bug
|
||||
and what you expect the correct behavior to be.
|
||||
-->
|
||||
|
||||
### Attached Log
|
||||
<!--
|
||||
Please attach a verbose log, you can do it by running the exe from cmd with '--loglevel 6' flag.
|
||||
You can locate them using the Settings tab and click the 'Open Settings Folder' button.
|
||||
Important!! Please upload the logs made with the latest pipeline build of OpenRGB.
|
||||
-->
|
||||
|
||||
### Operating System
|
||||
<!--
|
||||
Please write down which OS and which version did you encounter the issue with.
|
||||
-->
|
||||
~"OS - Linux"
|
||||
~"OS - MacOS"
|
||||
~"OS - Windows"
|
||||
### Hardware Configuration
|
||||
<!--
|
||||
Please list the RGB hardware that you are using with OpenRGB.
|
||||
|
||||
@@ -0,0 +1,24 @@
|
||||
|
||||
<!--
|
||||
Please put "Initial commit for" name of the product, including manufacturer above this line
|
||||
and a description of the additions / removals / changes done below the line.
|
||||
-->
|
||||
|
||||
|
||||
|
||||
|
||||
<!-- For admin purposes: Please leave this section as is -->
|
||||
|
||||
# Checklist for Accepting a Merge Request for a New Device
|
||||
- [ ] The `New Device` issue raised for this device is linked to this MR with a keyword `Closes / Resolves / Implements`
|
||||
- [ ] There is a device protocol page in the [Developer Wiki](https://gitlab.com/OpenRGBDevelopers/OpenRGB-Wiki) or there is enough information / captures in the `New Device` issue to provide ongoing support.
|
||||
- [ ] The code to be merged follows the style guide and change requirements as [documented in the contributing guide](https://gitlab.com/CalcProgrammer1/OpenRGB/-/blob/master/CONTRIBUTING.md).
|
||||
<!--
|
||||
The metadata for this controller is required to produce both the udev permissions and
|
||||
the supported device page for this device. A stub can be found in the RGBController_Dummy.cpp
|
||||
-->
|
||||
- [ ] Meta data for the device is included in `RGBController_*` file
|
||||
- [ ] This device is detected and is working on Windows 10 and / or 11
|
||||
- [ ] This device is detected and is working on Linux (Please specify distribution and releases tested)
|
||||
- [ ] Logging for Info, Warnings and Errors has been added for troubleshooting purposes
|
||||
<!-- For admin purposes: Please leave this section as is -->
|
||||
@@ -1,851 +0,0 @@
|
||||
#---------------------------------------------------------------#
|
||||
# OpenRGB udev rules #
|
||||
# #
|
||||
# Adam Honse (CalcProgrammer1) 5/29/2020 #
|
||||
#---------------------------------------------------------------#
|
||||
|
||||
#---------------------------------------------------------------#
|
||||
# User I2C/SMBus Access #
|
||||
#---------------------------------------------------------------#
|
||||
KERNEL=="i2c-[0-99]*", TAG+="uaccess"
|
||||
|
||||
#---------------------------------------------------------------#
|
||||
# Super I/O Access #
|
||||
#---------------------------------------------------------------#
|
||||
KERNEL=="port", TAG+="uaccess"
|
||||
|
||||
#---------------------------------------------------------------#
|
||||
# User hidraw Access #
|
||||
#---------------------------------------------------------------#
|
||||
KERNEL=="hidraw*", SUBSYSTEM=="hidraw", TAG+="uaccess"
|
||||
|
||||
#---------------------------------------------------------------#
|
||||
# AMD Wraith Prism #
|
||||
#---------------------------------------------------------------#
|
||||
SUBSYSTEMS=="usb", ATTR{idVendor}=="2516", ATTR{idProduct}=="0051", TAG+="uaccess"
|
||||
|
||||
#---------------------------------------------------------------#
|
||||
# Aorus Devices #
|
||||
#---------------------------------------------------------------#
|
||||
SUBSYSTEMS=="usb", ATTR{idVendor}=="1044", ATTR{idProduct}=="7a42", TAG+="uaccess"
|
||||
|
||||
#---------------------------------------------------------------#
|
||||
# ASRock Devices #
|
||||
# #
|
||||
# ASRock Polychrome USB #
|
||||
# ASRock Deskmini Addressable LED Strip #
|
||||
#---------------------------------------------------------------#
|
||||
SUBSYSTEMS=="usb", ATTR{idVendor}=="26ce", ATTR{idProduct}=="01a2", TAG+="uaccess"
|
||||
SUBSYSTEMS=="usb", ATTR{idVendor}=="26ce", ATTR{idProduct}=="01a6", TAG+="uaccess"
|
||||
|
||||
#---------------------------------------------------------------#
|
||||
# ASUS Aura Core Devices #
|
||||
#---------------------------------------------------------------#
|
||||
SUBSYSTEMS=="usb", ATTR{idVendor}=="0b05", ATTR{idProduct}=="1854", TAG+="uaccess"
|
||||
SUBSYSTEMS=="usb", ATTR{idVendor}=="0b05", ATTR{idProduct}=="1869", TAG+="uaccess"
|
||||
SUBSYSTEMS=="usb", ATTR{idVendor}=="0b05", ATTR{idProduct}=="1866", TAG+="uaccess"
|
||||
|
||||
#---------------------------------------------------------------#
|
||||
# ASUS Aura USB Devices #
|
||||
#---------------------------------------------------------------#
|
||||
SUBSYSTEMS=="usb", ATTR{idVendor}=="0b05", ATTR{idProduct}=="1867", TAG+="uaccess"
|
||||
SUBSYSTEMS=="usb", ATTR{idVendor}=="0b05", ATTR{idProduct}=="1872", TAG+="uaccess"
|
||||
SUBSYSTEMS=="usb", ATTR{idVendor}=="0b05", ATTR{idProduct}=="1889", TAG+="uaccess"
|
||||
SUBSYSTEMS=="usb", ATTR{idVendor}=="0b05", ATTR{idProduct}=="18a3", TAG+="uaccess"
|
||||
SUBSYSTEMS=="usb", ATTR{idVendor}=="0b05", ATTR{idProduct}=="18f3", TAG+="uaccess"
|
||||
SUBSYSTEMS=="usb", ATTR{idVendor}=="0b05", ATTR{idProduct}=="18a5", TAG+="uaccess"
|
||||
SUBSYSTEMS=="usb", ATTR{idVendor}=="0b05", ATTR{idProduct}=="1939", TAG+="uaccess"
|
||||
SUBSYSTEMS=="usb", ATTR{idVendor}=="0b05", ATTR{idProduct}=="18af", TAG+="uaccess"
|
||||
|
||||
SUBSYSTEMS=="usb", ATTR{idVendor}=="0b05", ATTR{idProduct}=="193c", TAG+="uaccess", TAG+="ROG_Falchion_Wired"
|
||||
SUBSYSTEMS=="usb", ATTR{idVendor}=="0b05", ATTR{idProduct}=="193e", TAG+="uaccess", TAG+="ROG_Falchion_Wireless"
|
||||
SUBSYSTEMS=="usb", ATTR{idVendor}=="0b05", ATTR{idProduct}=="1875", TAG+="uaccess", TAG+="ROG_Strix_Flare"
|
||||
SUBSYSTEMS=="usb", ATTR{idVendor}=="0b05", ATTR{idProduct}=="18cf", TAG+="uaccess", TAG+="ROG_Strix_Flare_Pink"
|
||||
SUBSYSTEMS=="usb", ATTR{idVendor}=="0b05", ATTR{idProduct}=="18f8", TAG+="uaccess", TAG+="ROG_Strix_Scope"
|
||||
SUBSYSTEMS=="usb", ATTR{idVendor}=="0b05", ATTR{idProduct}=="1951", TAG+="uaccess", TAG+="ROG_Strix_Scope_RX"
|
||||
SUBSYSTEMS=="usb", ATTR{idVendor}=="0b05", ATTR{idProduct}=="190c", TAG+="uaccess", TAG+="ROG_Strix_Scope_TKL"
|
||||
SUBSYSTEMS=="usb", ATTR{idVendor}=="0b05", ATTR{idProduct}=="18a0", TAG+="uaccess", TAG+="TUF_K7_Gaming"
|
||||
|
||||
SUBSYSTEMS=="usb", ATTR{idVendor}=="0b05", ATTR{idProduct}=="18dd", TAG+="uaccess", TAG+="ROG_Gladius_II_Core"
|
||||
SUBSYSTEMS=="usb", ATTR{idVendor}=="0b05", ATTR{idProduct}=="1845", TAG+="uaccess", TAG+="ROG_Gladius_II"
|
||||
SUBSYSTEMS=="usb", ATTR{idVendor}=="0b05", ATTR{idProduct}=="1877", TAG+="uaccess", TAG+="ROG_Gladius_II_Origin"
|
||||
SUBSYSTEMS=="usb", ATTR{idVendor}=="0b05", ATTR{idProduct}=="18cd", TAG+="uaccess", TAG+="ROG_Gladius_II_Origin_Pink"
|
||||
SUBSYSTEMS=="usb", ATTR{idVendor}=="0b05", ATTR{idProduct}=="18b1", TAG+="uaccess", TAG+="ROG_Gladius_II_Origin_COD"
|
||||
SUBSYSTEMS=="usb", ATTR{idVendor}=="0b05", ATTR{idProduct}=="189e", TAG+="uaccess", TAG+="ROG_Gladius_II_Wireless1"
|
||||
SUBSYSTEMS=="usb", ATTR{idVendor}=="0b05", ATTR{idProduct}=="18a0", TAG+="uaccess", TAG+="ROG_Gladius_II_Wireless2"
|
||||
SUBSYSTEMS=="usb", ATTR{idVendor}=="0b05", ATTR{idProduct}=="18e5", TAG+="uaccess", TAG+="ROG_Chakram_Wireless"
|
||||
SUBSYSTEMS=="usb", ATTR{idVendor}=="0b05", ATTR{idProduct}=="18e3", TAG+="uaccess", TAG+="ROG_Chakram_Wired1"
|
||||
SUBSYSTEMS=="usb", ATTR{idVendor}=="0b05", ATTR{idProduct}=="1958", TAG+="uaccess", TAG+="ROG_Chakram_Wired2"
|
||||
SUBSYSTEMS=="usb", ATTR{idVendor}=="0b05", ATTR{idProduct}=="1846", TAG+="uaccess", TAG+="ROG_Pugio"
|
||||
SUBSYSTEMS=="usb", ATTR{idVendor}=="0b05", ATTR{idProduct}=="1906", TAG+="uaccess", TAG+="ROG_Pugio_II_Wired"
|
||||
SUBSYSTEMS=="usb", ATTR{idVendor}=="0b05", ATTR{idProduct}=="1908", TAG+="uaccess", TAG+="ROG_Pugio_II_Wireless"
|
||||
SUBSYSTEMS=="usb", ATTR{idVendor}=="0b05", ATTR{idProduct}=="18e1", TAG+="uaccess", TAG+="ROG_Strix_Impact_II"
|
||||
SUBSYSTEMS=="usb", ATTR{idVendor}=="0b05", ATTR{idProduct}=="1910", TAG+="uaccess", TAG+="TUF_M3_&_M7"
|
||||
|
||||
#---------------------------------------------------------------#
|
||||
# ASUS TUF Laptops (faustus) #
|
||||
#---------------------------------------------------------------#
|
||||
ACTION=="add", SUBSYSTEM=="platform", KERNEL=="faustus", RUN+="/bin/chmod a+w /sys/bus/platform/devices/%k/kbbl/kbbl_blue"
|
||||
ACTION=="add", SUBSYSTEM=="platform", KERNEL=="faustus", RUN+="/bin/chmod a+w /sys/bus/platform/devices/%k/kbbl/kbbl_flags"
|
||||
ACTION=="add", SUBSYSTEM=="platform", KERNEL=="faustus", RUN+="/bin/chmod a+w /sys/bus/platform/devices/%k/kbbl/kbbl_green"
|
||||
ACTION=="add", SUBSYSTEM=="platform", KERNEL=="faustus", RUN+="/bin/chmod a+w /sys/bus/platform/devices/%k/kbbl/kbbl_mode"
|
||||
ACTION=="add", SUBSYSTEM=="platform", KERNEL=="faustus", RUN+="/bin/chmod a+w /sys/bus/platform/devices/%k/kbbl/kbbl_red"
|
||||
ACTION=="add", SUBSYSTEM=="platform", KERNEL=="faustus", RUN+="/bin/chmod a+w /sys/bus/platform/devices/%k/kbbl/kbbl_set"
|
||||
ACTION=="add", SUBSYSTEM=="platform", KERNEL=="faustus", RUN+="/bin/chmod a+w /sys/bus/platform/devices/%k/kbbl/kbbl_speed"
|
||||
|
||||
#---------------------------------------------------------------#
|
||||
# Cooler Master Peripheral Devices #
|
||||
# #
|
||||
# Mice: #
|
||||
# Cooler Master MM711 #
|
||||
# Cooler Master MM720 #
|
||||
# Mousemats: #
|
||||
# Cooler Master MP750 #
|
||||
# Controllers: #
|
||||
# ARGB Device #
|
||||
# Small ARGB Device #
|
||||
# Graphics Cards: #
|
||||
# Radeon RX6000 Series Reference Cards #
|
||||
# Keyboards: #
|
||||
# Masterkeys Pro L #
|
||||
# Masterkeys Pro L White #
|
||||
# Masterkeys Pro S #
|
||||
# Masterkeys MK750 #
|
||||
# Masterkeys SK630 #
|
||||
# Masterkeys SK650 #
|
||||
#---------------------------------------------------------------#
|
||||
SUBSYSTEMS=="usb", ATTR{idVendor}=="2516", ATTR{idProduct}=="0101", TAG+="uaccess", TAG+="MM711"
|
||||
SUBSYSTEMS=="usb", ATTR{idVendor}=="2516", ATTR{idProduct}=="0141", TAG+="uaccess", TAG+="MM720"
|
||||
SUBSYSTEMS=="usb", ATTR{idVendor}=="2516", ATTR{idProduct}=="0109", TAG+="uaccess", TAG+="MP750_XL"
|
||||
SUBSYSTEMS=="usb", ATTR{idVendor}=="2516", ATTR{idProduct}=="0107", TAG+="uaccess", TAG+="MP750_L"
|
||||
SUBSYSTEMS=="usb", ATTR{idVendor}=="2516", ATTR{idProduct}=="0105", TAG+="uaccess", TAG+="MP750_M"
|
||||
SUBSYSTEMS=="usb", ATTR{idVendor}=="2516", ATTR{idProduct}=="1011", TAG+="uaccess", TAG+="ARGB"
|
||||
SUBSYSTEMS=="usb", ATTR{idVendor}=="2516", ATTR{idProduct}=="1000", TAG+="uaccess", TAG+="Small_ARGB"
|
||||
SUBSYSTEMS=="usb", ATTR{idVendor}=="2516", ATTR{idProduct}=="004f", TAG+="uaccess", TAG+="RGB"
|
||||
SUBSYSTEMS=="usb", ATTR{idVendor}=="2516", ATTR{idProduct}=="014d", TAG+="uaccess", TAG+="Radeon_6000"
|
||||
SUBSYSTEMS=="usb", ATTR{idVendor}=="2516", ATTR{idProduct}=="003b", TAG+="uaccess", TAG+="Masterkeys_Pro_L"
|
||||
SUBSYSTEMS=="usb", ATTR{idVendor}=="2516", ATTR{idProduct}=="0047", TAG+="uaccess", TAG+="Masterkeys_Pro_L_White"
|
||||
SUBSYSTEMS=="usb", ATTR{idVendor}=="2516", ATTR{idProduct}=="003c", TAG+="uaccess", TAG+="Masterkeys_Pro_S"
|
||||
SUBSYSTEMS=="usb", ATTR{idVendor}=="2516", ATTR{idProduct}=="0067", TAG+="uaccess", TAG+="Masterkeys_MK750"
|
||||
SUBSYSTEMS=="usb", ATTR{idVendor}=="2516", ATTR{idProduct}=="0089", TAG+="uaccess", TAG+="Masterkeys_SK630"
|
||||
SUBSYSTEMS=="usb", ATTR{idVendor}=="2516", ATTR{idProduct}=="008d", TAG+="uaccess", TAG+="Masterkeys_SK650"
|
||||
|
||||
|
||||
#---------------------------------------------------------------#
|
||||
# Corsair Hydro Series Devices #
|
||||
# #
|
||||
# Corsair H100i Pro RGB #
|
||||
# Corsair H115i Pro RGB #
|
||||
# Corsair H150i Pro RGB #
|
||||
#---------------------------------------------------------------#
|
||||
SUBSYSTEMS=="usb", ATTR{idVendor}=="1b1c", ATTR{idProduct}=="0c15", TAG+="uaccess"
|
||||
SUBSYSTEMS=="usb", ATTR{idVendor}=="1b1c", ATTR{idProduct}=="0c13", TAG+="uaccess"
|
||||
SUBSYSTEMS=="usb", ATTR{idVendor}=="1b1c", ATTR{idProduct}=="0c12", TAG+="uaccess"
|
||||
|
||||
#---------------------------------------------------------------#
|
||||
# Corsair Hydro Platinum Series Devices #
|
||||
# #
|
||||
# Corsair H100i Platinum RGB #
|
||||
# Corsair H100i Platinum SE RGB #
|
||||
# Corsair H115i Platinum RGB #
|
||||
# Corsair H100i Pro XT RGB #
|
||||
# Corsair H115i Pro XT RGB #
|
||||
# Corsair H150i Pro XT RGB #
|
||||
#---------------------------------------------------------------#
|
||||
SUBSYSTEMS=="usb", ATTR{idVendor}=="1b1c", ATTR{idProduct}=="0c18", TAG+="uaccess"
|
||||
SUBSYSTEMS=="usb", ATTR{idVendor}=="1b1c", ATTR{idProduct}=="0c19", TAG+="uaccess"
|
||||
SUBSYSTEMS=="usb", ATTR{idVendor}=="1b1c", ATTR{idProduct}=="0c17", TAG+="uaccess"
|
||||
SUBSYSTEMS=="usb", ATTR{idVendor}=="1b1c", ATTR{idProduct}=="0c20", TAG+="uaccess"
|
||||
SUBSYSTEMS=="usb", ATTR{idVendor}=="1b1c", ATTR{idProduct}=="0c21", TAG+="uaccess"
|
||||
SUBSYSTEMS=="usb", ATTR{idVendor}=="1b1c", ATTR{idProduct}=="0c22", TAG+="uaccess"
|
||||
|
||||
#---------------------------------------------------------------#
|
||||
# Corsair Lighting Node Devices #
|
||||
# #
|
||||
# Corsair Lighting Node Core #
|
||||
# Corsair Lighting Node Pro #
|
||||
# Corsair Commander Pro #
|
||||
# Corsair LS100 #
|
||||
# Corsair 1000D Obsidian #
|
||||
# Corsair Spec Omega RGB #
|
||||
# Corsair LT100 #
|
||||
#---------------------------------------------------------------#
|
||||
SUBSYSTEMS=="usb", ATTR{idVendor}=="1b1c", ATTR{idProduct}=="0c1a", TAG+="uaccess"
|
||||
SUBSYSTEMS=="usb", ATTR{idVendor}=="1b1c", ATTR{idProduct}=="0c0b", TAG+="uaccess"
|
||||
SUBSYSTEMS=="usb", ATTR{idVendor}=="1b1c", ATTR{idProduct}=="0c10", TAG+="uaccess"
|
||||
SUBSYSTEMS=="usb", ATTR{idVendor}=="1b1c", ATTR{idProduct}=="0c1e", TAG+="uaccess"
|
||||
SUBSYSTEMS=="usb", ATTR{idVendor}=="1b1c", ATTR{idProduct}=="1d00", TAG+="uaccess"
|
||||
SUBSYSTEMS=="usb", ATTR{idVendor}=="1b1c", ATTR{idProduct}=="1d04", TAG+="uaccess"
|
||||
SUBSYSTEMS=="usb", ATTR{idVendor}=="1b1c", ATTR{idProduct}=="0c23", TAG+="uaccess"
|
||||
|
||||
#---------------------------------------------------------------#
|
||||
# Corsair Peripheral Devices #
|
||||
# #
|
||||
# Keyboards: #
|
||||
# Corsair K55 RGB #
|
||||
# Corsair K65 RGB #
|
||||
# Corsair K65 RGB Lux #
|
||||
# Corsair K65 RGB Rapidfire #
|
||||
# Corsair K68 RGB #
|
||||
# Corsair K70 RGB #
|
||||
# Corsair K70 RGB Lux #
|
||||
# Corsair K70 RGB Rapidfire #
|
||||
# Corsair K70 RGB MK2 #
|
||||
# Corsair K70 RGB MK2 SE #
|
||||
# Corsair K70 RGB MK2 LP #
|
||||
# Corsair K95 RGB #
|
||||
# Corsair K95 Platinum #
|
||||
# Corsair K100 #
|
||||
# Corsair Strafe #
|
||||
# Corsair Strafe MK2 #
|
||||
# #
|
||||
# Mice: #
|
||||
# Corsair M65 Pro #
|
||||
# Corsair M65 RGB Elite #
|
||||
# Corsair Glaive RGB #
|
||||
# Corsair Glaive RGB Pro #
|
||||
# Corsair Harpoon RGB #
|
||||
# Corsair Harpoon RGB Pro #
|
||||
# Corsair Scimitar Pro RGB #
|
||||
# Corsair Sabre RGB #
|
||||
# #
|
||||
# Mousemats: #
|
||||
# Corsair MM800 RGB Polaris #
|
||||
# #
|
||||
# Headset Stands: #
|
||||
# Corsair ST100 #
|
||||
#---------------------------------------------------------------#
|
||||
SUBSYSTEMS=="usb", ATTR{idVendor}=="1b1c", ATTR{idProduct}=="1b3d", TAG+="uaccess"
|
||||
SUBSYSTEMS=="usb", ATTR{idVendor}=="1b1c", ATTR{idProduct}=="1b17", TAG+="uaccess"
|
||||
SUBSYSTEMS=="usb", ATTR{idVendor}=="1b1c", ATTR{idProduct}=="1b37", TAG+="uaccess"
|
||||
SUBSYSTEMS=="usb", ATTR{idVendor}=="1b1c", ATTR{idProduct}=="1b39", TAG+="uaccess"
|
||||
SUBSYSTEMS=="usb", ATTR{idVendor}=="1b1c", ATTR{idProduct}=="1b4f", TAG+="uaccess"
|
||||
SUBSYSTEMS=="usb", ATTR{idVendor}=="1b1c", ATTR{idProduct}=="1b13", TAG+="uaccess"
|
||||
SUBSYSTEMS=="usb", ATTR{idVendor}=="1b1c", ATTR{idProduct}=="1b33", TAG+="uaccess"
|
||||
SUBSYSTEMS=="usb", ATTR{idVendor}=="1b1c", ATTR{idProduct}=="1b38", TAG+="uaccess"
|
||||
SUBSYSTEMS=="usb", ATTR{idVendor}=="1b1c", ATTR{idProduct}=="1b49", TAG+="uaccess"
|
||||
SUBSYSTEMS=="usb", ATTR{idVendor}=="1b1c", ATTR{idProduct}=="1b6b", TAG+="uaccess"
|
||||
SUBSYSTEMS=="usb", ATTR{idVendor}=="1b1c", ATTR{idProduct}=="1b55", TAG+="uaccess"
|
||||
SUBSYSTEMS=="usb", ATTR{idVendor}=="1b1c", ATTR{idProduct}=="1b11", TAG+="uaccess"
|
||||
SUBSYSTEMS=="usb", ATTR{idVendor}=="1b1c", ATTR{idProduct}=="1b2d", TAG+="uaccess"
|
||||
SUBSYSTEMS=="usb", ATTR{idVendor}=="1b1c", ATTR{idProduct}=="1b20", TAG+="uaccess"
|
||||
SUBSYSTEMS=="usb", ATTR{idVendor}=="1b1c", ATTR{idProduct}=="1b48", TAG+="uaccess"
|
||||
SUBSYSTEMS=="usb", ATTR{idVendor}=="1b1c", ATTR{idProduct}=="1b7c", TAG+="uaccess"
|
||||
|
||||
SUBSYSTEMS=="usb", ATTR{idVendor}=="1b1c", ATTR{idProduct}=="1b34", TAG+="uaccess"
|
||||
SUBSYSTEMS=="usb", ATTR{idVendor}=="1b1c", ATTR{idProduct}=="1b74", TAG+="uaccess"
|
||||
SUBSYSTEMS=="usb", ATTR{idVendor}=="1b1c", ATTR{idProduct}=="1b3c", TAG+="uaccess"
|
||||
SUBSYSTEMS=="usb", ATTR{idVendor}=="1b1c", ATTR{idProduct}=="1b75", TAG+="uaccess"
|
||||
SUBSYSTEMS=="usb", ATTR{idVendor}=="1b1c", ATTR{idProduct}=="1b5d", TAG+="uaccess", TAG+="Ironclaw"
|
||||
SUBSYSTEMS=="usb", ATTR{idVendor}=="1b1c", ATTR{idProduct}=="1b12", TAG+="uaccess", TAG+="M65"
|
||||
SUBSYSTEMS=="usb", ATTR{idVendor}=="1b1c", ATTR{idProduct}=="1b2e", TAG+="uaccess"
|
||||
SUBSYSTEMS=="usb", ATTR{idVendor}=="1b1c", ATTR{idProduct}=="1b5a", TAG+="uaccess"
|
||||
SUBSYSTEMS=="usb", ATTR{idVendor}=="1b1c", ATTR{idProduct}=="1b3e", TAG+="uaccess"
|
||||
SUBSYSTEMS=="usb", ATTR{idVendor}=="1b1c", ATTR{idProduct}=="1b2f", TAG+="uaccess"
|
||||
|
||||
SUBSYSTEMS=="usb", ATTR{idVendor}=="1b1c", ATTR{idProduct}=="1b3b", TAG+="uaccess"
|
||||
|
||||
SUBSYSTEMS=="usb", ATTR{idVendor}=="1b1c", ATTR{idProduct}=="0a34", TAG+="uaccess"
|
||||
|
||||
#---------------------------------------------------------------#
|
||||
# Corsair Wireless Devices #
|
||||
# #
|
||||
# Keyboards: #
|
||||
# Corsair K57 RGB Wired #
|
||||
# Corsair K57 RGB Wireless #
|
||||
#---------------------------------------------------------------#
|
||||
SUBSYSTEMS=="usb", ATTR{idVendor}=="1b1c", ATTR{idProduct}=="1b6e", TAG+="uaccess"
|
||||
SUBSYSTEMS=="usb", ATTR{idVendor}=="1b1c", ATTR{idProduct}=="1b62", TAG+="uaccess"
|
||||
|
||||
#---------------------------------------------------------------#
|
||||
# Creative Devices #
|
||||
# #
|
||||
# Devices: #
|
||||
# Creative SoundblasterX G6 #
|
||||
#---------------------------------------------------------------#
|
||||
SUBSYSTEMS=="usb", ATTR{idVendor}=="041e", ATTR{idProduct}=="3256", TAG+="uaccess"
|
||||
|
||||
#---------------------------------------------------------------#
|
||||
# Dell G Series Devices #
|
||||
# #
|
||||
# #
|
||||
# Controllers: #
|
||||
# Dell G Series LED Controller #
|
||||
#---------------------------------------------------------------#
|
||||
SUBSYSTEMS=="usb", ATTR{idVendor}=="187c", ATTR{idProduct}=="0550", TAG+="uaccess"
|
||||
|
||||
#---------------------------------------------------------------#
|
||||
# Ducky Keyboard Devices #
|
||||
# #
|
||||
# Keyboards: #
|
||||
# Ducky Shine 7 One 2 RGB #
|
||||
# Ducky One 2 RGB TKL #
|
||||
#---------------------------------------------------------------#
|
||||
SUBSYSTEMS=="usb", ATTR{idVendor}=="04d9", ATTR{idProduct}=="0348", TAG+="uaccess"
|
||||
SUBSYSTEMS=="usb", ATTR{idVendor}=="04d9", ATTR{idProduct}=="0356", TAG+="uaccess"
|
||||
|
||||
#---------------------------------------------------------------#
|
||||
# EK Controller Devices #
|
||||
# #
|
||||
# Controllers: #
|
||||
# EK Loop Connect #
|
||||
#---------------------------------------------------------------#
|
||||
SUBSYSTEMS=="usb", ATTR{idVendor}=="0483", ATTR{idProduct}=="5750", TAG+="uaccess"
|
||||
|
||||
#---------------------------------------------------------------#
|
||||
# Holtek Devices #
|
||||
# #
|
||||
# Mice: #
|
||||
# Holtek A070 #
|
||||
# Mousemats: #
|
||||
# Holtek A1FA #
|
||||
#---------------------------------------------------------------#
|
||||
SUBSYSTEMS=="usb", ATTR{idVendor}=="04d9", ATTR{idProduct}=="a070", TAG+="uaccess"
|
||||
SUBSYSTEMS=="usb", ATTR{idVendor}=="04d9", ATTR{idProduct}=="a1fa", TAG+="uaccess"
|
||||
|
||||
#---------------------------------------------------------------#
|
||||
# HyperX Peripheral Devices #
|
||||
# #
|
||||
# Keyboards: #
|
||||
# HyperX Alloy Elite #
|
||||
# HyperX Alloy Elite 2 #
|
||||
# HyperX Alloy FPS RGB #
|
||||
# HyperX Alloy Origins #
|
||||
# HyperX Alloy Origins Core #
|
||||
# #
|
||||
# Mice: #
|
||||
# HyperX Pulsefire Surge #
|
||||
# HyperX Pulsefire FPS Pro #
|
||||
# HyperX Pulsefire Dart Wireless #
|
||||
# HyperX Pulsefire Dart Wired #
|
||||
# #
|
||||
# Mousemats: #
|
||||
# HyperX Fury Ultra #
|
||||
#---------------------------------------------------------------#
|
||||
SUBSYSTEMS=="usb", ATTR{idVendor}=="0951", ATTR{idProduct}=="16be", TAG+="uaccess"
|
||||
SUBSYSTEMS=="usb", ATTR{idVendor}=="0951", ATTR{idProduct}=="1711", TAG+="uaccess"
|
||||
SUBSYSTEMS=="usb", ATTR{idVendor}=="0951", ATTR{idProduct}=="16dc", TAG+="uaccess"
|
||||
SUBSYSTEMS=="usb", ATTR{idVendor}=="0951", ATTR{idProduct}=="16e5", TAG+="uaccess"
|
||||
SUBSYSTEMS=="usb", ATTR{idVendor}=="0951", ATTR{idProduct}=="16e6", TAG+="uaccess"
|
||||
|
||||
SUBSYSTEMS=="usb", ATTR{idVendor}=="0951", ATTR{idProduct}=="16d3", TAG+="uaccess"
|
||||
SUBSYSTEMS=="usb", ATTR{idVendor}=="0951", ATTR{idProduct}=="16d7", TAG+="uaccess"
|
||||
SUBSYSTEMS=="usb", ATTR{idVendor}=="0951", ATTR{idProduct}=="16e1", TAG+="uaccess"
|
||||
SUBSYSTEMS=="usb", ATTR{idVendor}=="0951", ATTR{idProduct}=="16e2", TAG+="uaccess"
|
||||
|
||||
SUBSYSTEMS=="usb", ATTR{idVendor}=="0951", ATTR{idProduct}=="1705", TAG+="uaccess"
|
||||
|
||||
#---------------------------------------------------------------#
|
||||
# Lian Li Uni Hub #
|
||||
#---------------------------------------------------------------#
|
||||
SUBSYSTEMS=="usb", ATTR{idVendor}=="0cf2", ATTR{idProduct}=="7750", TAG+="uaccess"
|
||||
|
||||
#---------------------------------------------------------------#
|
||||
# Logitech Peripheral Devices #
|
||||
# #
|
||||
# Keyboards: #
|
||||
# Logitech G213 #
|
||||
# Logitech G512 #
|
||||
# Logitech G512 RGB #
|
||||
# Logitech G610 #1 #
|
||||
# Logitech G610 #2 #
|
||||
# Logitech G810 #1 #
|
||||
# Logitech G810 #2 #
|
||||
# Logitech G813 #
|
||||
# Logitech G815 #
|
||||
# Logitech G915 #
|
||||
# Logitech G Pro #
|
||||
# #
|
||||
# Mice: #
|
||||
# Logitech G203 Prodigy #
|
||||
# Logitech G203 Lightsync #
|
||||
# Logitech G303 #
|
||||
# Logitech G403 Prodigy #
|
||||
# Logitech G403 Hero #
|
||||
# Logitech G502 Proteus Spectrum #
|
||||
# Logitech G502 Hero #
|
||||
# Logitech G502 Wireless #
|
||||
# Logitech G703 Wireless #
|
||||
# Logitech G703 Hero Wireless #
|
||||
# Logitech G900 Wireless #
|
||||
# Logitech G903 Wireless #
|
||||
# Logitech G Lightspeed Wireless Gaming Mouse #
|
||||
# Logitech G Pro Wireless Gaming Mouse (Wired) #
|
||||
# Logitech G Pro Hero Gaming Mouse (Wired) #
|
||||
# #
|
||||
# Mousemats: #
|
||||
# Logitech G Powerplay Mousepad with Lightspeed #
|
||||
# #
|
||||
# Speakers: #
|
||||
# Logitech G560 #
|
||||
# #
|
||||
# Headsets: #
|
||||
# Logitech G933 #
|
||||
# #
|
||||
# Joysticks: #
|
||||
# Logitech Rhino X56 Hotas (Throttle and Stick) #
|
||||
# #
|
||||
#---------------------------------------------------------------#
|
||||
SUBSYSTEMS=="usb", ATTR{idVendor}=="046d", ATTR{idProduct}=="c336", TAG+="uaccess", TAG+="G213"
|
||||
SUBSYSTEMS=="usb", ATTR{idVendor}=="046d", ATTR{idProduct}=="c342", TAG+="uaccess", TAG+="G512"
|
||||
SUBSYSTEMS=="usb", ATTR{idVendor}=="046d", ATTR{idProduct}=="c33c", TAG+="uaccess", TAG+="G512_RGB"
|
||||
SUBSYSTEMS=="usb", ATTR{idVendor}=="046d", ATTR{idProduct}=="c333", TAG+="uaccess", TAG+="G610"
|
||||
SUBSYSTEMS=="usb", ATTR{idVendor}=="046d", ATTR{idProduct}=="c338", TAG+="uaccess", TAG+="G610"
|
||||
SUBSYSTEMS=="usb", ATTR{idVendor}=="046d", ATTR{idProduct}=="c331", TAG+="uaccess", TAG+="G810"
|
||||
SUBSYSTEMS=="usb", ATTR{idVendor}=="046d", ATTR{idProduct}=="c337", TAG+="uaccess", TAG+="G810"
|
||||
SUBSYSTEMS=="usb", ATTR{idVendor}=="046d", ATTR{idProduct}=="c339", TAG+="uaccess", TAG+="G_Pro"
|
||||
SUBSYSTEMS=="usb", ATTR{idVendor}=="046d", ATTR{idProduct}=="c232", TAG+="uaccess", TAG+="G813"
|
||||
SUBSYSTEMS=="usb", ATTR{idVendor}=="046d", ATTR{idProduct}=="c33f", TAG+="uaccess", TAG+="G815"
|
||||
SUBSYSTEMS=="usb", ATTR{idVendor}=="046d", ATTR{idProduct}=="c335", TAG+="uaccess", TAG+="G910"
|
||||
SUBSYSTEMS=="usb", ATTR{idVendor}=="046d", ATTR{idProduct}=="c541", TAG+="uaccess", TAG+="G915_Receiver"
|
||||
SUBSYSTEMS=="usb", ATTR{idVendor}=="046d", ATTR{idProduct}=="c33e", TAG+="uaccess", TAG+="G915_Wired"
|
||||
|
||||
SUBSYSTEMS=="usb", ATTR{idVendor}=="046d", ATTR{idProduct}=="c084", TAG+="uaccess"
|
||||
SUBSYSTEMS=="usb", ATTR{idVendor}=="046d", ATTR{idProduct}=="c092", TAG+="uaccess"
|
||||
SUBSYSTEMS=="usb", ATTR{idVendor}=="046d", ATTR{idProduct}=="c083", TAG+="uaccess"
|
||||
SUBSYSTEMS=="usb", ATTR{idVendor}=="046d", ATTR{idProduct}=="c08f", TAG+="uaccess"
|
||||
SUBSYSTEMS=="usb", ATTR{idVendor}=="046d", ATTR{idProduct}=="c082", TAG+="uaccess"
|
||||
SUBSYSTEMS=="usb", ATTR{idVendor}=="046d", ATTR{idProduct}=="405d", TAG+="uaccess"
|
||||
SUBSYSTEMS=="usb", ATTR{idVendor}=="046d", ATTR{idProduct}=="c332", TAG+="uaccess"
|
||||
SUBSYSTEMS=="usb", ATTR{idVendor}=="046d", ATTR{idProduct}=="c08b", TAG+="uaccess"
|
||||
SUBSYSTEMS=="usb", ATTR{idVendor}=="046d", ATTR{idProduct}=="c08d", TAG+="uaccess"
|
||||
SUBSYSTEMS=="usb", ATTR{idVendor}=="046d", ATTR{idProduct}=="407f", TAG+="uaccess"
|
||||
SUBSYSTEMS=="usb", ATTR{idVendor}=="046d", ATTR{idProduct}=="c087", TAG+="uaccess", TAG+="G703"
|
||||
SUBSYSTEMS=="usb", ATTR{idVendor}=="046d", ATTR{idProduct}=="4070", TAG+="uaccess", TAG+="G703_Virtual"
|
||||
SUBSYSTEMS=="usb", ATTR{idVendor}=="046d", ATTR{idProduct}=="c090", TAG+="uaccess", TAG+="G703_Hero"
|
||||
SUBSYSTEMS=="usb", ATTR{idVendor}=="046d", ATTR{idProduct}=="4086", TAG+="uaccess", TAG+="G703_Hero_Virtual"
|
||||
SUBSYSTEMS=="usb", ATTR{idVendor}=="046d", ATTR{idProduct}=="c081", TAG+="uaccess", TAG+="G900_wired"
|
||||
SUBSYSTEMS=="usb", ATTR{idVendor}=="046d", ATTR{idProduct}=="4053", TAG+="uaccess", TAG+="G900_wireless"
|
||||
SUBSYSTEMS=="usb", ATTR{idVendor}=="046d", ATTR{idProduct}=="c086", TAG+="uaccess", TAG+="G903_wired"
|
||||
SUBSYSTEMS=="usb", ATTR{idVendor}=="046d", ATTR{idProduct}=="c091", TAG+="uaccess", TAG+="G903_V2_wired"
|
||||
SUBSYSTEMS=="usb", ATTR{idVendor}=="046d", ATTR{idProduct}=="4067", TAG+="uaccess", TAG+="G903_wireless"
|
||||
SUBSYSTEMS=="usb", ATTR{idVendor}=="046d", ATTR{idProduct}=="4087", TAG+="uaccess", TAG+="G903_V2_wireless"
|
||||
SUBSYSTEMS=="usb", ATTR{idVendor}=="046d", ATTR{idProduct}=="c539", TAG+="uaccess"
|
||||
SUBSYSTEMS=="usb", ATTR{idVendor}=="046d", ATTR{idProduct}=="c085", TAG+="uaccess"
|
||||
SUBSYSTEMS=="usb", ATTR{idVendor}=="046d", ATTR{idProduct}=="c08c", TAG+="uaccess"
|
||||
SUBSYSTEMS=="usb", ATTR{idVendor}=="046d", ATTR{idProduct}=="c088", TAG+="uaccess"
|
||||
SUBSYSTEMS=="usb", ATTR{idVendor}=="046d", ATTR{idProduct}=="4079", TAG+="uaccess"
|
||||
|
||||
SUBSYSTEMS=="usb", ATTR{idVendor}=="046d", ATTR{idProduct}=="c53a", TAG+="uaccess", TAG+="Powerplay_Mat_Reciever"
|
||||
SUBSYSTEMS=="usb", ATTR{idVendor}=="046d", ATTR{idProduct}=="405f", TAG+="uaccess", TAG+="Powerplay_Mat_Virtual"
|
||||
|
||||
SUBSYSTEMS=="usb", ATTR{idVendor}=="046d", ATTR{idProduct}=="0a78", TAG+="uaccess", TAG+="G560"
|
||||
|
||||
SUBSYSTEMS=="usb", ATTR{idVendor}=="046d", ATTR{idProduct}=="0a5b", TAG+="uaccess", TAG+="G933"
|
||||
SUBSYSTEMS=="usb", ATTR{idVendor}=="046d", ATTR{idProduct}=="0ab5", TAG+="uaccess", TAG+="G733"
|
||||
|
||||
SUBSYSTEMS=="usb", ATTR{idVendor}=="0738", ATTR{idProduct}=="2221", TAG+="uaccess"
|
||||
SUBSYSTEMS=="usb", ATTR{idVendor}=="0738", ATTR{idProduct}=="a221", TAG+="uaccess"
|
||||
|
||||
#---------------------------------------------------------------#
|
||||
# Metadot Das Keyboard 4Q + 5Q #
|
||||
#---------------------------------------------------------------#
|
||||
SUBSYSTEMS=="usb", ATTR{idVendor}=="24f0", ATTR{idProduct}=="2037", TAG+="uaccess"
|
||||
SUBSYSTEMS=="usb", ATTR{idVendor}=="24f0", ATTR{idProduct}=="2020", TAG+="uaccess"
|
||||
|
||||
#---------------------------------------------------------------#
|
||||
# MSI Mysticlight #
|
||||
#---------------------------------------------------------------#
|
||||
SUBSYSTEMS=="usb", ATTR{idVendor}=="1462", ATTR{idProduct}=="3ea4", TAG+="uaccess"
|
||||
SUBSYSTEMS=="usb", ATTR{idVendor}=="1462", ATTR{idProduct}=="4459", TAG+="uaccess"
|
||||
SUBSYSTEMS=="usb", ATTR{idVendor}=="1462", ATTR{idProduct}=="1720", TAG+="uaccess"
|
||||
SUBSYSTEMS=="usb", ATTR{idVendor}=="1462", ATTR{idProduct}=="7b10", TAG+="uaccess"
|
||||
SUBSYSTEMS=="usb", ATTR{idVendor}=="1462", ATTR{idProduct}=="7b12", TAG+="uaccess"
|
||||
SUBSYSTEMS=="usb", ATTR{idVendor}=="1462", ATTR{idProduct}=="7b17", TAG+="uaccess"
|
||||
SUBSYSTEMS=="usb", ATTR{idVendor}=="1462", ATTR{idProduct}=="7b85", TAG+="uaccess"
|
||||
SUBSYSTEMS=="usb", ATTR{idVendor}=="1462", ATTR{idProduct}=="7b93", TAG+="uaccess"
|
||||
SUBSYSTEMS=="usb", ATTR{idVendor}=="1462", ATTR{idProduct}=="7b94", TAG+="uaccess"
|
||||
SUBSYSTEMS=="usb", ATTR{idVendor}=="1462", ATTR{idProduct}=="7b96", TAG+="uaccess"
|
||||
SUBSYSTEMS=="usb", ATTR{idVendor}=="1462", ATTR{idProduct}=="7c34", TAG+="uaccess"
|
||||
SUBSYSTEMS=="usb", ATTR{idVendor}=="1462", ATTR{idProduct}=="7c35", TAG+="uaccess"
|
||||
SUBSYSTEMS=="usb", ATTR{idVendor}=="1462", ATTR{idProduct}=="7c36", TAG+="uaccess"
|
||||
SUBSYSTEMS=="usb", ATTR{idVendor}=="1462", ATTR{idProduct}=="7c37", TAG+="uaccess"
|
||||
SUBSYSTEMS=="usb", ATTR{idVendor}=="1462", ATTR{idProduct}=="7c42", TAG+="uaccess"
|
||||
SUBSYSTEMS=="usb", ATTR{idVendor}=="1462", ATTR{idProduct}=="7c56", TAG+="uaccess"
|
||||
SUBSYSTEMS=="usb", ATTR{idVendor}=="1462", ATTR{idProduct}=="7c59", TAG+="uaccess"
|
||||
SUBSYSTEMS=="usb", ATTR{idVendor}=="1462", ATTR{idProduct}=="7c60", TAG+="uaccess"
|
||||
SUBSYSTEMS=="usb", ATTR{idVendor}=="1462", ATTR{idProduct}=="7c67", TAG+="uaccess"
|
||||
SUBSYSTEMS=="usb", ATTR{idVendor}=="1462", ATTR{idProduct}=="7c70", TAG+="uaccess"
|
||||
SUBSYSTEMS=="usb", ATTR{idVendor}=="1462", ATTR{idProduct}=="7c71", TAG+="uaccess"
|
||||
SUBSYSTEMS=="usb", ATTR{idVendor}=="1462", ATTR{idProduct}=="7c73", TAG+="uaccess"
|
||||
SUBSYSTEMS=="usb", ATTR{idVendor}=="1462", ATTR{idProduct}=="7c75", TAG+="uaccess"
|
||||
SUBSYSTEMS=="usb", ATTR{idVendor}=="1462", ATTR{idProduct}=="7c76", TAG+="uaccess"
|
||||
SUBSYSTEMS=="usb", ATTR{idVendor}=="1462", ATTR{idProduct}=="7c77", TAG+="uaccess"
|
||||
SUBSYSTEMS=="usb", ATTR{idVendor}=="1462", ATTR{idProduct}=="7c79", TAG+="uaccess"
|
||||
SUBSYSTEMS=="usb", ATTR{idVendor}=="1462", ATTR{idProduct}=="7c80", TAG+="uaccess"
|
||||
SUBSYSTEMS=="usb", ATTR{idVendor}=="1462", ATTR{idProduct}=="7c81", TAG+="uaccess"
|
||||
SUBSYSTEMS=="usb", ATTR{idVendor}=="1462", ATTR{idProduct}=="7c82", TAG+="uaccess"
|
||||
SUBSYSTEMS=="usb", ATTR{idVendor}=="1462", ATTR{idProduct}=="7c83", TAG+="uaccess"
|
||||
SUBSYSTEMS=="usb", ATTR{idVendor}=="1462", ATTR{idProduct}=="7c84", TAG+="uaccess"
|
||||
SUBSYSTEMS=="usb", ATTR{idVendor}=="1462", ATTR{idProduct}=="7c85", TAG+="uaccess"
|
||||
SUBSYSTEMS=="usb", ATTR{idVendor}=="1462", ATTR{idProduct}=="7c86", TAG+="uaccess"
|
||||
SUBSYSTEMS=="usb", ATTR{idVendor}=="1462", ATTR{idProduct}=="7c87", TAG+="uaccess"
|
||||
SUBSYSTEMS=="usb", ATTR{idVendor}=="1462", ATTR{idProduct}=="7c88", TAG+="uaccess"
|
||||
SUBSYSTEMS=="usb", ATTR{idVendor}=="1462", ATTR{idProduct}=="7c89", TAG+="uaccess"
|
||||
SUBSYSTEMS=="usb", ATTR{idVendor}=="1462", ATTR{idProduct}=="7c90", TAG+="uaccess"
|
||||
SUBSYSTEMS=="usb", ATTR{idVendor}=="1462", ATTR{idProduct}=="7c91", TAG+="uaccess"
|
||||
SUBSYSTEMS=="usb", ATTR{idVendor}=="1462", ATTR{idProduct}=="7c92", TAG+="uaccess"
|
||||
SUBSYSTEMS=="usb", ATTR{idVendor}=="1462", ATTR{idProduct}=="7c94", TAG+="uaccess"
|
||||
SUBSYSTEMS=="usb", ATTR{idVendor}=="1462", ATTR{idProduct}=="7c95", TAG+="uaccess"
|
||||
SUBSYSTEMS=="usb", ATTR{idVendor}=="1462", ATTR{idProduct}=="7c96", TAG+="uaccess"
|
||||
SUBSYSTEMS=="usb", ATTR{idVendor}=="1462", ATTR{idProduct}=="7c98", TAG+="uaccess"
|
||||
SUBSYSTEMS=="usb", ATTR{idVendor}=="1462", ATTR{idProduct}=="7c99", TAG+="uaccess"
|
||||
SUBSYSTEMS=="usb", ATTR{idVendor}=="1462", ATTR{idProduct}=="7d06", TAG+="uaccess"
|
||||
SUBSYSTEMS=="usb", ATTR{idVendor}=="1462", ATTR{idProduct}=="7d07", TAG+="uaccess", TAG+="MPG_Z590_GAMING_EDGE_WIFI"
|
||||
SUBSYSTEMS=="usb", ATTR{idVendor}=="1462", ATTR{idProduct}=="7d09", TAG+="uaccess"
|
||||
SUBSYSTEMS=="usb", ATTR{idVendor}=="1462", ATTR{idProduct}=="905d", TAG+="uaccess"
|
||||
|
||||
#---------------------------------------------------------------#
|
||||
# MSI/SteelSeries 3-Zone Laptop Keyboard #
|
||||
#---------------------------------------------------------------#
|
||||
SUBSYSTEMS=="usb", ATTR{idVendor}=="1770", ATTR{idProduct}=="ff00", TAG+="uaccess"
|
||||
|
||||
#---------------------------------------------------------------#
|
||||
# NZXT Hue+ #
|
||||
#---------------------------------------------------------------#
|
||||
KERNEL=="ttyACM[0-9]*", ATTR{idVendor}=="04d8", ATTR{idProduct}=="00df", TAG+="uaccess"
|
||||
|
||||
#---------------------------------------------------------------#
|
||||
# NZXT Hue 2 Devices #
|
||||
# #
|
||||
# NZXT Hue 2 #
|
||||
# NZXT Hue 2 Ambient #
|
||||
# NZXT Motherboard #
|
||||
# NZXT Smart Device V2 #
|
||||
# NZXT Kraken X3 #
|
||||
# NZXT RGB Fan Controller #
|
||||
#---------------------------------------------------------------#
|
||||
SUBSYSTEMS=="usb", ATTR{idVendor}=="1e71", ATTR{idProduct}=="2001", TAG+="uaccess"
|
||||
SUBSYSTEMS=="usb", ATTR{idVendor}=="1e71", ATTR{idProduct}=="2002", TAG+="uaccess"
|
||||
SUBSYSTEMS=="usb", ATTR{idVendor}=="1e71", ATTR{idProduct}=="2005", TAG+="uaccess"
|
||||
SUBSYSTEMS=="usb", ATTR{idVendor}=="1e71", ATTR{idProduct}=="2006", TAG+="uaccess"
|
||||
SUBSYSTEMS=="usb", ATTR{idVendor}=="1e71", ATTR{idProduct}=="2007", TAG+="uaccess"
|
||||
SUBSYSTEMS=="usb", ATTR{idVendor}=="1e71", ATTR{idProduct}=="2009", TAG+="uaccess"
|
||||
SUBSYSTEMS=="usb", ATTR{idVendor}=="1e71", ATTR{idProduct}=="200d", TAG+="uaccess"
|
||||
|
||||
#---------------------------------------------------------------#
|
||||
# NZXT Kraken #
|
||||
#---------------------------------------------------------------#
|
||||
SUBSYSTEMS=="usb", ATTR{idVendor}=="1e71", ATTR{idProduct}=="170e", TAG+="uaccess"
|
||||
SUBSYSTEMS=="usb", ATTR{idVendor}=="1e71", ATTR{idProduct}=="1715", TAG+="uaccess"
|
||||
|
||||
#---------------------------------------------------------------#
|
||||
# Razer Devices #
|
||||
#---------------------------------------------------------------#
|
||||
SUBSYSTEMS=="usb", ATTR{idVendor}=="1532", ATTR{idProduct}=="0241", TAG+="uaccess", TAG+="Blackwidow_2019"
|
||||
SUBSYSTEMS=="usb", ATTR{idVendor}=="1532", ATTR{idProduct}=="0203", TAG+="uaccess", TAG+="Blackwidow_Chroma"
|
||||
SUBSYSTEMS=="usb", ATTR{idVendor}=="1532", ATTR{idProduct}=="0209", TAG+="uaccess", TAG+="Blackwidow_Chroma_TE"
|
||||
SUBSYSTEMS=="usb", ATTR{idVendor}=="1532", ATTR{idProduct}=="0221", TAG+="uaccess", TAG+="Blackwidow_Chroma_V2"
|
||||
SUBSYSTEMS=="usb", ATTR{idVendor}=="1532", ATTR{idProduct}=="0228", TAG+="uaccess", TAG+="Blackwidow_Elite"
|
||||
SUBSYSTEMS=="usb", ATTR{idVendor}=="1532", ATTR{idProduct}=="0237", TAG+="uaccess", TAG+="Blackwidow_Essential"
|
||||
SUBSYSTEMS=="usb", ATTR{idVendor}=="1532", ATTR{idProduct}=="0235", TAG+="uaccess", TAG+="Blackwidow_Lite"
|
||||
SUBSYSTEMS=="usb", ATTR{idVendor}=="1532", ATTR{idProduct}=="0211", TAG+="uaccess", TAG+="Blackwidow_Overwatch"
|
||||
SUBSYSTEMS=="usb", ATTR{idVendor}=="1532", ATTR{idProduct}=="025a", TAG+="uaccess", TAG+="Blackwidow_V3_Pro-Wired"
|
||||
SUBSYSTEMS=="usb", ATTR{idVendor}=="1532", ATTR{idProduct}=="025b", TAG+="uaccess", TAG+="Blackwidow_V3_Pro-Bluetooth"
|
||||
SUBSYSTEMS=="usb", ATTR{idVendor}=="1532", ATTR{idProduct}=="025c", TAG+="uaccess", TAG+="Blackwidow_V3_Pro-Wireless"
|
||||
SUBSYSTEMS=="usb", ATTR{idVendor}=="1532", ATTR{idProduct}=="0a24", TAG+="uaccess", TAG+="Blackwidow_V3_TKL"
|
||||
SUBSYSTEMS=="usb", ATTR{idVendor}=="1532", ATTR{idProduct}=="0258", TAG+="uaccess", TAG+="Blackwidow_V3_Mini-Wired"
|
||||
SUBSYSTEMS=="usb", ATTR{idVendor}=="1532", ATTR{idProduct}=="0271", TAG+="uaccess", TAG+="Blackwidow_V3_Mini-Wireless"
|
||||
SUBSYSTEMS=="usb", ATTR{idVendor}=="1532", ATTR{idProduct}=="0216", TAG+="uaccess", TAG+="Blackwidow_X Chroma"
|
||||
SUBSYSTEMS=="usb", ATTR{idVendor}=="1532", ATTR{idProduct}=="021a", TAG+="uaccess", TAG+="Blackwidow_X_Chroma_TE"
|
||||
SUBSYSTEMS=="usb", ATTR{idVendor}=="1532", ATTR{idProduct}=="020f", TAG+="uaccess"
|
||||
SUBSYSTEMS=="usb", ATTR{idVendor}=="1532", ATTR{idProduct}=="0224", TAG+="uaccess"
|
||||
SUBSYSTEMS=="usb", ATTR{idVendor}=="1532", ATTR{idProduct}=="0233", TAG+="uaccess"
|
||||
SUBSYSTEMS=="usb", ATTR{idVendor}=="1532", ATTR{idProduct}=="023b", TAG+="uaccess"
|
||||
SUBSYSTEMS=="usb", ATTR{idVendor}=="1532", ATTR{idProduct}=="0240", TAG+="uaccess"
|
||||
SUBSYSTEMS=="usb", ATTR{idVendor}=="1532", ATTR{idProduct}=="023a", TAG+="uaccess"
|
||||
SUBSYSTEMS=="usb", ATTR{idVendor}=="1532", ATTR{idProduct}=="0246", TAG+="uaccess"
|
||||
SUBSYSTEMS=="usb", ATTR{idVendor}=="1532", ATTR{idProduct}=="0245", TAG+="uaccess"
|
||||
SUBSYSTEMS=="usb", ATTR{idVendor}=="1532", ATTR{idProduct}=="024d", TAG+="uaccess"
|
||||
SUBSYSTEMS=="usb", ATTR{idVendor}=="1532", ATTR{idProduct}=="0253", TAG+="uaccess"
|
||||
SUBSYSTEMS=="usb", ATTR{idVendor}=="1532", ATTR{idProduct}=="0255", TAG+="uaccess"
|
||||
SUBSYSTEMS=="usb", ATTR{idVendor}=="1532", ATTR{idProduct}=="026a", TAG+="uaccess", TAG+="Razer_Book_13-2020"
|
||||
SUBSYSTEMS=="usb", ATTR{idVendor}=="1532", ATTR{idProduct}=="026f", TAG+="uaccess"
|
||||
SUBSYSTEMS=="usb", ATTR{idVendor}=="1532", ATTR{idProduct}=="0210", TAG+="uaccess"
|
||||
SUBSYSTEMS=="usb", ATTR{idVendor}=="1532", ATTR{idProduct}=="0225", TAG+="uaccess"
|
||||
SUBSYSTEMS=="usb", ATTR{idVendor}=="1532", ATTR{idProduct}=="022f", TAG+="uaccess"
|
||||
SUBSYSTEMS=="usb", ATTR{idVendor}=="1532", ATTR{idProduct}=="0234", TAG+="uaccess"
|
||||
SUBSYSTEMS=="usb", ATTR{idVendor}=="1532", ATTR{idProduct}=="024c", TAG+="uaccess"
|
||||
SUBSYSTEMS=="usb", ATTR{idVendor}=="1532", ATTR{idProduct}=="0205", TAG+="uaccess"
|
||||
SUBSYSTEMS=="usb", ATTR{idVendor}=="1532", ATTR{idProduct}=="0220", TAG+="uaccess"
|
||||
SUBSYSTEMS=="usb", ATTR{idVendor}=="1532", ATTR{idProduct}=="022d", TAG+="uaccess"
|
||||
SUBSYSTEMS=="usb", ATTR{idVendor}=="1532", ATTR{idProduct}=="0232", TAG+="uaccess"
|
||||
SUBSYSTEMS=="usb", ATTR{idVendor}=="1532", ATTR{idProduct}=="0239", TAG+="uaccess"
|
||||
SUBSYSTEMS=="usb", ATTR{idVendor}=="1532", ATTR{idProduct}=="024a", TAG+="uaccess"
|
||||
SUBSYSTEMS=="usb", ATTR{idVendor}=="1532", ATTR{idProduct}=="0252", TAG+="uaccess"
|
||||
SUBSYSTEMS=="usb", ATTR{idVendor}=="1532", ATTR{idProduct}=="0259", TAG+="uaccess"
|
||||
SUBSYSTEMS=="usb", ATTR{idVendor}=="1532", ATTR{idProduct}=="022a", TAG+="uaccess"
|
||||
SUBSYSTEMS=="usb", ATTR{idVendor}=="1532", ATTR{idProduct}=="023f", TAG+="uaccess"
|
||||
SUBSYSTEMS=="usb", ATTR{idVendor}=="1532", ATTR{idProduct}=="025e", TAG+="uaccess", TAG+="Cynosa_Chroma_V2"
|
||||
SUBSYSTEMS=="usb", ATTR{idVendor}=="1532", ATTR{idProduct}=="0204", TAG+="uaccess"
|
||||
SUBSYSTEMS=="usb", ATTR{idVendor}=="1532", ATTR{idProduct}=="0226", TAG+="uaccess"
|
||||
SUBSYSTEMS=="usb", ATTR{idVendor}=="1532", ATTR{idProduct}=="0227", TAG+="uaccess"
|
||||
SUBSYSTEMS=="usb", ATTR{idVendor}=="1532", ATTR{idProduct}=="0257", TAG+="uaccess", TAG+="Huntsman_Mini"
|
||||
SUBSYSTEMS=="usb", ATTR{idVendor}=="1532", ATTR{idProduct}=="0243", TAG+="uaccess"
|
||||
SUBSYSTEMS=="usb", ATTR{idVendor}=="1532", ATTR{idProduct}=="026B", TAG+="uaccess", TAG+="Huntsman_V2_TKL"
|
||||
SUBSYSTEMS=="usb", ATTR{idVendor}=="1532", ATTR{idProduct}=="0207", TAG+="uaccess"
|
||||
SUBSYSTEMS=="usb", ATTR{idVendor}=="1532", ATTR{idProduct}=="0266", TAG+="uaccess", TAG+="Huntsman V2 Analog"
|
||||
SUBSYSTEMS=="usb", ATTR{idVendor}=="1532", ATTR{idProduct}=="021e", TAG+="uaccess"
|
||||
SUBSYSTEMS=="usb", ATTR{idVendor}=="1532", ATTR{idProduct}=="025d", TAG+="uaccess"
|
||||
SUBSYSTEMS=="usb", ATTR{idVendor}=="1532", ATTR{idProduct}=="0208", TAG+="uaccess"
|
||||
SUBSYSTEMS=="usb", ATTR{idVendor}=="1532", ATTR{idProduct}=="022b", TAG+="uaccess"
|
||||
|
||||
SUBSYSTEMS=="usb", ATTR{idVendor}=="1532", ATTR{idProduct}=="0020", TAG+="uaccess"
|
||||
SUBSYSTEMS=="usb", ATTR{idVendor}=="1532", ATTR{idProduct}=="005e", TAG+="uaccess"
|
||||
SUBSYSTEMS=="usb", ATTR{idVendor}=="1532", ATTR{idProduct}=="006a", TAG+="uaccess"
|
||||
SUBSYSTEMS=="usb", ATTR{idVendor}=="1532", ATTR{idProduct}=="006b", TAG+="uaccess"
|
||||
SUBSYSTEMS=="usb", ATTR{idVendor}=="1532", ATTR{idProduct}=="0042", TAG+="uaccess"
|
||||
SUBSYSTEMS=="usb", ATTR{idVendor}=="1532", ATTR{idProduct}=="005b", TAG+="uaccess"
|
||||
SUBSYSTEMS=="usb", ATTR{idVendor}=="1532", ATTR{idProduct}=="0062", TAG+="uaccess"
|
||||
SUBSYSTEMS=="usb", ATTR{idVendor}=="1532", ATTR{idProduct}=="0064", TAG+="uaccess"
|
||||
SUBSYSTEMS=="usb", ATTR{idVendor}=="1532", ATTR{idProduct}=="0065", TAG+="uaccess"
|
||||
SUBSYSTEMS=="usb", ATTR{idVendor}=="1532", ATTR{idProduct}=="0086", TAG+="uaccess", TAG+="Basilisk_Ultimate"
|
||||
SUBSYSTEMS=="usb", ATTR{idVendor}=="1532", ATTR{idProduct}=="0088", TAG+="uaccess", TAG+="Basilisk_Ultimate-Wireless"
|
||||
SUBSYSTEMS=="usb", ATTR{idVendor}=="1532", ATTR{idProduct}=="0083", TAG+="uaccess"
|
||||
SUBSYSTEMS=="usb", ATTR{idVendor}=="1532", ATTR{idProduct}=="0085", TAG+="uaccess", TAG+="Basilisk_V2"
|
||||
SUBSYSTEMS=="usb", ATTR{idVendor}=="1532", ATTR{idProduct}=="0038", TAG+="uaccess"
|
||||
SUBSYSTEMS=="usb", ATTR{idVendor}=="1532", ATTR{idProduct}=="004f", TAG+="uaccess"
|
||||
SUBSYSTEMS=="usb", ATTR{idVendor}=="1532", ATTR{idProduct}=="0037", TAG+="uaccess"
|
||||
SUBSYSTEMS=="usb", ATTR{idVendor}=="1532", ATTR{idProduct}=="0016", TAG+="uaccess"
|
||||
SUBSYSTEMS=="usb", ATTR{idVendor}=="1532", ATTR{idProduct}=="0054", TAG+="uaccess"
|
||||
SUBSYSTEMS=="usb", ATTR{idVendor}=="1532", ATTR{idProduct}=="0043", TAG+="uaccess"
|
||||
SUBSYSTEMS=="usb", ATTR{idVendor}=="1532", ATTR{idProduct}=="005c", TAG+="uaccess"
|
||||
SUBSYSTEMS=="usb", ATTR{idVendor}=="1532", ATTR{idProduct}=="006e", TAG+="uaccess"
|
||||
SUBSYSTEMS=="usb", ATTR{idVendor}=="1532", ATTR{idProduct}=="0071", TAG+="uaccess"
|
||||
SUBSYSTEMS=="usb", ATTR{idVendor}=="1532", ATTR{idProduct}=="008c", TAG+="uaccess"
|
||||
SUBSYSTEMS=="usb", ATTR{idVendor}=="1532", ATTR{idProduct}=="0084", TAG+="uaccess"
|
||||
SUBSYSTEMS=="usb", ATTR{idVendor}=="1532", ATTR{idProduct}=="007c", TAG+="uaccess"
|
||||
SUBSYSTEMS=="usb", ATTR{idVendor}=="1532", ATTR{idProduct}=="007d", TAG+="uaccess"
|
||||
SUBSYSTEMS=="usb", ATTR{idVendor}=="1532", ATTR{idProduct}=="004c", TAG+="uaccess"
|
||||
SUBSYSTEMS=="usb", ATTR{idVendor}=="1532", ATTR{idProduct}=="002f", TAG+="uaccess"
|
||||
SUBSYSTEMS=="usb", ATTR{idVendor}=="1532", ATTR{idProduct}=="0060", TAG+="uaccess"
|
||||
SUBSYSTEMS=="usb", ATTR{idVendor}=="1532", ATTR{idProduct}=="0059", TAG+="uaccess"
|
||||
SUBSYSTEMS=="usb", ATTR{idVendor}=="1532", ATTR{idProduct}=="005a", TAG+="uaccess"
|
||||
SUBSYSTEMS=="usb", ATTR{idVendor}=="1532", ATTR{idProduct}=="0070", TAG+="uaccess"
|
||||
SUBSYSTEMS=="usb", ATTR{idVendor}=="1532", ATTR{idProduct}=="006f", TAG+="uaccess"
|
||||
SUBSYSTEMS=="usb", ATTR{idVendor}=="1532", ATTR{idProduct}=="0024", TAG+="uaccess"
|
||||
SUBSYSTEMS=="usb", ATTR{idVendor}=="1532", ATTR{idProduct}=="0025", TAG+="uaccess"
|
||||
SUBSYSTEMS=="usb", ATTR{idVendor}=="1532", ATTR{idProduct}=="0044", TAG+="uaccess"
|
||||
SUBSYSTEMS=="usb", ATTR{idVendor}=="1532", ATTR{idProduct}=="0045", TAG+="uaccess"
|
||||
SUBSYSTEMS=="usb", ATTR{idVendor}=="1532", ATTR{idProduct}=="0073", TAG+="uaccess"
|
||||
SUBSYSTEMS=="usb", ATTR{idVendor}=="1532", ATTR{idProduct}=="0072", TAG+="uaccess"
|
||||
SUBSYSTEMS=="usb", ATTR{idVendor}=="1532", ATTR{idProduct}=="006c", TAG+="uaccess"
|
||||
SUBSYSTEMS=="usb", ATTR{idVendor}=="1532", ATTR{idProduct}=="0046", TAG+="uaccess"
|
||||
SUBSYSTEMS=="usb", ATTR{idVendor}=="1532", ATTR{idProduct}=="002e", TAG+="uaccess"
|
||||
SUBSYSTEMS=="usb", ATTR{idVendor}=="1532", ATTR{idProduct}=="0040", TAG+="uaccess"
|
||||
SUBSYSTEMS=="usb", ATTR{idVendor}=="1532", ATTR{idProduct}=="0053", TAG+="uaccess"
|
||||
SUBSYSTEMS=="usb", ATTR{idVendor}=="1532", ATTR{idProduct}=="003f", TAG+="uaccess"
|
||||
SUBSYSTEMS=="usb", ATTR{idVendor}=="1532", ATTR{idProduct}=="003e", TAG+="uaccess"
|
||||
SUBSYSTEMS=="usb", ATTR{idVendor}=="1532", ATTR{idProduct}=="0041", TAG+="uaccess"
|
||||
SUBSYSTEMS=="usb", ATTR{idVendor}=="1532", ATTR{idProduct}=="0036", TAG+="uaccess"
|
||||
SUBSYSTEMS=="usb", ATTR{idVendor}=="1532", ATTR{idProduct}=="0050", TAG+="uaccess", TAG+="Naga_Hex_V2"
|
||||
SUBSYSTEMS=="usb", ATTR{idVendor}=="1532", ATTR{idProduct}=="008d", TAG+="uaccess", TAG+="Naga_Left_Handed"
|
||||
SUBSYSTEMS=="usb", ATTR{idVendor}=="1532", ATTR{idProduct}=="0067", TAG+="uaccess", TAG+="Naga_Trinity"
|
||||
SUBSYSTEMS=="usb", ATTR{idVendor}=="1532", ATTR{idProduct}=="0013", TAG+="uaccess"
|
||||
SUBSYSTEMS=="usb", ATTR{idVendor}=="1532", ATTR{idProduct}=="0039", TAG+="uaccess"
|
||||
SUBSYSTEMS=="usb", ATTR{idVendor}=="1532", ATTR{idProduct}=="0048", TAG+="uaccess"
|
||||
SUBSYSTEMS=="usb", ATTR{idVendor}=="1532", ATTR{idProduct}=="0032", TAG+="uaccess"
|
||||
SUBSYSTEMS=="usb", ATTR{idVendor}=="1532", ATTR{idProduct}=="0034", TAG+="uaccess"
|
||||
SUBSYSTEMS=="usb", ATTR{idVendor}=="1532", ATTR{idProduct}=="008a", TAG+="uaccess"
|
||||
SUBSYSTEMS=="usb", ATTR{idVendor}=="1532", ATTR{idProduct}=="0078", TAG+="uaccess"
|
||||
SUBSYSTEMS=="usb", ATTR{idVendor}=="1532", ATTR{idProduct}=="007a", TAG+="uaccess"
|
||||
SUBSYSTEMS=="usb", ATTR{idVendor}=="1532", ATTR{idProduct}=="007b", TAG+="uaccess"
|
||||
|
||||
SUBSYSTEMS=="usb", ATTR{idVendor}=="1532", ATTR{idProduct}=="0506", TAG+="uaccess"
|
||||
SUBSYSTEMS=="usb", ATTR{idVendor}=="1532", ATTR{idProduct}=="0501", TAG+="uaccess"
|
||||
SUBSYSTEMS=="usb", ATTR{idVendor}=="1532", ATTR{idProduct}=="0f19", TAG+="uaccess"
|
||||
SUBSYSTEMS=="usb", ATTR{idVendor}=="1532", ATTR{idProduct}=="0504", TAG+="uaccess"
|
||||
SUBSYSTEMS=="usb", ATTR{idVendor}=="1532", ATTR{idProduct}=="0527", TAG+="uaccess"
|
||||
SUBSYSTEMS=="usb", ATTR{idVendor}=="1532", ATTR{idProduct}=="0510", TAG+="uaccess"
|
||||
SUBSYSTEMS=="usb", ATTR{idVendor}=="1532", ATTR{idProduct}=="0f03", TAG+="uaccess"
|
||||
|
||||
SUBSYSTEMS=="usb", ATTR{idVendor}=="1532", ATTR{idProduct}=="0f08", TAG+="uaccess"
|
||||
SUBSYSTEMS=="usb", ATTR{idVendor}=="1532", ATTR{idProduct}=="0f20", TAG+="uaccess"
|
||||
SUBSYSTEMS=="usb", ATTR{idVendor}=="1532", ATTR{idProduct}=="0f26", TAG+="uaccess"
|
||||
SUBSYSTEMS=="usb", ATTR{idVendor}=="1532", ATTR{idProduct}=="0f1f", TAG+="uaccess"
|
||||
SUBSYSTEMS=="usb", ATTR{idVendor}=="1532", ATTR{idProduct}=="0f09", TAG+="uaccess"
|
||||
SUBSYSTEMS=="usb", ATTR{idVendor}=="1532", ATTR{idProduct}=="0f07", TAG+="uaccess"
|
||||
SUBSYSTEMS=="usb", ATTR{idVendor}=="1532", ATTR{idProduct}=="0f0e", TAG+="uaccess"
|
||||
SUBSYSTEMS=="usb", ATTR{idVendor}=="1532", ATTR{idProduct}=="0215", TAG+="uaccess"
|
||||
SUBSYSTEMS=="usb", ATTR{idVendor}=="1532", ATTR{idProduct}=="0068", TAG+="uaccess"
|
||||
SUBSYSTEMS=="usb", ATTR{idVendor}=="1532", ATTR{idProduct}=="0c00", TAG+="uaccess"
|
||||
SUBSYSTEMS=="usb", ATTR{idVendor}=="1532", ATTR{idProduct}=="0c04", TAG+="uaccess"
|
||||
SUBSYSTEMS=="usb", ATTR{idVendor}=="1532", ATTR{idProduct}=="0c02", TAG+="uaccess"
|
||||
SUBSYSTEMS=="usb", ATTR{idVendor}=="1532", ATTR{idProduct}=="0c01", TAG+="uaccess"
|
||||
SUBSYSTEMS=="usb", ATTR{idVendor}=="1532", ATTR{idProduct}=="0f1d", TAG+="uaccess"
|
||||
SUBSYSTEMS=="usb", ATTR{idVendor}=="1532", ATTR{idProduct}=="007e", TAG+="uaccess", TAG+="Razer_Mouse_Dock_Chroma"
|
||||
SUBSYSTEMS=="usb", ATTR{idVendor}=="1532", ATTR{idProduct}=="0517", TAG+="uaccess"
|
||||
SUBSYSTEMS=="usb", ATTR{idVendor}=="1532", ATTR{idProduct}=="0518", TAG+="uaccess"
|
||||
SUBSYSTEMS=="usb", ATTR{idVendor}=="1532", ATTR{idProduct}=="0f13", TAG+="uaccess", TAG+="O11_Dynamic_Razer_Ed"
|
||||
SUBSYSTEMS=="usb", ATTR{idVendor}=="1532", ATTR{idProduct}=="0f1b", TAG+="uaccess", TAG+="Razer_Seiren_Emote"
|
||||
|
||||
#---------------------------------------------------------------#
|
||||
# Roccat Devices #
|
||||
#---------------------------------------------------------------#
|
||||
SUBSYSTEMS=="usb", ATTR{idVendor}=="1e7d", ATTR{idProduct}=="2e27", TAG+="uaccess", TAG+="Roccat_Kone_Aimo"
|
||||
SUBSYSTEMS=="usb", ATTR{idVendor}=="1e7d", ATTR{idProduct}=="2e2c", TAG+="uaccess", TAG+="Roccat_Kone_Aimo_16K"
|
||||
SUBSYSTEMS=="usb", ATTR{idVendor}=="1e7d", ATTR{idProduct}=="3098", TAG+="uaccess", TAG+="Roccat_Vulcan_120_Aimo"
|
||||
|
||||
#---------------------------------------------------------------#
|
||||
# Redragon Peripheral Devices #
|
||||
# #
|
||||
# Keyboards: #
|
||||
# Redragon K550 Yama #
|
||||
# Redragon K552 Kumara #
|
||||
# Redragon K556 Devarajas #
|
||||
# Tecware Phantom Elite #
|
||||
# #
|
||||
# Mice: #
|
||||
# Redragon M711 Cobra #
|
||||
# Redragon M715 Dagger #
|
||||
# Redragon M716 Inquisitor #
|
||||
#---------------------------------------------------------------#
|
||||
SUBSYSTEMS=="usb", ATTR{idVendor}=="0c45", ATTR{idProduct}=="5204", TAG+="uaccess"
|
||||
SUBSYSTEMS=="usb", ATTR{idVendor}=="0c45", ATTR{idProduct}=="5104", TAG+="uaccess"
|
||||
SUBSYSTEMS=="usb", ATTR{idVendor}=="0c45", ATTR{idProduct}=="5004", TAG+="uaccess"
|
||||
SUBSYSTEMS=="usb", ATTR{idVendor}=="0c45", ATTR{idProduct}=="652f", TAG+="uaccess"
|
||||
|
||||
SUBSYSTEMS=="usb", ATTR{idVendor}=="04d9", ATTR{idProduct}=="fc30", TAG+="uaccess"
|
||||
SUBSYSTEMS=="usb", ATTR{idVendor}=="04d9", ATTR{idProduct}=="fc39", TAG+="uaccess"
|
||||
SUBSYSTEMS=="usb", ATTR{idVendor}=="04d9", ATTR{idProduct}=="fc3a", TAG+="uaccess"
|
||||
SUBSYSTEMS=="usb", ATTR{idVendor}=="04d9", ATTR{idProduct}=="fc4d", TAG+="uaccess"
|
||||
|
||||
#---------------------------------------------------------------#
|
||||
# Gigabyte/Aorus RGB Fusion 2 USB #
|
||||
#---------------------------------------------------------------#
|
||||
SUBSYSTEMS=="usb", ATTR{idVendor}=="048d", ATTR{idProduct}=="8297", TAG+="uaccess"
|
||||
SUBSYSTEMS=="usb", ATTR{idVendor}=="048d", ATTR{idProduct}=="5702", TAG+="uaccess"
|
||||
|
||||
#---------------------------------------------------------------#
|
||||
# Sinowealth USB #
|
||||
# Glorious Model O / O- #
|
||||
# Glorious Model D / D- #
|
||||
# Everest GT-100 RGB #
|
||||
#---------------------------------------------------------------#
|
||||
SUBSYSTEMS=="usb", ATTR{idVendor}=="258a", ATTR{idProduct}=="0036", TAG+="uaccess"
|
||||
SUBSYSTEMS=="usb", ATTR{idVendor}=="258a", ATTR{idProduct}=="0033", TAG+="uaccess"
|
||||
SUBSYSTEMS=="usb", ATTR{idVendor}=="258a", ATTR{idProduct}=="0029", TAG+="uaccess"
|
||||
|
||||
#---------------------------------------------------------------#
|
||||
# Sony Devices #
|
||||
#---------------------------------------------------------------#
|
||||
SUBSYSTEMS=="usb", ATTR{idVendor}=="054c", ATTR{idProduct}=="05c4", TAG+="uaccess"
|
||||
SUBSYSTEMS=="usb", ATTR{idVendor}=="054c", ATTR{idProduct}=="09cc", TAG+="uaccess"
|
||||
SUBSYSTEMS=="usb", ATTR{idVendor}=="054c", ATTR{idProduct}=="0ba0", TAG+="uaccess"
|
||||
|
||||
#---------------------------------------------------------------#
|
||||
# SteelSeries Peripheral Devices #
|
||||
# #
|
||||
# Mice: #
|
||||
# SteelSeries Rival 100 #
|
||||
# SteelSeries Rival 100 DotA 2 Edition #
|
||||
# SteelSeries Rival 105 #
|
||||
# SteelSeries Rival 110 #
|
||||
# SteelSeries Rival 300 #
|
||||
# Acer Predator Gaming Mouse (Rival 300) #
|
||||
# SteelSeries Rival 300 CS:GO Fade Edition #
|
||||
# SteelSeries Rival 300 CS:GO Fade Edition (stm32) #
|
||||
# SteelSeries Rival 300 CS:GO Hyperbeast Edition #
|
||||
# SteelSeries Rival 300 Dota 2 Edition #
|
||||
# SteelSeries Rival 300 HP Omen Edition #
|
||||
# SteelSeries Rival 300 Blackops Edition #
|
||||
# SteelSeries Rival 310 #
|
||||
# SteelSeries Rival 310 CS:GO Howl Edition #
|
||||
# SteelSeries Rival 310 PubG Edition #
|
||||
# SteelSeries Rival 650 Wireless #
|
||||
# SteelSeries Rival 3 #
|
||||
# SteelSeries Rival Sensei Ten #
|
||||
# SteelSeries Rival Sensei Ten CS:GO Neon Rider #
|
||||
# SteelSeries Rival Sensei 310 #
|
||||
# Headsets: #
|
||||
# SteelSeries Siberia 350 #
|
||||
# Keyboards: #
|
||||
# SteelSeries Apex 3 #
|
||||
# SteelSeries Apex 5 #
|
||||
# SteelSeries Apex 7 #
|
||||
# SteelSeries Apex 7 TKL #
|
||||
# SteelSeries Apex Pro #
|
||||
# SteelSeries Apex Pro TKL #
|
||||
# SteelSeries Apex M750 #
|
||||
# SteelSeries Apex OG #
|
||||
# SteelSeries Apex 350 #
|
||||
# Mousemats: #
|
||||
# SteelSeries QCK Prism Cloth Medium #
|
||||
# SteelSeries QCK Prism Cloth XL #
|
||||
# SteelSeries QCK Prism Cloth 3XL #
|
||||
# SteelSeries QCK Prism Cloth 4XL #
|
||||
#---------------------------------------------------------------#
|
||||
SUBSYSTEMS=="usb", ATTR{idVendor}=="1038", ATTR{idProduct}=="1702", TAG+="uaccess"
|
||||
SUBSYSTEMS=="usb", ATTR{idVendor}=="1038", ATTR{idProduct}=="170c", TAG+="uaccess"
|
||||
SUBSYSTEMS=="usb", ATTR{idVendor}=="1038", ATTR{idProduct}=="1814", TAG+="uaccess"
|
||||
SUBSYSTEMS=="usb", ATTR{idVendor}=="1038", ATTR{idProduct}=="1729", TAG+="uaccess"
|
||||
SUBSYSTEMS=="usb", ATTR{idVendor}=="1038", ATTR{idProduct}=="1710", TAG+="uaccess"
|
||||
SUBSYSTEMS=="usb", ATTR{idVendor}=="1038", ATTR{idProduct}=="1714", TAG+="uaccess"
|
||||
SUBSYSTEMS=="usb", ATTR{idVendor}=="1038", ATTR{idProduct}=="1394", TAG+="uaccess"
|
||||
SUBSYSTEMS=="usb", ATTR{idVendor}=="1038", ATTR{idProduct}=="1716", TAG+="uaccess"
|
||||
SUBSYSTEMS=="usb", ATTR{idVendor}=="1038", ATTR{idProduct}=="171a", TAG+="uaccess"
|
||||
SUBSYSTEMS=="usb", ATTR{idVendor}=="1038", ATTR{idProduct}=="1392", TAG+="uaccess"
|
||||
SUBSYSTEMS=="usb", ATTR{idVendor}=="1038", ATTR{idProduct}=="1718", TAG+="uaccess"
|
||||
SUBSYSTEMS=="usb", ATTR{idVendor}=="1038", ATTR{idProduct}=="1720", TAG+="uaccess"
|
||||
SUBSYSTEMS=="usb", ATTR{idVendor}=="1038", ATTR{idProduct}=="171e", TAG+="uaccess"
|
||||
SUBSYSTEMS=="usb", ATTR{idVendor}=="1038", ATTR{idProduct}=="1736", TAG+="uaccess"
|
||||
SUBSYSTEMS=="usb", ATTR{idVendor}=="1038", ATTR{idProduct}=="1832", TAG+="uaccess"
|
||||
SUBSYSTEMS=="usb", ATTR{idVendor}=="1038", ATTR{idProduct}=="1834", TAG+="uaccess"
|
||||
SUBSYSTEMS=="usb", ATTR{idVendor}=="1038", ATTR{idProduct}=="1722", TAG+="uaccess"
|
||||
SUBSYSTEMS=="usb", ATTR{idVendor}=="1038", ATTR{idProduct}=="1726", TAG+="uaccess"
|
||||
SUBSYSTEMS=="usb", ATTR{idVendor}=="1038", ATTR{idProduct}=="172b", TAG+="uaccess"
|
||||
SUBSYSTEMS=="usb", ATTR{idVendor}=="1038", ATTR{idProduct}=="1824", TAG+="uaccess", TAG+="Rival3_Old"
|
||||
SUBSYSTEMS=="usb", ATTR{idVendor}=="1038", ATTR{idProduct}=="184c", TAG+="uaccess", TAG+="Rival3"
|
||||
|
||||
SUBSYSTEMS=="usb", ATTR{idVendor}=="1038", ATTR{idProduct}=="1229", TAG+="uaccess"
|
||||
|
||||
SUBSYSTEMS=="usb", ATTR{idVendor}=="1038", ATTR{idProduct}=="161c", TAG+="uaccess"
|
||||
SUBSYSTEMS=="usb", ATTR{idVendor}=="1038", ATTR{idProduct}=="1612", TAG+="uaccess"
|
||||
SUBSYSTEMS=="usb", ATTR{idVendor}=="1038", ATTR{idProduct}=="1618", TAG+="uaccess"
|
||||
SUBSYSTEMS=="usb", ATTR{idVendor}=="1038", ATTR{idProduct}=="1610", TAG+="uaccess"
|
||||
SUBSYSTEMS=="usb", ATTR{idVendor}=="1038", ATTR{idProduct}=="1614", TAG+="uaccess"
|
||||
SUBSYSTEMS=="usb", ATTR{idVendor}=="1038", ATTR{idProduct}=="161a", TAG+="uaccess", TAG+="Apex3"
|
||||
SUBSYSTEMS=="usb", ATTR{idVendor}=="1038", ATTR{idProduct}=="0616", TAG+="uaccess"
|
||||
SUBSYSTEMS=="usb", ATTR{idVendor}=="1038", ATTR{idProduct}=="1202", TAG+="uaccess"
|
||||
SUBSYSTEMS=="usb", ATTR{idVendor}=="1038", ATTR{idProduct}=="1206", TAG+="uaccess"
|
||||
|
||||
SUBSYSTEMS=="usb", ATTR{idVendor}=="1038", ATTR{idProduct}=="150a", TAG+="uaccess"
|
||||
SUBSYSTEMS=="usb", ATTR{idVendor}=="1038", ATTR{idProduct}=="150d", TAG+="uaccess"
|
||||
SUBSYSTEMS=="usb", ATTR{idVendor}=="1038", ATTR{idProduct}=="1516", TAG+="uaccess"
|
||||
SUBSYSTEMS=="usb", ATTR{idVendor}=="1038", ATTR{idProduct}=="1518", TAG+="uaccess"
|
||||
|
||||
#---------------------------------------------------------------#
|
||||
# Tecknet Devices #
|
||||
#---------------------------------------------------------------#
|
||||
SUBSYSTEMS=="usb", ATTR{idVendor}=="04d9", ATTR{idProduct}=="fc05", TAG+="uaccess"
|
||||
|
||||
#---------------------------------------------------------------#
|
||||
# Thermaltake Poseidon Z RGB Keyboard #
|
||||
#---------------------------------------------------------------#
|
||||
SUBSYSTEMS=="usb", ATTR{idVendor}=="264a", ATTR{idProduct}=="3006", TAG+="uaccess"
|
||||
|
||||
#---------------------------------------------------------------#
|
||||
# Thermaltake Riing Controllers #
|
||||
#---------------------------------------------------------------#
|
||||
SUBSYSTEMS=="usb", ATTR{idVendor}=="264a", ATTR{idProduct}=="1fa[5-9]", TAG+="uaccess"
|
||||
SUBSYSTEMS=="usb", ATTR{idVendor}=="264a", ATTR{idProduct}=="1fa[a-f]", TAG+="uaccess"
|
||||
SUBSYSTEMS=="usb", ATTR{idVendor}=="264a", ATTR{idProduct}=="1fb[0-5]", TAG+="uaccess"
|
||||
SUBSYSTEMS=="usb", ATTR{idVendor}=="264a", ATTR{idProduct}=="226[0-3]", TAG+="uaccess"
|
||||
|
||||
#---------------------------------------------------------------#
|
||||
# ThingM Controllers #
|
||||
#---------------------------------------------------------------#
|
||||
SUBSYSTEMS=="usb", ATTR{idVendor}=="27b8", ATTR{idProduct}=="01ed", TAG+="uaccess"
|
||||
|
||||
#---------------------------------------------------------------#
|
||||
# Wooting Devices #
|
||||
#---------------------------------------------------------------#
|
||||
SUBSYSTEMS=="usb", ATTR{idVendor}=="03eb", ATTR{idProduct}=="ff01", TAG+="uaccess", TAG+="WootingOne"
|
||||
SUBSYSTEMS=="usb", ATTR{idVendor}=="03eb", ATTR{idProduct}=="ff02", TAG+="uaccess", TAG+="WootingTwo"
|
||||
SUBSYSTEMS=="usb", ATTR{idVendor}=="31e3", ATTR{idProduct}=="1210", TAG+="uaccess", TAG+="WootingTwo_LE"
|
||||
SUBSYSTEMS=="usb", ATTR{idVendor}=="31e3", ATTR{idProduct}=="1220", TAG+="uaccess", TAG+="WootingTwo_HE"
|
||||
|
||||
#---------------------------------------------------------------#
|
||||
# Zalman ZSync Devices #
|
||||
#---------------------------------------------------------------#
|
||||
SUBSYSTEMS=="usb", ATTR{idVendor}=="1c57", ATTR{idProduct}=="7ed0", TAG+="uaccess"
|
||||
@@ -0,0 +1,174 @@
|
||||
#include "AutoStart-FreeBSD.h"
|
||||
#include "LogManager.h"
|
||||
#include "filesystem.h"
|
||||
|
||||
#include <fstream>
|
||||
#include <iostream>
|
||||
#include <unistd.h>
|
||||
#include <sstream>
|
||||
|
||||
/*-----------------------------------------------------*\
|
||||
| FreeBSD AutoStart Implementation |
|
||||
| Public Methods |
|
||||
\*-----------------------------------------------------*/
|
||||
|
||||
AutoStart::AutoStart(std::string name)
|
||||
{
|
||||
InitAutoStart(name);
|
||||
}
|
||||
|
||||
bool AutoStart::DisableAutoStart()
|
||||
{
|
||||
std::error_code autostart_file_remove_errcode;
|
||||
bool success = false;
|
||||
|
||||
/*-------------------------------------------------*\
|
||||
| Check if the filename is valid |
|
||||
\*-------------------------------------------------*/
|
||||
if(autostart_file != "")
|
||||
{
|
||||
/*---------------------------------------------*\
|
||||
| If file doesn't exist, disable is successful |
|
||||
\*---------------------------------------------*/
|
||||
if(!filesystem::exists(autostart_file))
|
||||
{
|
||||
success = true;
|
||||
}
|
||||
/*---------------------------------------------*\
|
||||
| Otherwise, delete the file |
|
||||
\*---------------------------------------------*/
|
||||
else
|
||||
{
|
||||
success = filesystem::remove(autostart_file, autostart_file_remove_errcode);
|
||||
|
||||
if(!success)
|
||||
{
|
||||
LOG_ERROR("[AutoStart] An error occurred removing the auto start file.");
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
LOG_ERROR("Could not establish correct autostart file path.");
|
||||
}
|
||||
|
||||
return(success);
|
||||
}
|
||||
|
||||
bool AutoStart::EnableAutoStart(AutoStartInfo autostart_info)
|
||||
{
|
||||
bool success = false;
|
||||
|
||||
/*-------------------------------------------------*\
|
||||
| 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 |
|
||||
\*---------------------------------------------*/
|
||||
if(!autostart_file_stream)
|
||||
{
|
||||
LOG_ERROR("Could not open %s for writing.", autostart_file.c_str());
|
||||
success = false;
|
||||
}
|
||||
/*---------------------------------------------*\
|
||||
| Otherwise, write the file |
|
||||
\*---------------------------------------------*/
|
||||
else
|
||||
{
|
||||
//autostart_file_stream << desktop_file;
|
||||
autostart_file_stream.close();
|
||||
success = !autostart_file_stream.fail();
|
||||
|
||||
if (!success)
|
||||
{
|
||||
LOG_ERROR("An error occurred writing the auto start file.");
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
LOG_ERROR("Could not establish correct autostart file path.");
|
||||
}
|
||||
|
||||
return(success);
|
||||
}
|
||||
|
||||
bool AutoStart::IsAutoStartEnabled()
|
||||
{
|
||||
/*-------------------------------------------------*\
|
||||
| Check if the filename is valid |
|
||||
\*-------------------------------------------------*/
|
||||
if(autostart_file != "")
|
||||
{
|
||||
return(filesystem::exists(autostart_file));
|
||||
}
|
||||
else
|
||||
{
|
||||
return(false);
|
||||
}
|
||||
}
|
||||
|
||||
std::string AutoStart::GetExePath()
|
||||
{
|
||||
/*-------------------------------------------------*\
|
||||
| Create the OpenRGB executable path |
|
||||
\*-------------------------------------------------*/
|
||||
char exepath[ PATH_MAX ];
|
||||
|
||||
ssize_t count = readlink("/proc/self/exe", exepath, PATH_MAX);
|
||||
|
||||
return(std::string(exepath, (count > 0) ? count : 0));
|
||||
}
|
||||
|
||||
void AutoStart::InitAutoStart(std::string name)
|
||||
{
|
||||
std::string autostart_dir;
|
||||
|
||||
autostart_name = name;
|
||||
|
||||
/*-------------------------------------------------*\
|
||||
| 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 |
|
||||
\*-------------------------------------------------*/
|
||||
if(xdg_config_home != NULL)
|
||||
{
|
||||
autostart_dir = xdg_config_home;
|
||||
autostart_dir = autostart_dir + "/autostart/";
|
||||
}
|
||||
else if(home != NULL)
|
||||
{
|
||||
autostart_dir = home;
|
||||
autostart_dir = autostart_dir + "/.config/autostart/";
|
||||
}
|
||||
|
||||
/*-------------------------------------------------*\
|
||||
| Check if the filename is valid |
|
||||
\*-------------------------------------------------*/
|
||||
if(autostart_dir != "")
|
||||
{
|
||||
std::error_code ec;
|
||||
|
||||
bool success = true;
|
||||
|
||||
if(!filesystem::exists(autostart_dir))
|
||||
{
|
||||
success = filesystem::create_directories(autostart_dir, ec);
|
||||
}
|
||||
|
||||
if(success)
|
||||
{
|
||||
autostart_file = autostart_dir + autostart_name + ".desktop";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,19 @@
|
||||
#pragma once
|
||||
|
||||
#include <string>
|
||||
#include "AutoStart.h"
|
||||
|
||||
class AutoStart: public AutoStartInterface
|
||||
{
|
||||
public:
|
||||
AutoStart(std::string name);
|
||||
|
||||
bool DisableAutoStart();
|
||||
bool EnableAutoStart(AutoStartInfo autostart_info);
|
||||
bool IsAutoStartEnabled();
|
||||
std::string GetExePath();
|
||||
|
||||
private:
|
||||
void InitAutoStart(std::string name);
|
||||
std::string GenerateLaunchAgentFile(AutoStartInfo autostart_info);
|
||||
};
|
||||
@@ -37,4 +37,8 @@ protected:
|
||||
|
||||
#ifdef __APPLE__
|
||||
#include "AutoStart-MacOS.h"
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef __FreeBSD__
|
||||
#include "AutoStart-FreeBSD.h"
|
||||
#endif
|
||||
|
||||
@@ -0,0 +1,58 @@
|
||||
# Contributing to OpenRGB
|
||||
|
||||
The OpenRGB project welcomes contributions from the community. The project would not support the number of devices it does today without the amazing contributions from community developers. If you want to add a new device, fix a bug, or add a feature, feel free to open a merge request on the OpenRGB GitLab (https://gitlab.com/CalcProgrammer1/OpenRGB).
|
||||
|
||||
## Creating a Merge Request
|
||||
|
||||
To create a merge request, log into GitLab and fork the OpenRGB project. Push your changes to your fork and then use the Create Merge Request option. Before opening a merge request, please review the following best practices to help your merge request get merged without excessive delay.
|
||||
|
||||
* Please keep the scope of each merge request limited to one functional area. If you wish to add a new device controller, for instance, don't also do code cleanup in another controller as part of the same merge request.
|
||||
* Explain what your merge request is changing, why you feel the change is necessary, and add any additional information you feel is needed to best understand your change in the merge request description.
|
||||
* Mark your merge request as a draft (start title with "Draft:") until it has been tested and verified working.
|
||||
* Follow the Style Guidelines below when making your code changes.
|
||||
* Avoid using `git merge` when updating your fork. The OpenRGB project uses a linear git history, meaning all changes are rebased onto the tip of master. By using `git rebase` to update your fork, you will make it easier to accept merge requests.
|
||||
|
||||
## Style Guidelines
|
||||
|
||||
OpenRGB is written in C++, uses the Qt framework for UI, and uses the QMake build system. While OpenRGB does use C++, I am primarily a C programmer and prefer doing things "C Style" vs. C++ style. C++'s object oriented programming features fit the needs of a program such as OpenRGB where there are many implementations of a single interface so I chose to write it in C++ over C. Still, however, I prefer using C-style code where possible. When making changes to existing code files, try to follow the existing style. Merge requests that go out of their way to restyle code will not be accepted and will be sent back for rework.
|
||||
|
||||
### Functional Style
|
||||
|
||||
* Limit use of C++ std library data types
|
||||
* For fixed-length containers, use C arrays
|
||||
* For list constants, use const C arrays
|
||||
* For fixed-length strings, use C char buffers ("C strings"), though using std::string is acceptable if the value will be placed in a std::string
|
||||
* For basic types, prefer using the non-typedef'd basic types (char, short, int, etc) over typedef'd (uint8_t, uint16_t, uint32_t, etc)
|
||||
* Unless defined in an OpenRGB API or the file is implementing an existing API using these types (such as i2c_smbus)
|
||||
* For hard-coded values, use `#define`s over const variables unless you need a pointer to the value
|
||||
* For variable-length containers, use std::vector
|
||||
* For variable-length strings, use std::string
|
||||
* `struct` should not include any functions, only variables
|
||||
* `class` should only be used for objects containing functions
|
||||
* Other std types may be used sparingly if necessary
|
||||
* Only use Qt libraries, types, and functionality in user interface files
|
||||
* Anything under the qt/ folder basically
|
||||
* Do not use QDebug, use our LogManager instead. If you use QDebug during development, please remove it before submitting your merge request
|
||||
* Use C-style indexed for loops when iterating through an array or vector
|
||||
* Use C-style casts unless necessary
|
||||
* Avoid the `auto` type. It makes code more difficult to read
|
||||
* Do not use `printf` or `cout` for debug messages, use LogManager instead
|
||||
* Don't define namespaces unless necessary
|
||||
|
||||
### Non-functional Style
|
||||
|
||||
* Set your editor's tab settings to insert spaces, using 4 spaces per tab stop
|
||||
* Always put opening and closing braces `{`, `}` on their own lines
|
||||
* Indent code inside the braces, do not indent the braces themselves
|
||||
* Capitalize hexadecimal literals (`0xFF` not `0xff`) except in the udev rules file (which must be lowercase to work)
|
||||
* No space between keyword and open parenthesis (`if(TRUE)` not `if (TRUE)`). There are some instances of this that haven't been cleaned up in the code.
|
||||
* Generally, `snake_case` is used for variable names and `CamelCase` is used for function and class names
|
||||
* Add a header comment to new files with the filename, description, original author, and date (this is missing on most Detect files)
|
||||
* Line up `=` when doing a lot of assignments together
|
||||
* Use this comment box style when adding comments:
|
||||
|
||||
```
|
||||
/*--------------------------------*\
|
||||
| This is a comment |
|
||||
\*_-------------------------------*/
|
||||
```
|
||||
@@ -50,6 +50,7 @@
|
||||
#define COLOR_AQUAMARINE 0x7fffd4
|
||||
#define COLOR_MAROON 0x800000
|
||||
#define COLOR_PURPLE 0x800080
|
||||
#define COLOR_ELECTRIC_ULTRAMARINE 0x4000FF
|
||||
#define COLOR_OLIVE 0x808000
|
||||
#define COLOR_GRAY 0x808080
|
||||
#define COLOR_GREY 0x808080
|
||||
|
||||
@@ -20,7 +20,7 @@ void DetectAMDWraithPrismControllers(hid_device_info* info, const std::string&)
|
||||
hid_device* dev = hid_open_path(info->path);
|
||||
if( dev )
|
||||
{
|
||||
AMDWraithPrismController* controller = new AMDWraithPrismController(dev, info->path);
|
||||
AMDWraithPrismController* controller = new AMDWraithPrismController(dev, info->path);
|
||||
RGBController_AMDWraithPrism* rgb_controller = new RGBController_AMDWraithPrism(controller);
|
||||
// Constructor sets the name
|
||||
ResourceManager::get()->RegisterRGBController(rgb_controller);
|
||||
|
||||
@@ -9,21 +9,34 @@
|
||||
|
||||
#include "RGBController_AMDWraithPrism.h"
|
||||
|
||||
RGBController_AMDWraithPrism::RGBController_AMDWraithPrism(AMDWraithPrismController* wraith_ptr)
|
||||
/**------------------------------------------------------------------*\
|
||||
@name AMD Wraith Prism
|
||||
@type USB
|
||||
@save :x:
|
||||
@direct :white_check_mark:
|
||||
@effects :warning:
|
||||
@detectors DetectAMDWraithPrismControllers
|
||||
@comment The Wraith Prism comes with 2 cables but is only detectable
|
||||
and controlable when using the USB cable. `Morse Code` and `Mirage`
|
||||
modes have not been implemented. Saving to flash is supported by
|
||||
the device but not yet implemented.
|
||||
\*-------------------------------------------------------------------*/
|
||||
|
||||
RGBController_AMDWraithPrism::RGBController_AMDWraithPrism(AMDWraithPrismController* controller_ptr)
|
||||
{
|
||||
wraith = wraith_ptr;
|
||||
controller = controller_ptr;
|
||||
|
||||
name = "AMD Wraith Prism";
|
||||
vendor = "Cooler Master";
|
||||
type = DEVICE_TYPE_COOLER;
|
||||
description = "AMD Wraith Prism Device";
|
||||
version = wraith->GetFirmwareVersionString();
|
||||
location = wraith->GetLocationString();
|
||||
version = controller->GetFirmwareVersionString();
|
||||
location = controller->GetLocationString();
|
||||
/*-----------------------------------------------------*\
|
||||
| Don't use HID serial string, it is inconsistent on my |
|
||||
| Wraith Prism |
|
||||
\*-----------------------------------------------------*/
|
||||
serial = "";//wraith->GetSerialString();
|
||||
serial = "";//controller->GetSerialString();
|
||||
|
||||
mode Direct;
|
||||
Direct.name = "Direct";
|
||||
@@ -118,7 +131,7 @@ RGBController_AMDWraithPrism::RGBController_AMDWraithPrism(AMDWraithPrismControl
|
||||
|
||||
RGBController_AMDWraithPrism::~RGBController_AMDWraithPrism()
|
||||
{
|
||||
delete wraith;
|
||||
delete controller;
|
||||
}
|
||||
|
||||
void RGBController_AMDWraithPrism::SetupZones()
|
||||
@@ -183,17 +196,17 @@ void RGBController_AMDWraithPrism::DeviceUpdateLEDs()
|
||||
unsigned char red = RGBGetRValue(colors[0]);
|
||||
unsigned char grn = RGBGetGValue(colors[0]);
|
||||
unsigned char blu = RGBGetBValue(colors[0]);
|
||||
wraith->SetLogoColor(red, grn, blu);
|
||||
controller->SetLogoColor(red, grn, blu);
|
||||
|
||||
red = RGBGetRValue(colors[1]);
|
||||
grn = RGBGetGValue(colors[1]);
|
||||
blu = RGBGetBValue(colors[1]);
|
||||
wraith->SetFanColor(red, grn, blu);
|
||||
controller->SetFanColor(red, grn, blu);
|
||||
|
||||
red = RGBGetRValue(colors[2]);
|
||||
grn = RGBGetGValue(colors[2]);
|
||||
blu = RGBGetBValue(colors[2]);
|
||||
wraith->SetRingColor(red, grn, blu);
|
||||
controller->SetRingColor(red, grn, blu);
|
||||
}
|
||||
|
||||
void RGBController_AMDWraithPrism::UpdateZoneLEDs(int zone)
|
||||
@@ -205,15 +218,15 @@ void RGBController_AMDWraithPrism::UpdateZoneLEDs(int zone)
|
||||
|
||||
if(zone == 0)
|
||||
{
|
||||
wraith->SetLogoColor(red, grn, blu);
|
||||
controller->SetLogoColor(red, grn, blu);
|
||||
}
|
||||
else if(zone == 1)
|
||||
{
|
||||
wraith->SetFanColor(red, grn, blu);
|
||||
controller->SetFanColor(red, grn, blu);
|
||||
}
|
||||
else if(zone == 2)
|
||||
{
|
||||
wraith->SetRingColor(red, grn, blu);
|
||||
controller->SetRingColor(red, grn, blu);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -231,36 +244,36 @@ void RGBController_AMDWraithPrism::DeviceUpdateMode()
|
||||
{
|
||||
bool random = (modes[active_mode].color_mode == MODE_COLORS_RANDOM);
|
||||
|
||||
wraith->SetRingMode(modes[active_mode].value, modes[active_mode].speed, modes[active_mode].brightness, modes[active_mode].direction, random);
|
||||
controller->SetRingMode(modes[active_mode].value, modes[active_mode].speed, modes[active_mode].brightness, modes[active_mode].direction, random);
|
||||
|
||||
switch(modes[active_mode].value)
|
||||
{
|
||||
case AMD_WRAITH_PRISM_EFFECT_CHANNEL_COLOR_CYCLE:
|
||||
wraith->SetFanMode(AMD_WRAITH_PRISM_FAN_LOGO_MODE_COLOR_CYCLE, modes[active_mode].speed, modes[active_mode].brightness, random);
|
||||
wraith->SetLogoMode(AMD_WRAITH_PRISM_FAN_LOGO_MODE_COLOR_CYCLE, modes[active_mode].speed, modes[active_mode].brightness, random);
|
||||
controller->SetFanMode(AMD_WRAITH_PRISM_FAN_LOGO_MODE_COLOR_CYCLE, modes[active_mode].speed, modes[active_mode].brightness, random);
|
||||
controller->SetLogoMode(AMD_WRAITH_PRISM_FAN_LOGO_MODE_COLOR_CYCLE, modes[active_mode].speed, modes[active_mode].brightness, random);
|
||||
break;
|
||||
|
||||
case AMD_WRAITH_PRISM_EFFECT_CHANNEL_RAINBOW:
|
||||
case AMD_WRAITH_PRISM_EFFECT_CHANNEL_BOUNCE:
|
||||
wraith->SetFanMode(AMD_WRAITH_PRISM_FAN_LOGO_MODE_COLOR_CYCLE, modes[active_mode].speed, (modes[active_mode].brightness >> 1), random);
|
||||
wraith->SetLogoMode(AMD_WRAITH_PRISM_FAN_LOGO_MODE_COLOR_CYCLE, modes[active_mode].speed, (modes[active_mode].brightness >> 1), random);
|
||||
controller->SetFanMode(AMD_WRAITH_PRISM_FAN_LOGO_MODE_COLOR_CYCLE, modes[active_mode].speed, (modes[active_mode].brightness >> 1), random);
|
||||
controller->SetLogoMode(AMD_WRAITH_PRISM_FAN_LOGO_MODE_COLOR_CYCLE, modes[active_mode].speed, (modes[active_mode].brightness >> 1), random);
|
||||
break;
|
||||
|
||||
case AMD_WRAITH_PRISM_EFFECT_CHANNEL_BREATHING:
|
||||
wraith->SetFanMode(AMD_WRAITH_PRISM_FAN_LOGO_MODE_BREATHING, modes[active_mode].speed, modes[active_mode].brightness, random);
|
||||
wraith->SetLogoMode(AMD_WRAITH_PRISM_FAN_LOGO_MODE_BREATHING, modes[active_mode].speed, modes[active_mode].brightness, random);
|
||||
controller->SetFanMode(AMD_WRAITH_PRISM_FAN_LOGO_MODE_BREATHING, modes[active_mode].speed, modes[active_mode].brightness, random);
|
||||
controller->SetLogoMode(AMD_WRAITH_PRISM_FAN_LOGO_MODE_BREATHING, modes[active_mode].speed, modes[active_mode].brightness, random);
|
||||
break;
|
||||
|
||||
default:
|
||||
if(random)
|
||||
{
|
||||
wraith->SetFanMode(AMD_WRAITH_PRISM_FAN_LOGO_MODE_COLOR_CYCLE, modes[active_mode].speed, modes[active_mode].brightness, random);
|
||||
wraith->SetLogoMode(AMD_WRAITH_PRISM_FAN_LOGO_MODE_COLOR_CYCLE, modes[active_mode].speed, modes[active_mode].brightness, random);
|
||||
controller->SetFanMode(AMD_WRAITH_PRISM_FAN_LOGO_MODE_COLOR_CYCLE, modes[active_mode].speed, modes[active_mode].brightness, random);
|
||||
controller->SetLogoMode(AMD_WRAITH_PRISM_FAN_LOGO_MODE_COLOR_CYCLE, modes[active_mode].speed, modes[active_mode].brightness, random);
|
||||
}
|
||||
else
|
||||
{
|
||||
wraith->SetFanMode(AMD_WRAITH_PRISM_FAN_LOGO_MODE_STATIC, modes[active_mode].speed, modes[active_mode].brightness, random);
|
||||
wraith->SetLogoMode(AMD_WRAITH_PRISM_FAN_LOGO_MODE_STATIC, modes[active_mode].speed, modes[active_mode].brightness, random);
|
||||
controller->SetFanMode(AMD_WRAITH_PRISM_FAN_LOGO_MODE_STATIC, modes[active_mode].speed, modes[active_mode].brightness, random);
|
||||
controller->SetLogoMode(AMD_WRAITH_PRISM_FAN_LOGO_MODE_STATIC, modes[active_mode].speed, modes[active_mode].brightness, random);
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -1,33 +1,33 @@
|
||||
/*-----------------------------------------*\
|
||||
| RGBController_AMDWraithPrism.h |
|
||||
| |
|
||||
| Generic RGB Interface for AMD Wraith |
|
||||
| Prism |
|
||||
| |
|
||||
| Adam Honse (CalcProgrammer1) 12/25/2019 |
|
||||
\*-----------------------------------------*/
|
||||
|
||||
#pragma once
|
||||
#include "RGBController.h"
|
||||
#include "AMDWraithPrismController.h"
|
||||
|
||||
class RGBController_AMDWraithPrism : public RGBController
|
||||
{
|
||||
public:
|
||||
RGBController_AMDWraithPrism(AMDWraithPrismController* wraith_ptr);
|
||||
~RGBController_AMDWraithPrism();
|
||||
|
||||
void SetupZones();
|
||||
|
||||
void ResizeZone(int zone, int new_size);
|
||||
|
||||
void DeviceUpdateLEDs();
|
||||
void UpdateZoneLEDs(int zone);
|
||||
void UpdateSingleLED(int led);
|
||||
|
||||
void SetCustomMode();
|
||||
void DeviceUpdateMode();
|
||||
|
||||
private:
|
||||
AMDWraithPrismController* wraith;
|
||||
};
|
||||
/*-----------------------------------------*\
|
||||
| RGBController_AMDWraithPrism.h |
|
||||
| |
|
||||
| Generic RGB Interface for AMD Wraith |
|
||||
| Prism |
|
||||
| |
|
||||
| Adam Honse (CalcProgrammer1) 12/25/2019 |
|
||||
\*-----------------------------------------*/
|
||||
|
||||
#pragma once
|
||||
#include "RGBController.h"
|
||||
#include "AMDWraithPrismController.h"
|
||||
|
||||
class RGBController_AMDWraithPrism : public RGBController
|
||||
{
|
||||
public:
|
||||
RGBController_AMDWraithPrism(AMDWraithPrismController* controller_ptr);
|
||||
~RGBController_AMDWraithPrism();
|
||||
|
||||
void SetupZones();
|
||||
|
||||
void ResizeZone(int zone, int new_size);
|
||||
|
||||
void DeviceUpdateLEDs();
|
||||
void UpdateZoneLEDs(int zone);
|
||||
void UpdateSingleLED(int led);
|
||||
|
||||
void SetCustomMode();
|
||||
void DeviceUpdateMode();
|
||||
|
||||
private:
|
||||
AMDWraithPrismController* controller;
|
||||
};
|
||||
|
||||
@@ -191,9 +191,53 @@ enum
|
||||
|
||||
enum
|
||||
{
|
||||
POLYCHROME_V2_SPEED_MIN = 0x05, /* Slowest speed */
|
||||
POLYCHROME_V2_SPEED_DEFAULT = 0x03, /* Default speed */
|
||||
POLYCHROME_V2_SPEED_MAX = 0x00, /* Fastest speed */
|
||||
POLYCHROME_V2_BREATHING_SPEED_MIN = 0x0A, /* Slowest speed */
|
||||
POLYCHROME_V2_BREATHING_SPEED_DEFAULT = 0x06, /* Default speed */
|
||||
POLYCHROME_V2_BREATHING_SPEED_MAX = 0x02, /* Fastest speed */
|
||||
|
||||
POLYCHROME_V2_STROBE_SPEED_MIN = 0xA0, /* Slowest speed */
|
||||
POLYCHROME_V2_STROBE_SPEED_DEFAULT = 0x4D, /* Default speed */
|
||||
POLYCHROME_V2_STROBE_SPEED_MAX = 0x05, /* Fastest speed */
|
||||
|
||||
POLYCHROME_V2_SPECTRUM_CYCLE_SPEED_MIN = 0xA0, /* Slowest speed */
|
||||
POLYCHROME_V2_SPECTRUM_CYCLE_SPEED_DEFAULT = 0x50, /* Default speed */
|
||||
POLYCHROME_V2_SPECTRUM_CYCLE_SPEED_MAX = 0x0A, /* Fastest speed */
|
||||
|
||||
POLYCHROME_V2_RANDOM_SPEED_MIN = 0xA0, /* Slowest speed */
|
||||
POLYCHROME_V2_RANDOM_SPEED_DEFAULT = 0x4D, /* Default speed */
|
||||
POLYCHROME_V2_RANDOM_SPEED_MAX = 0x05, /* Fastest speed */
|
||||
|
||||
POLYCHROME_V2_WAVE_SPEED_MIN = 0x06, /* Slowest speed */
|
||||
POLYCHROME_V2_WAVE_SPEED_DEFAULT = 0x03, /* Default speed */
|
||||
POLYCHROME_V2_WAVE_SPEED_MAX = 0x01, /* Fastest speed */
|
||||
|
||||
POLYCHROME_V2_SPRING_SPEED_MIN = 0x20, /* Slowest speed */
|
||||
POLYCHROME_V2_SPRING_SPEED_DEFAULT = 0x11, /* Default speed */
|
||||
POLYCHROME_V2_SPRING_SPEED_MAX = 0x02, /* Fastest speed */
|
||||
|
||||
POLYCHROME_V2_STACK_SPEED_MIN = 0x20, /* Slowest speed */
|
||||
POLYCHROME_V2_STACK_SPEED_DEFAULT = 0x11, /* Default speed */
|
||||
POLYCHROME_V2_STACK_SPEED_MAX = 0x02, /* Fastest speed */
|
||||
|
||||
POLYCHROME_V2_CRAM_SPEED_MIN = 0x20, /* Slowest speed */
|
||||
POLYCHROME_V2_CRAM_SPEED_DEFAULT = 0x11, /* Default speed */
|
||||
POLYCHROME_V2_CRAM_SPEED_MAX = 0x02, /* Fastest speed */
|
||||
|
||||
POLYCHROME_V2_SCAN_SPEED_MIN = 0x20, /* Slowest speed */
|
||||
POLYCHROME_V2_SCAN_SPEED_DEFAULT = 0x11, /* Default speed */
|
||||
POLYCHROME_V2_SCAN_SPEED_MAX = 0x02, /* Fastest speed */
|
||||
|
||||
POLYCHROME_V2_NEON_SPEED_MIN = 0x20, /* Slowest speed */
|
||||
POLYCHROME_V2_NEON_SPEED_DEFAULT = 0x11, /* Default speed */
|
||||
POLYCHROME_V2_NEON_SPEED_MAX = 0x02, /* Fastest speed */
|
||||
|
||||
POLYCHROME_V2_WATER_SPEED_MIN = 0x20, /* Slowest speed */
|
||||
POLYCHROME_V2_WATER_SPEED_DEFAULT = 0x11, /* Default speed */
|
||||
POLYCHROME_V2_WATER_SPEED_MAX = 0x02, /* Fastest speed */
|
||||
|
||||
POLYCHROME_V2_RAINBOW_SPEED_MIN = 0x12, /* Slowest speed */
|
||||
POLYCHROME_V2_RAINBOW_SPEED_DEFAULT = 0x08, /* Default speed */
|
||||
POLYCHROME_V2_RAINBOW_SPEED_MAX = 0x02, /* Fastest speed */
|
||||
};
|
||||
|
||||
class PolychromeController
|
||||
|
||||
+7
-10
@@ -47,10 +47,7 @@ bool TestForPolychromeSMBusController(i2c_smbus_interface* bus, unsigned char ad
|
||||
|
||||
void DetectPolychromeSMBusControllers(std::vector<i2c_smbus_interface*>& busses)
|
||||
{
|
||||
PolychromeController* new_polychrome;
|
||||
RGBController_Polychrome* new_controller;
|
||||
|
||||
for (unsigned int bus = 0; bus < busses.size(); bus++)
|
||||
for(unsigned int bus = 0; bus < busses.size(); bus++)
|
||||
{
|
||||
IF_MOBO_SMBUS(busses[bus]->pci_vendor, busses[bus]->pci_device)
|
||||
{
|
||||
@@ -58,21 +55,21 @@ void DetectPolychromeSMBusControllers(std::vector<i2c_smbus_interface*>& busses)
|
||||
{
|
||||
LOG_DEBUG(SMBUS_CHECK_DEVICE_MESSAGE_EN, ASROCK_DETECTOR_NAME, bus, VENDOR_NAME, SMBUS_ADDRESS);
|
||||
// Check for Polychrome controller at 0x6A
|
||||
if (TestForPolychromeSMBusController(busses[bus], SMBUS_ADDRESS))
|
||||
if(TestForPolychromeSMBusController(busses[bus], SMBUS_ADDRESS))
|
||||
{
|
||||
LOG_DEBUG("[%s] Detected a device at address %02X, testing for a known controller", ASROCK_DETECTOR_NAME, SMBUS_ADDRESS);
|
||||
new_polychrome = new PolychromeController(busses[bus], SMBUS_ADDRESS);
|
||||
PolychromeController* controller = new PolychromeController(busses[bus], SMBUS_ADDRESS);
|
||||
|
||||
if(new_polychrome->GetASRockType() != ASROCK_TYPE_UNKNOWN)
|
||||
if(controller->GetASRockType() != ASROCK_TYPE_UNKNOWN)
|
||||
{
|
||||
LOG_DEBUG("[%s] Found a known Polychrome device", ASROCK_DETECTOR_NAME);
|
||||
new_controller = new RGBController_Polychrome(new_polychrome);
|
||||
ResourceManager::get()->RegisterRGBController(new_controller);
|
||||
RGBController_Polychrome* rgb_controller = new RGBController_Polychrome(controller);
|
||||
ResourceManager::get()->RegisterRGBController(rgb_controller);
|
||||
}
|
||||
else
|
||||
{
|
||||
LOG_DEBUG("[%s] Not a Polychrome device or unknown type", ASROCK_DETECTOR_NAME);
|
||||
delete new_polychrome;
|
||||
delete controller;
|
||||
}
|
||||
}
|
||||
else
|
||||
|
||||
+70
-56
@@ -32,17 +32,28 @@ static const char* polychrome_v2_zone_names[] =
|
||||
"Addressable Header"
|
||||
};
|
||||
|
||||
RGBController_Polychrome::RGBController_Polychrome(PolychromeController* polychrome_ptr)
|
||||
/**------------------------------------------------------------------*\
|
||||
@name ASRock Polychrome SMBus
|
||||
@type SMBus
|
||||
@save :warning:
|
||||
@direct :x:
|
||||
@effects :white_check_mark:
|
||||
@detectors DetectPolychromeSMBusControllers
|
||||
@comment ASRock Polychrome controllers will save with each update.
|
||||
Per ARGB LED support is not possible with these devices.
|
||||
\*-------------------------------------------------------------------*/
|
||||
|
||||
RGBController_Polychrome::RGBController_Polychrome(PolychromeController* controller_ptr)
|
||||
{
|
||||
polychrome = polychrome_ptr;
|
||||
controller = controller_ptr;
|
||||
|
||||
name = polychrome->GetDeviceName();
|
||||
name = controller->GetDeviceName();
|
||||
vendor = "ASRock";
|
||||
version = polychrome->GetFirmwareVersion();
|
||||
version = controller->GetFirmwareVersion();
|
||||
type = DEVICE_TYPE_MOTHERBOARD;
|
||||
location = polychrome->GetDeviceLocation();
|
||||
location = controller->GetDeviceLocation();
|
||||
|
||||
switch(polychrome->GetASRockType())
|
||||
switch(controller->GetASRockType())
|
||||
{
|
||||
case ASROCK_TYPE_ASRLED:
|
||||
{
|
||||
@@ -295,9 +306,9 @@ RGBController_Polychrome::RGBController_Polychrome(PolychromeController* polychr
|
||||
Breathing.name = "Breathing";
|
||||
Breathing.value = POLYCHROME_V2_MODE_BREATHING;
|
||||
Breathing.flags = MODE_FLAG_HAS_SPEED | MODE_FLAG_HAS_PER_LED_COLOR;
|
||||
Breathing.speed_min = POLYCHROME_V2_SPEED_MIN;
|
||||
Breathing.speed_max = POLYCHROME_V2_SPEED_MAX;
|
||||
Breathing.speed = POLYCHROME_V2_SPEED_DEFAULT;
|
||||
Breathing.speed_min = POLYCHROME_V2_BREATHING_SPEED_MIN;
|
||||
Breathing.speed_max = POLYCHROME_V2_BREATHING_SPEED_MAX;
|
||||
Breathing.speed = POLYCHROME_V2_BREATHING_SPEED_DEFAULT;
|
||||
Breathing.color_mode = MODE_COLORS_PER_LED;
|
||||
modes.push_back(Breathing);
|
||||
|
||||
@@ -305,9 +316,9 @@ RGBController_Polychrome::RGBController_Polychrome(PolychromeController* polychr
|
||||
Strobe.name = "Strobe";
|
||||
Strobe.value = POLYCHROME_V2_MODE_STROBE;
|
||||
Strobe.flags = MODE_FLAG_HAS_SPEED | MODE_FLAG_HAS_PER_LED_COLOR;
|
||||
Strobe.speed_min = POLYCHROME_V2_SPEED_MIN;
|
||||
Strobe.speed_max = POLYCHROME_V2_SPEED_MAX;
|
||||
Strobe.speed = POLYCHROME_V2_SPEED_DEFAULT;
|
||||
Strobe.speed_min = POLYCHROME_V2_STROBE_SPEED_MIN;
|
||||
Strobe.speed_max = POLYCHROME_V2_STROBE_SPEED_MAX;
|
||||
Strobe.speed = POLYCHROME_V2_STROBE_SPEED_DEFAULT;
|
||||
Strobe.color_mode = MODE_COLORS_PER_LED;
|
||||
modes.push_back(Strobe);
|
||||
|
||||
@@ -315,9 +326,9 @@ RGBController_Polychrome::RGBController_Polychrome(PolychromeController* polychr
|
||||
SpectrumCycle.name = "Spectrum Cycle";
|
||||
SpectrumCycle.value = POLYCHROME_V2_MODE_SPECTRUM_CYCLE;
|
||||
SpectrumCycle.flags = MODE_FLAG_HAS_SPEED;
|
||||
SpectrumCycle.speed_min = POLYCHROME_V2_SPEED_MIN;
|
||||
SpectrumCycle.speed_max = POLYCHROME_V2_SPEED_MAX;
|
||||
SpectrumCycle.speed = POLYCHROME_V2_SPEED_DEFAULT;
|
||||
SpectrumCycle.speed_min = POLYCHROME_V2_SPECTRUM_CYCLE_SPEED_MIN;
|
||||
SpectrumCycle.speed_max = POLYCHROME_V2_SPECTRUM_CYCLE_SPEED_MAX;
|
||||
SpectrumCycle.speed = POLYCHROME_V2_SPECTRUM_CYCLE_SPEED_DEFAULT;
|
||||
SpectrumCycle.color_mode = MODE_COLORS_NONE;
|
||||
modes.push_back(SpectrumCycle);
|
||||
|
||||
@@ -325,9 +336,9 @@ RGBController_Polychrome::RGBController_Polychrome(PolychromeController* polychr
|
||||
Random.name = "Random";
|
||||
Random.value = POLYCHROME_V2_MODE_RANDOM;
|
||||
Random.flags = MODE_FLAG_HAS_SPEED;
|
||||
Random.speed_min = POLYCHROME_V2_SPEED_MIN;
|
||||
Random.speed_max = POLYCHROME_V2_SPEED_MAX;
|
||||
Random.speed = POLYCHROME_V2_SPEED_DEFAULT;
|
||||
Random.speed_min = POLYCHROME_V2_RANDOM_SPEED_MIN;
|
||||
Random.speed_max = POLYCHROME_V2_RANDOM_SPEED_MAX;
|
||||
Random.speed = POLYCHROME_V2_RANDOM_SPEED_DEFAULT;
|
||||
Random.color_mode = MODE_COLORS_NONE;
|
||||
modes.push_back(Random);
|
||||
|
||||
@@ -335,9 +346,9 @@ RGBController_Polychrome::RGBController_Polychrome(PolychromeController* polychr
|
||||
Wave.name = "Wave";
|
||||
Wave.value = POLYCHROME_V2_MODE_WAVE;
|
||||
Wave.flags = MODE_FLAG_HAS_SPEED;
|
||||
Wave.speed_min = POLYCHROME_V2_SPEED_MIN;
|
||||
Wave.speed_max = POLYCHROME_V2_SPEED_MAX;
|
||||
Wave.speed = POLYCHROME_V2_SPEED_DEFAULT;
|
||||
Wave.speed_min = POLYCHROME_V2_WAVE_SPEED_MIN;
|
||||
Wave.speed_max = POLYCHROME_V2_WAVE_SPEED_MAX;
|
||||
Wave.speed = POLYCHROME_V2_WAVE_SPEED_DEFAULT;
|
||||
Wave.color_mode = MODE_COLORS_NONE;
|
||||
modes.push_back(Wave);
|
||||
|
||||
@@ -345,9 +356,9 @@ RGBController_Polychrome::RGBController_Polychrome(PolychromeController* polychr
|
||||
Spring.name = "Spring";
|
||||
Spring.value = POLYCHROME_V2_MODE_SPRING;
|
||||
Spring.flags = MODE_FLAG_HAS_SPEED;
|
||||
Spring.speed_min = POLYCHROME_V2_SPEED_MIN;
|
||||
Spring.speed_max = POLYCHROME_V2_SPEED_MAX;
|
||||
Spring.speed = POLYCHROME_V2_SPEED_DEFAULT;
|
||||
Spring.speed_min = POLYCHROME_V2_SPRING_SPEED_MIN;
|
||||
Spring.speed_max = POLYCHROME_V2_SPRING_SPEED_MAX;
|
||||
Spring.speed = POLYCHROME_V2_SPRING_SPEED_DEFAULT;
|
||||
Spring.color_mode = MODE_COLORS_NONE;
|
||||
modes.push_back(Spring);
|
||||
|
||||
@@ -355,9 +366,9 @@ RGBController_Polychrome::RGBController_Polychrome(PolychromeController* polychr
|
||||
Stack.name = "Stack";
|
||||
Stack.value = POLYCHROME_V2_MODE_STACK;
|
||||
Stack.flags = MODE_FLAG_HAS_SPEED;
|
||||
Stack.speed_min = POLYCHROME_V2_SPEED_MIN;
|
||||
Stack.speed_max = POLYCHROME_V2_SPEED_MAX;
|
||||
Stack.speed = POLYCHROME_V2_SPEED_DEFAULT;
|
||||
Stack.speed_min = POLYCHROME_V2_STACK_SPEED_MIN;
|
||||
Stack.speed_max = POLYCHROME_V2_STACK_SPEED_MAX;
|
||||
Stack.speed = POLYCHROME_V2_STACK_SPEED_DEFAULT;
|
||||
Stack.color_mode = MODE_COLORS_NONE;
|
||||
modes.push_back(Stack);
|
||||
|
||||
@@ -365,9 +376,9 @@ RGBController_Polychrome::RGBController_Polychrome(PolychromeController* polychr
|
||||
Cram.name = "Cram";
|
||||
Cram.value = POLYCHROME_V2_MODE_CRAM;
|
||||
Cram.flags = MODE_FLAG_HAS_SPEED;
|
||||
Cram.speed_min = POLYCHROME_V2_SPEED_MIN;
|
||||
Cram.speed_max = POLYCHROME_V2_SPEED_MAX;
|
||||
Cram.speed = POLYCHROME_V2_SPEED_DEFAULT;
|
||||
Cram.speed_min = POLYCHROME_V2_CRAM_SPEED_MIN;
|
||||
Cram.speed_max = POLYCHROME_V2_CRAM_SPEED_MAX;
|
||||
Cram.speed = POLYCHROME_V2_CRAM_SPEED_DEFAULT;
|
||||
Cram.color_mode = MODE_COLORS_NONE;
|
||||
modes.push_back(Cram);
|
||||
|
||||
@@ -375,16 +386,19 @@ RGBController_Polychrome::RGBController_Polychrome(PolychromeController* polychr
|
||||
Scan.name = "Scan";
|
||||
Scan.value = POLYCHROME_V2_MODE_SCAN;
|
||||
Scan.flags = MODE_FLAG_HAS_SPEED;
|
||||
Scan.speed_min = POLYCHROME_V2_SPEED_MIN;
|
||||
Scan.speed_max = POLYCHROME_V2_SPEED_MAX;
|
||||
Scan.speed = POLYCHROME_V2_SPEED_DEFAULT;
|
||||
Scan.speed_min = POLYCHROME_V2_SCAN_SPEED_MIN;
|
||||
Scan.speed_max = POLYCHROME_V2_SCAN_SPEED_MAX;
|
||||
Scan.speed = POLYCHROME_V2_SCAN_SPEED_DEFAULT;
|
||||
Scan.color_mode = MODE_COLORS_NONE;
|
||||
modes.push_back(Scan);
|
||||
|
||||
mode Neon;
|
||||
Neon.name = "Neon";
|
||||
Neon.value = POLYCHROME_V2_MODE_NEON;
|
||||
Neon.flags = 0;
|
||||
Neon.flags = MODE_FLAG_HAS_SPEED;
|
||||
Neon.speed_min = POLYCHROME_V2_NEON_SPEED_MIN;
|
||||
Neon.speed_max = POLYCHROME_V2_NEON_SPEED_MAX;
|
||||
Neon.speed = POLYCHROME_V2_NEON_SPEED_DEFAULT;
|
||||
Neon.color_mode = MODE_COLORS_NONE;
|
||||
modes.push_back(Neon);
|
||||
|
||||
@@ -392,9 +406,9 @@ RGBController_Polychrome::RGBController_Polychrome(PolychromeController* polychr
|
||||
Water.name = "Water";
|
||||
Water.value = POLYCHROME_V2_MODE_WATER;
|
||||
Water.flags = MODE_FLAG_HAS_SPEED;
|
||||
Water.speed_min = POLYCHROME_V2_SPEED_MIN;
|
||||
Water.speed_max = POLYCHROME_V2_SPEED_MAX;
|
||||
Water.speed = POLYCHROME_V2_SPEED_DEFAULT;
|
||||
Water.speed_min = POLYCHROME_V2_WATER_SPEED_MIN;
|
||||
Water.speed_max = POLYCHROME_V2_WATER_SPEED_MAX;
|
||||
Water.speed = POLYCHROME_V2_WATER_SPEED_DEFAULT;
|
||||
Water.color_mode = MODE_COLORS_NONE;
|
||||
modes.push_back(Water);
|
||||
|
||||
@@ -402,9 +416,9 @@ RGBController_Polychrome::RGBController_Polychrome(PolychromeController* polychr
|
||||
Rainbow.name = "Rainbow";
|
||||
Rainbow.value = POLYCHROME_V2_MODE_RAINBOW;
|
||||
Rainbow.flags = MODE_FLAG_HAS_SPEED;
|
||||
Rainbow.speed_min = POLYCHROME_V2_SPEED_MIN;
|
||||
Rainbow.speed_max = POLYCHROME_V2_SPEED_MAX;
|
||||
Rainbow.speed = POLYCHROME_V2_SPEED_DEFAULT;
|
||||
Rainbow.speed_min = POLYCHROME_V2_RAINBOW_SPEED_MIN;
|
||||
Rainbow.speed_max = POLYCHROME_V2_RAINBOW_SPEED_MAX;
|
||||
Rainbow.speed = POLYCHROME_V2_RAINBOW_SPEED_DEFAULT;
|
||||
Rainbow.color_mode = MODE_COLORS_NONE;
|
||||
modes.push_back(Rainbow);
|
||||
}
|
||||
@@ -416,12 +430,12 @@ RGBController_Polychrome::RGBController_Polychrome(PolychromeController* polychr
|
||||
|
||||
RGBController_Polychrome::~RGBController_Polychrome()
|
||||
{
|
||||
delete polychrome;
|
||||
delete controller;
|
||||
}
|
||||
|
||||
void RGBController_Polychrome::SetupZones()
|
||||
{
|
||||
switch(polychrome->GetASRockType())
|
||||
switch(controller->GetASRockType())
|
||||
{
|
||||
/*---------------------------------------------------------*\
|
||||
| ASR LED motherboards only have a single zone/LED |
|
||||
@@ -477,14 +491,14 @@ void RGBController_Polychrome::SetupZones()
|
||||
\*---------------------------------------------------------*/
|
||||
for(unsigned int zone_idx = 0; zone_idx < POLYCHROME_ZONE_COUNT; zone_idx++)
|
||||
{
|
||||
if(polychrome->zone_led_count[zone_idx] > 0)
|
||||
if(controller->zone_led_count[zone_idx] > 0)
|
||||
{
|
||||
zone* new_zone = new zone();
|
||||
|
||||
/*---------------------------------------------------------*\
|
||||
| Set zone name to channel name |
|
||||
\*---------------------------------------------------------*/
|
||||
if(polychrome->GetASRockType() == ASROCK_TYPE_POLYCHROME_V1)
|
||||
if(controller->GetASRockType() == ASROCK_TYPE_POLYCHROME_V1)
|
||||
{
|
||||
new_zone->name = polychrome_v1_zone_names[zone_idx];
|
||||
}
|
||||
@@ -501,9 +515,9 @@ void RGBController_Polychrome::SetupZones()
|
||||
}
|
||||
else
|
||||
{
|
||||
new_zone->leds_min = polychrome->zone_led_count[zone_idx];
|
||||
new_zone->leds_max = polychrome->zone_led_count[zone_idx];
|
||||
new_zone->leds_count = polychrome->zone_led_count[zone_idx];
|
||||
new_zone->leds_min = controller->zone_led_count[zone_idx];
|
||||
new_zone->leds_max = controller->zone_led_count[zone_idx];
|
||||
new_zone->leds_count = controller->zone_led_count[zone_idx];
|
||||
}
|
||||
|
||||
if(new_zone->leds_count > 1)
|
||||
@@ -530,16 +544,16 @@ void RGBController_Polychrome::SetupZones()
|
||||
\*---------------------------------------------------------*/
|
||||
for(unsigned int zone_idx = 0; zone_idx < POLYCHROME_ZONE_COUNT; zone_idx++)
|
||||
{
|
||||
if(polychrome->zone_led_count[zone_idx] > 0)
|
||||
if(controller->zone_led_count[zone_idx] > 0)
|
||||
{
|
||||
for(unsigned int led_idx = 0; led_idx < polychrome->zone_led_count[zone_idx]; led_idx++)
|
||||
for(unsigned int led_idx = 0; led_idx < controller->zone_led_count[zone_idx]; led_idx++)
|
||||
{
|
||||
/*---------------------------------------------------------*\
|
||||
| Each zone only has one LED |
|
||||
\*---------------------------------------------------------*/
|
||||
led* new_led = new led();
|
||||
|
||||
if(polychrome->GetASRockType() == ASROCK_TYPE_POLYCHROME_V1)
|
||||
if(controller->GetASRockType() == ASROCK_TYPE_POLYCHROME_V1)
|
||||
{
|
||||
new_led->name = polychrome_v1_zone_names[zone_idx];
|
||||
}
|
||||
@@ -551,7 +565,7 @@ void RGBController_Polychrome::SetupZones()
|
||||
new_led->name.append(" " + std::to_string(led_idx + 1));
|
||||
new_led->value = 0;
|
||||
|
||||
if(polychrome->GetASRockType() == ASROCK_TYPE_POLYCHROME_V1)
|
||||
if(controller->GetASRockType() == ASROCK_TYPE_POLYCHROME_V1)
|
||||
{
|
||||
new_led->value = zone_idx;
|
||||
}
|
||||
@@ -616,7 +630,7 @@ void RGBController_Polychrome::UpdateSingleLED(int led)
|
||||
led = leds[led].value;
|
||||
}
|
||||
|
||||
polychrome->SetColorsAndSpeed(led, red, grn, blu);
|
||||
controller->SetColorsAndSpeed(led, red, grn, blu);
|
||||
}
|
||||
|
||||
void RGBController_Polychrome::SetCustomMode()
|
||||
@@ -626,16 +640,16 @@ void RGBController_Polychrome::SetCustomMode()
|
||||
|
||||
void RGBController_Polychrome::DeviceUpdateMode()
|
||||
{
|
||||
if(polychrome->GetASRockType() == ASROCK_TYPE_POLYCHROME_V1)
|
||||
if(controller->GetASRockType() == ASROCK_TYPE_POLYCHROME_V1)
|
||||
{
|
||||
for(unsigned int led_idx = 0; led_idx <= leds.size(); led_idx++)
|
||||
for(unsigned int led_idx = 0; led_idx < leds.size(); led_idx++)
|
||||
{
|
||||
polychrome->SetMode(led_idx, modes[active_mode].value, modes[active_mode].speed);
|
||||
controller->SetMode(led_idx, modes[active_mode].value, modes[active_mode].speed);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
polychrome->SetMode(0, modes[active_mode].value, modes[active_mode].speed);
|
||||
controller->SetMode(0, modes[active_mode].value, modes[active_mode].speed);
|
||||
}
|
||||
|
||||
DeviceUpdateLEDs();
|
||||
|
||||
@@ -1,34 +1,34 @@
|
||||
/*-----------------------------------------*\
|
||||
| RGBController_ASRockPolychromeSMBus.h |
|
||||
| |
|
||||
| Generic RGB Interface for OpenRGB |
|
||||
| ASRock ASR LED and Polychrome RGB Driver |
|
||||
| |
|
||||
| Adam Honse (CalcProgrammer1) 12/15/2019 |
|
||||
\*-----------------------------------------*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "RGBController.h"
|
||||
#include "ASRockPolychromeSMBusController.h"
|
||||
|
||||
class RGBController_Polychrome : public RGBController
|
||||
{
|
||||
public:
|
||||
RGBController_Polychrome(PolychromeController* polychrome_ptr);
|
||||
~RGBController_Polychrome();
|
||||
|
||||
void SetupZones();
|
||||
|
||||
void ResizeZone(int zone, int new_size);
|
||||
|
||||
void DeviceUpdateLEDs();
|
||||
void UpdateZoneLEDs(int zone);
|
||||
void UpdateSingleLED(int led);
|
||||
|
||||
void SetCustomMode();
|
||||
void DeviceUpdateMode();
|
||||
|
||||
private:
|
||||
PolychromeController* polychrome;
|
||||
};
|
||||
/*-----------------------------------------*\
|
||||
| RGBController_ASRockPolychromeSMBus.h |
|
||||
| |
|
||||
| Generic RGB Interface for OpenRGB |
|
||||
| ASRock ASR LED and Polychrome RGB Driver |
|
||||
| |
|
||||
| Adam Honse (CalcProgrammer1) 12/15/2019 |
|
||||
\*-----------------------------------------*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "RGBController.h"
|
||||
#include "ASRockPolychromeSMBusController.h"
|
||||
|
||||
class RGBController_Polychrome : public RGBController
|
||||
{
|
||||
public:
|
||||
RGBController_Polychrome(PolychromeController* controller_ptr);
|
||||
~RGBController_Polychrome();
|
||||
|
||||
void SetupZones();
|
||||
|
||||
void ResizeZone(int zone, int new_size);
|
||||
|
||||
void DeviceUpdateLEDs();
|
||||
void UpdateZoneLEDs(int zone);
|
||||
void UpdateSingleLED(int led);
|
||||
|
||||
void SetCustomMode();
|
||||
void DeviceUpdateMode();
|
||||
|
||||
private:
|
||||
PolychromeController* controller;
|
||||
};
|
||||
|
||||
@@ -76,11 +76,19 @@ void PolychromeUSBController::SetDeviceInfo()
|
||||
{
|
||||
if(configtable[zonecnt] == 0x1E)
|
||||
{
|
||||
break;
|
||||
/*-----------------------------------------------------------------------*\
|
||||
| If we don't have this device type (0x1E) we will skip it and continue. |
|
||||
\*-----------------------------------------------------------------------*/
|
||||
continue;
|
||||
}
|
||||
|
||||
newdev_info.num_leds = configtable[zonecnt];
|
||||
|
||||
/*--------------------------------------------------------------------------------------------------*\
|
||||
| We will need to know what zone type this is, so that we can look up the name and make calls later. |
|
||||
\*--------------------------------------------------------------------------------------------------*/
|
||||
newdev_info.zone_type = zonecnt;
|
||||
|
||||
switch (zonecnt)
|
||||
{
|
||||
/*-----------------------------------------*\
|
||||
@@ -124,6 +132,12 @@ void PolychromeUSBController::WriteZone
|
||||
bool allzone = false
|
||||
)
|
||||
{
|
||||
|
||||
/*----------------------------------------------------*\
|
||||
| Get the device info so we can look up the zone type. |
|
||||
\*----------------------------------------------------*/
|
||||
PolychromeDeviceInfo device_info = GetPolychromeDevices()[zone];
|
||||
|
||||
unsigned char usb_buf[65];
|
||||
|
||||
/*-----------------------------------------------------*\
|
||||
@@ -135,7 +149,7 @@ void PolychromeUSBController::WriteZone
|
||||
| Set up message packet with leading 00 |
|
||||
\*-----------------------------------------------------*/
|
||||
usb_buf[0x01] = POLYCHROME_USB_SET_ZONE;
|
||||
usb_buf[0x03] = zone;
|
||||
usb_buf[0x03] = device_info.zone_type;
|
||||
usb_buf[0x04] = mode;
|
||||
usb_buf[0x05] = RGBGetRValue(rgb);
|
||||
usb_buf[0x06] = RGBGetGValue(rgb);
|
||||
@@ -211,9 +225,13 @@ void PolychromeUSBController::WriteHeader
|
||||
|
||||
PolychromeZoneInfo PolychromeUSBController::GetZoneConfig(unsigned char zone)
|
||||
{
|
||||
/*-----------------------------------------------------*\
|
||||
| Get the device info so we can look up the zone type |
|
||||
\*-----------------------------------------------------*/
|
||||
PolychromeDeviceInfo device_info = GetPolychromeDevices()[zone];
|
||||
|
||||
unsigned char usb_buf[65];
|
||||
PolychromeZoneInfo zoneinfo;
|
||||
//unsigned char all;
|
||||
unsigned char r;
|
||||
unsigned char g;
|
||||
unsigned char b;
|
||||
@@ -227,7 +245,7 @@ PolychromeZoneInfo PolychromeUSBController::GetZoneConfig(unsigned char zone)
|
||||
| Set up config table request packet |
|
||||
\*-----------------------------------------------------*/
|
||||
usb_buf[0x01] = POLYCHROME_USB_READ_ZONE_CONFIG;
|
||||
usb_buf[0x03] = zone;
|
||||
usb_buf[0x03] = device_info.zone_type;
|
||||
|
||||
/*-----------------------------------------------------*\
|
||||
| Send packet |
|
||||
@@ -248,7 +266,6 @@ PolychromeZoneInfo PolychromeUSBController::GetZoneConfig(unsigned char zone)
|
||||
zoneinfo.color = ToRGBColor(r,g,b);
|
||||
zoneinfo.speed = usb_buf[0x08];
|
||||
zoneinfo.zone = usb_buf[0x03];
|
||||
//all = usb_buf[0x10];
|
||||
|
||||
return(zoneinfo);
|
||||
}
|
||||
|
||||
@@ -99,6 +99,7 @@ struct PolychromeDeviceInfo
|
||||
{
|
||||
unsigned char effect_channel;
|
||||
unsigned char num_leds;
|
||||
unsigned char zone_type;
|
||||
PolychromeDeviceType device_type;
|
||||
};
|
||||
|
||||
|
||||
@@ -13,15 +13,26 @@
|
||||
#define ASROCK_USB_MAX_ZONES 8
|
||||
#define ASROCK_ADDRESSABLE_MAX_LEDS 100
|
||||
|
||||
RGBController_PolychromeUSB::RGBController_PolychromeUSB(PolychromeUSBController* polychrome_ptr)
|
||||
{
|
||||
polychrome = polychrome_ptr;
|
||||
/**------------------------------------------------------------------*\
|
||||
@name ASrock Polychrome USB
|
||||
@type USB
|
||||
@save :warning:
|
||||
@direct :x:
|
||||
@effects :white_check_mark:
|
||||
@detectors DetectPolychromeUSBControllers
|
||||
@comment ASRock Polychrome controllers will save with each update.
|
||||
Per ARGB LED support is not possible with these devices.
|
||||
\*-------------------------------------------------------------------*/
|
||||
|
||||
name = polychrome->GetDeviceName();
|
||||
RGBController_PolychromeUSB::RGBController_PolychromeUSB(PolychromeUSBController* controller_ptr)
|
||||
{
|
||||
controller = controller_ptr;
|
||||
|
||||
name = controller->GetDeviceName();
|
||||
description = "ASRock Polychrome USB Device";
|
||||
vendor = "ASRock";
|
||||
type = DEVICE_TYPE_MOTHERBOARD;
|
||||
location = polychrome->GetDeviceLocation();
|
||||
location = controller->GetDeviceLocation();
|
||||
|
||||
mode Off;
|
||||
Off.name = "Off";
|
||||
@@ -176,27 +187,27 @@ void RGBController_PolychromeUSB::SetupZones()
|
||||
\*-------------------------------------------------*/
|
||||
leds.clear();
|
||||
colors.clear();
|
||||
zones.resize(polychrome->GetChannelCount());
|
||||
zones.resize(controller->GetChannelCount());
|
||||
|
||||
/*-------------------------------------------------*\
|
||||
| Set zones and leds |
|
||||
\*-------------------------------------------------*/
|
||||
for(unsigned int channel_idx = 0; channel_idx < zones.size(); channel_idx++)
|
||||
{
|
||||
PolychromeDeviceInfo device_info = polychrome->GetPolychromeDevices()[channel_idx];
|
||||
PolychromeDeviceInfo device_info = controller->GetPolychromeDevices()[channel_idx];
|
||||
|
||||
zones[channel_idx].type = ZONE_TYPE_LINEAR;
|
||||
|
||||
if(device_info.device_type== PolychromeDeviceType::ADDRESSABLE)
|
||||
{
|
||||
zones[channel_idx].name = polychrome_USB_zone_names[channel_idx];
|
||||
zones[channel_idx].name = polychrome_USB_zone_names[device_info.zone_type];
|
||||
zones[channel_idx].leds_min = 0;
|
||||
zones[channel_idx].leds_max = ASROCK_ADDRESSABLE_MAX_LEDS;
|
||||
zones[channel_idx].leds_count = device_info.num_leds;
|
||||
}
|
||||
else if(device_info.device_type==PolychromeDeviceType::FIXED)
|
||||
{
|
||||
zones[channel_idx].name = polychrome_USB_zone_names[channel_idx];
|
||||
zones[channel_idx].name = polychrome_USB_zone_names[device_info.zone_type];
|
||||
zones[channel_idx].leds_min = device_info.num_leds;
|
||||
zones[channel_idx].leds_max = device_info.num_leds;
|
||||
zones[channel_idx].leds_count = device_info.num_leds;
|
||||
@@ -226,7 +237,7 @@ void RGBController_PolychromeUSB::SetupZones()
|
||||
{
|
||||
unsigned char led = (unsigned char)leds[led_idx].value;
|
||||
|
||||
colors[led_idx] = polychrome->GetZoneConfig(led).color; // TODO Get addressable instead of zone idx
|
||||
colors[led_idx] = controller->GetZoneConfig(led).color; // TODO Get addressable instead of zone idx
|
||||
}
|
||||
|
||||
/*---------------------------------------------------------*\
|
||||
@@ -236,7 +247,7 @@ void RGBController_PolychromeUSB::SetupZones()
|
||||
for (unsigned int channel_idx = 0; channel_idx < zones.size(); channel_idx++)
|
||||
{
|
||||
PolychromeZoneInfo zoneinfo;
|
||||
zoneinfo = polychrome->GetZoneConfig(channel_idx);
|
||||
zoneinfo = controller->GetZoneConfig(channel_idx);
|
||||
zones_info.push_back(zoneinfo);
|
||||
}
|
||||
|
||||
@@ -273,7 +284,7 @@ void RGBController_PolychromeUSB::DeviceUpdateLEDs()
|
||||
set_mode = active_mode;
|
||||
}
|
||||
|
||||
polychrome->WriteZone(zone_idx, set_mode, zones_info[zone_idx].speed, zones[zone_idx].colors[0], false);
|
||||
controller->WriteZone(zone_idx, set_mode, zones_info[zone_idx].speed, zones[zone_idx].colors[0], false);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -286,7 +297,7 @@ void RGBController_PolychromeUSB::UpdateZoneLEDs(int zone)
|
||||
set_mode = active_mode;
|
||||
}
|
||||
|
||||
polychrome->WriteZone(zone, set_mode, zones_info[zone].speed, zones[zone].colors[0], false);
|
||||
controller->WriteZone(zone, set_mode, zones_info[zone].speed, zones[zone].colors[0], false);
|
||||
}
|
||||
|
||||
void RGBController_PolychromeUSB::UpdateSingleLED(int led)
|
||||
@@ -299,14 +310,14 @@ void RGBController_PolychromeUSB::UpdateSingleLED(int led)
|
||||
set_mode = active_mode;
|
||||
}
|
||||
|
||||
polychrome->WriteZone(channel, set_mode, zones_info[channel].speed, zones[channel].colors[0], false);
|
||||
controller->WriteZone(channel, set_mode, zones_info[channel].speed, zones[channel].colors[0], false);
|
||||
}
|
||||
|
||||
unsigned char RGBController_PolychromeUSB::GetDeviceMode(unsigned char zone)
|
||||
{
|
||||
int dev_mode;
|
||||
|
||||
dev_mode = polychrome->GetZoneConfig(zone).mode;
|
||||
dev_mode = controller->GetZoneConfig(zone).mode;
|
||||
active_mode = dev_mode;
|
||||
|
||||
return(active_mode);
|
||||
@@ -332,7 +343,7 @@ void RGBController_PolychromeUSB::DeviceUpdateMode()
|
||||
set_mode = active_mode;
|
||||
}
|
||||
|
||||
polychrome->WriteZone(zone_idx, set_mode, zones_info[zone_idx].speed, zones[zone_idx].colors[0], false);
|
||||
controller->WriteZone(zone_idx, set_mode, zones_info[zone_idx].speed, zones[zone_idx].colors[0], false);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
class RGBController_PolychromeUSB : public RGBController
|
||||
{
|
||||
public:
|
||||
RGBController_PolychromeUSB(PolychromeUSBController* polychrome_ptr);
|
||||
RGBController_PolychromeUSB(PolychromeUSBController* controller_ptr);
|
||||
|
||||
void SetupZones();
|
||||
|
||||
@@ -30,7 +30,7 @@ public:
|
||||
|
||||
private:
|
||||
bool initializedMode;
|
||||
PolychromeUSBController* polychrome;
|
||||
PolychromeUSBController* controller;
|
||||
std::vector<PolychromeZoneInfo> zones_info;
|
||||
|
||||
unsigned char GetDeviceMode(unsigned char zone);
|
||||
|
||||
@@ -12,17 +12,27 @@
|
||||
#include <thread>
|
||||
#include <chrono>
|
||||
|
||||
RGBController_Alienware::RGBController_Alienware(AlienwareController* alienware_ptr)
|
||||
{
|
||||
alienware = alienware_ptr;
|
||||
/**------------------------------------------------------------------*\
|
||||
@name Alienware
|
||||
@type USB
|
||||
@save :x:
|
||||
@direct :x:
|
||||
@effects :white_check_mark:
|
||||
@detectors DetectAlienwareControllers
|
||||
@comment
|
||||
\*-------------------------------------------------------------------*/
|
||||
|
||||
name = alienware->GetDeviceName();
|
||||
RGBController_Alienware::RGBController_Alienware(AlienwareController* controller_ptr)
|
||||
{
|
||||
controller = controller_ptr;
|
||||
|
||||
name = controller->GetDeviceName();
|
||||
vendor = "Alienware";
|
||||
type = DEVICE_TYPE_KEYBOARD;
|
||||
description = "Alienware USB Device";
|
||||
location = alienware->GetDeviceLocation();
|
||||
serial = alienware->GetSerialString();
|
||||
version = alienware->GetFirmwareVersion();
|
||||
location = controller->GetDeviceLocation();
|
||||
serial = controller->GetSerialString();
|
||||
version = controller->GetFirmwareVersion();
|
||||
|
||||
mode Color;
|
||||
Color.name = "Static";
|
||||
@@ -56,7 +66,7 @@ RGBController_Alienware::RGBController_Alienware(AlienwareController* alienware_
|
||||
Morph.value = ALIENWARE_MODE_MORPH;
|
||||
Morph.flags = MODE_FLAG_HAS_MODE_SPECIFIC_COLOR | MODE_FLAG_HAS_BRIGHTNESS | MODE_FLAG_HAS_SPEED;
|
||||
Morph.color_mode = MODE_COLORS_MODE_SPECIFIC;
|
||||
Morph.colors_min = 2 * alienware->GetZoneCount();
|
||||
Morph.colors_min = 2 * controller->GetZoneCount();
|
||||
Morph.colors_max = Morph.colors_min;
|
||||
Morph.colors.resize(Morph.colors_max);
|
||||
Morph.speed_min = ALIENWARE_TEMPO_MIN;
|
||||
@@ -110,7 +120,7 @@ RGBController_Alienware::RGBController_Alienware(AlienwareController* alienware_
|
||||
|
||||
SetupZones();
|
||||
|
||||
alienware->UpdateDim();
|
||||
controller->UpdateDim();
|
||||
}
|
||||
|
||||
void RGBController_Alienware::SetupZones()
|
||||
@@ -118,9 +128,9 @@ void RGBController_Alienware::SetupZones()
|
||||
/*-------------------------------------------------*\
|
||||
| Set zones and leds |
|
||||
\*-------------------------------------------------*/
|
||||
std::vector<const char*> zone_names = alienware->GetZoneNames();
|
||||
std::vector<const char*> zone_names = controller->GetZoneNames();
|
||||
|
||||
for(unsigned int zone_idx = 0; zone_idx < alienware->GetZoneCount(); zone_idx++)
|
||||
for(unsigned int zone_idx = 0; zone_idx < controller->GetZoneCount(); zone_idx++)
|
||||
{
|
||||
zone new_zone;
|
||||
|
||||
@@ -217,43 +227,43 @@ void RGBController_Alienware::DeviceUpdateMode()
|
||||
\*-------------------------------------------------*/
|
||||
uint16_t period = 0x07d0;
|
||||
|
||||
alienware->SetMode(zone_idx, current_mode.value);
|
||||
controller->SetMode(zone_idx, current_mode.value);
|
||||
|
||||
switch(current_mode_idx)
|
||||
{
|
||||
case ALIENWARE_MODE_COLOR:
|
||||
alienware->SetPeriod(zone_idx, period);
|
||||
alienware->SetColor( zone_idx, colors[current_zone.start_idx]);
|
||||
alienware->SetTempo( zone_idx, ALIENWARE_TEMPO_MAX);
|
||||
alienware->SetDim( zone_idx, modes[current_mode_idx].brightness);
|
||||
controller->SetPeriod(zone_idx, period);
|
||||
controller->SetColor( zone_idx, colors[current_zone.start_idx]);
|
||||
controller->SetTempo( zone_idx, ALIENWARE_TEMPO_MAX);
|
||||
controller->SetDim( zone_idx, modes[current_mode_idx].brightness);
|
||||
break;
|
||||
|
||||
case ALIENWARE_MODE_PULSE:
|
||||
alienware->SetPeriod(zone_idx, period);
|
||||
alienware->SetColor( zone_idx, colors[current_zone.start_idx]);
|
||||
alienware->SetTempo( zone_idx, current_mode.speed);
|
||||
alienware->SetDim( zone_idx, modes[current_mode_idx].brightness);
|
||||
controller->SetPeriod(zone_idx, period);
|
||||
controller->SetColor( zone_idx, colors[current_zone.start_idx]);
|
||||
controller->SetTempo( zone_idx, current_mode.speed);
|
||||
controller->SetDim( zone_idx, modes[current_mode_idx].brightness);
|
||||
break;
|
||||
|
||||
case ALIENWARE_MODE_MORPH:
|
||||
alienware->SetPeriod(zone_idx, period);
|
||||
alienware->SetColor( zone_idx, current_mode.colors[zone_idx * 2], current_mode.colors[(zone_idx * 2) + 1]);
|
||||
alienware->SetTempo( zone_idx, current_mode.speed);
|
||||
alienware->SetDim( zone_idx, modes[current_mode_idx].brightness);
|
||||
controller->SetPeriod(zone_idx, period);
|
||||
controller->SetColor( zone_idx, current_mode.colors[zone_idx * 2], current_mode.colors[(zone_idx * 2) + 1]);
|
||||
controller->SetTempo( zone_idx, current_mode.speed);
|
||||
controller->SetDim( zone_idx, modes[current_mode_idx].brightness);
|
||||
break;
|
||||
|
||||
case ALIENWARE_MODE_SPECTRUM:
|
||||
case ALIENWARE_MODE_RAINBOW:
|
||||
alienware->SetPeriod(zone_idx, ALIENWARE_DURATION_SPECTRUM);
|
||||
alienware->SetTempo( zone_idx, current_mode.speed);
|
||||
alienware->SetDim( zone_idx, modes[current_mode_idx].brightness);
|
||||
controller->SetPeriod(zone_idx, ALIENWARE_DURATION_SPECTRUM);
|
||||
controller->SetTempo( zone_idx, current_mode.speed);
|
||||
controller->SetDim( zone_idx, modes[current_mode_idx].brightness);
|
||||
break;
|
||||
|
||||
case ALIENWARE_MODE_BREATHING:
|
||||
alienware->SetPeriod(zone_idx, period);
|
||||
alienware->SetColor( zone_idx, colors[current_zone.start_idx], 0x0);
|
||||
alienware->SetTempo( zone_idx, current_mode.speed);
|
||||
alienware->SetDim( zone_idx, modes[current_mode_idx].brightness);
|
||||
controller->SetPeriod(zone_idx, period);
|
||||
controller->SetColor( zone_idx, colors[current_zone.start_idx], 0x0);
|
||||
controller->SetTempo( zone_idx, current_mode.speed);
|
||||
controller->SetDim( zone_idx, modes[current_mode_idx].brightness);
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -262,7 +272,7 @@ void RGBController_Alienware::DeviceUpdateMode()
|
||||
| Due to rate-limiting, this can take more than one |
|
||||
| second to execute |
|
||||
\*-----------------------------------------------------*/
|
||||
alienware->UpdateController();
|
||||
controller->UpdateController();
|
||||
|
||||
/*-----------------------------------------------------*\
|
||||
| Re-run update if there's anything that's changed from |
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
class RGBController_Alienware : public RGBController
|
||||
{
|
||||
public:
|
||||
RGBController_Alienware(AlienwareController* alienware_ptr);
|
||||
RGBController_Alienware(AlienwareController* controller_ptr);
|
||||
|
||||
void SetupZones();
|
||||
|
||||
@@ -32,6 +32,6 @@ public:
|
||||
void SetCustomMode();
|
||||
|
||||
private:
|
||||
AlienwareController* alienware;
|
||||
AlienwareController* controller;
|
||||
std::chrono::steady_clock::time_point last_packet_ts;
|
||||
};
|
||||
|
||||
@@ -7,6 +7,7 @@
|
||||
| Mohamad Sallal - msallal 05/22/2021 |
|
||||
\*-----------------------------------------*/
|
||||
|
||||
#include "RGBControllerKeyNames.h"
|
||||
#include "RGBController_AlienwareAW510K.h"
|
||||
#include <iterator>
|
||||
|
||||
@@ -49,124 +50,134 @@ typedef struct
|
||||
static const led_type led_names[] =
|
||||
{
|
||||
/* Key Label Zone, Index */
|
||||
{ "Key: Escape", ALIENWARE_AW510K_ZONE_DIRECT_KEYBOARD, 0xB0 },
|
||||
{ "Key: F1", ALIENWARE_AW510K_ZONE_DIRECT_KEYBOARD, 0x98 },
|
||||
{ "Key: F2", ALIENWARE_AW510K_ZONE_DIRECT_KEYBOARD, 0x90 },
|
||||
{ "Key: F3", ALIENWARE_AW510K_ZONE_DIRECT_KEYBOARD, 0x88 },
|
||||
{ "Key: F4", ALIENWARE_AW510K_ZONE_DIRECT_KEYBOARD, 0x80 },
|
||||
{ "Key: F5", ALIENWARE_AW510K_ZONE_DIRECT_KEYBOARD, 0x70 },
|
||||
{ "Key: F6", ALIENWARE_AW510K_ZONE_DIRECT_KEYBOARD, 0x68 },
|
||||
{ "Key: F7", ALIENWARE_AW510K_ZONE_DIRECT_KEYBOARD, 0x60 },
|
||||
{ "Key: F8", ALIENWARE_AW510K_ZONE_DIRECT_KEYBOARD, 0x58 },
|
||||
{ "Key: F9", ALIENWARE_AW510K_ZONE_DIRECT_KEYBOARD, 0x50 },
|
||||
{ "Key: F10", ALIENWARE_AW510K_ZONE_DIRECT_KEYBOARD, 0x48 },
|
||||
{ "Key: F11", ALIENWARE_AW510K_ZONE_DIRECT_KEYBOARD, 0x40 },
|
||||
{ "Key: F12", ALIENWARE_AW510K_ZONE_DIRECT_KEYBOARD, 0x38 },
|
||||
{ "Key: Print Screen", ALIENWARE_AW510K_ZONE_DIRECT_KEYBOARD, 0x30 },
|
||||
{ "Key: Scroll Lock", ALIENWARE_AW510K_ZONE_DIRECT_KEYBOARD, 0x28 },
|
||||
{ "Key: Pause/Break", ALIENWARE_AW510K_ZONE_DIRECT_KEYBOARD, 0x20 },
|
||||
{ "Key: Media Mute", ALIENWARE_AW510K_ZONE_DIRECT_MEDIA, 0x18 },
|
||||
{ "Key: `", ALIENWARE_AW510K_ZONE_DIRECT_KEYBOARD, 0xB1 },
|
||||
{ "Key: 1", ALIENWARE_AW510K_ZONE_DIRECT_KEYBOARD, 0xA1 },
|
||||
{ "Key: 2", ALIENWARE_AW510K_ZONE_DIRECT_KEYBOARD, 0x99 },
|
||||
{ "Key: 3", ALIENWARE_AW510K_ZONE_DIRECT_KEYBOARD, 0x91 },
|
||||
{ "Key: 4", ALIENWARE_AW510K_ZONE_DIRECT_KEYBOARD, 0x89 },
|
||||
{ "Key: 5", ALIENWARE_AW510K_ZONE_DIRECT_KEYBOARD, 0x81 },
|
||||
{ "Key: 6", ALIENWARE_AW510K_ZONE_DIRECT_KEYBOARD, 0x79 },
|
||||
{ "Key: 7", ALIENWARE_AW510K_ZONE_DIRECT_KEYBOARD, 0x71 },
|
||||
{ "Key: 8", ALIENWARE_AW510K_ZONE_DIRECT_KEYBOARD, 0x69 },
|
||||
{ "Key: 9", ALIENWARE_AW510K_ZONE_DIRECT_KEYBOARD, 0x61 },
|
||||
{ "Key: 0", ALIENWARE_AW510K_ZONE_DIRECT_KEYBOARD, 0x59 },
|
||||
{ "Key: -", ALIENWARE_AW510K_ZONE_DIRECT_KEYBOARD, 0x51 },
|
||||
{ "Key: =", ALIENWARE_AW510K_ZONE_DIRECT_KEYBOARD, 0x49 },
|
||||
{ "Key: Backspace", ALIENWARE_AW510K_ZONE_DIRECT_KEYBOARD, 0x39 },
|
||||
{ "Key: Insert", ALIENWARE_AW510K_ZONE_DIRECT_KEYBOARD, 0x31 },
|
||||
{ "Key: Home", ALIENWARE_AW510K_ZONE_DIRECT_KEYBOARD, 0x29 },
|
||||
{ "Key: Page Up", ALIENWARE_AW510K_ZONE_DIRECT_KEYBOARD, 0x21 },
|
||||
{ "Key: Num Lock", ALIENWARE_AW510K_ZONE_DIRECT_KEYBOARD, 0x19 },
|
||||
{ "Key: Number Pad /", ALIENWARE_AW510K_ZONE_DIRECT_KEYBOARD, 0x11 },
|
||||
{ "Key: Number Pad *", ALIENWARE_AW510K_ZONE_DIRECT_KEYBOARD, 0x09 },
|
||||
{ "Key: Number Pad -", ALIENWARE_AW510K_ZONE_DIRECT_KEYBOARD, 0x01 },
|
||||
{ "Key: Tab", ALIENWARE_AW510K_ZONE_DIRECT_KEYBOARD, 0xB2 },
|
||||
{ "Key: Q", ALIENWARE_AW510K_ZONE_DIRECT_KEYBOARD, 0xA2 },
|
||||
{ "Key: W", ALIENWARE_AW510K_ZONE_DIRECT_KEYBOARD, 0x9A },
|
||||
{ "Key: E", ALIENWARE_AW510K_ZONE_DIRECT_KEYBOARD, 0x92 },
|
||||
{ "Key: R", ALIENWARE_AW510K_ZONE_DIRECT_KEYBOARD, 0x8A },
|
||||
{ "Key: T", ALIENWARE_AW510K_ZONE_DIRECT_KEYBOARD, 0x82 },
|
||||
{ "Key: Y", ALIENWARE_AW510K_ZONE_DIRECT_KEYBOARD, 0x7A },
|
||||
{ "Key: U", ALIENWARE_AW510K_ZONE_DIRECT_KEYBOARD, 0x72 },
|
||||
{ "Key: I", ALIENWARE_AW510K_ZONE_DIRECT_KEYBOARD, 0x6A },
|
||||
{ "Key: O", ALIENWARE_AW510K_ZONE_DIRECT_KEYBOARD, 0x62 },
|
||||
{ "Key: P", ALIENWARE_AW510K_ZONE_DIRECT_KEYBOARD, 0x5A },
|
||||
{ "Key: [", ALIENWARE_AW510K_ZONE_DIRECT_KEYBOARD, 0x52 },
|
||||
{ "Key: ]", ALIENWARE_AW510K_ZONE_DIRECT_KEYBOARD, 0x4A },
|
||||
{ "Key: \\ (ANSI)", ALIENWARE_AW510K_ZONE_DIRECT_KEYBOARD, 0x42 },//ANSI only
|
||||
{ "Key: Delete", ALIENWARE_AW510K_ZONE_DIRECT_KEYBOARD, 0x32 },
|
||||
{ "Key: End", ALIENWARE_AW510K_ZONE_DIRECT_KEYBOARD, 0x2A },
|
||||
{ "Key: Page Down", ALIENWARE_AW510K_ZONE_DIRECT_KEYBOARD, 0x22 },
|
||||
{ "Key: Number Pad 7", ALIENWARE_AW510K_ZONE_DIRECT_KEYBOARD, 0x1A },
|
||||
{ "Key: Number Pad 8", ALIENWARE_AW510K_ZONE_DIRECT_KEYBOARD, 0x12 },
|
||||
{ "Key: Number Pad 9", ALIENWARE_AW510K_ZONE_DIRECT_KEYBOARD, 0x0A },
|
||||
{ "Key: Caps Lock", ALIENWARE_AW510K_ZONE_DIRECT_KEYBOARD, 0xB3 },
|
||||
{ "Key: A", ALIENWARE_AW510K_ZONE_DIRECT_KEYBOARD, 0xA3 },
|
||||
{ "Key: S", ALIENWARE_AW510K_ZONE_DIRECT_KEYBOARD, 0x9B },
|
||||
{ "Key: D", ALIENWARE_AW510K_ZONE_DIRECT_KEYBOARD, 0x93 },
|
||||
{ "Key: F", ALIENWARE_AW510K_ZONE_DIRECT_KEYBOARD, 0x8B },
|
||||
{ "Key: G", ALIENWARE_AW510K_ZONE_DIRECT_KEYBOARD, 0x83 },
|
||||
{ "Key: H", ALIENWARE_AW510K_ZONE_DIRECT_KEYBOARD, 0x7B },
|
||||
{ "Key: J", ALIENWARE_AW510K_ZONE_DIRECT_KEYBOARD, 0x73 },
|
||||
{ "Key: K", ALIENWARE_AW510K_ZONE_DIRECT_KEYBOARD, 0x6B },
|
||||
{ "Key: L", ALIENWARE_AW510K_ZONE_DIRECT_KEYBOARD, 0x63 },
|
||||
{ "Key: ;", ALIENWARE_AW510K_ZONE_DIRECT_KEYBOARD, 0x5B },
|
||||
{ "Key: '", ALIENWARE_AW510K_ZONE_DIRECT_KEYBOARD, 0x53 },
|
||||
{ "Key: Enter", ALIENWARE_AW510K_ZONE_DIRECT_KEYBOARD, 0x43 },
|
||||
{ "Key: Number Pad 4", ALIENWARE_AW510K_ZONE_DIRECT_KEYBOARD, 0x1B },
|
||||
{ "Key: Number Pad 5", ALIENWARE_AW510K_ZONE_DIRECT_KEYBOARD, 0x13 },
|
||||
{ "Key: Number Pad 6", ALIENWARE_AW510K_ZONE_DIRECT_KEYBOARD, 0x0B },
|
||||
{ "Key: Number Pad +", ALIENWARE_AW510K_ZONE_DIRECT_KEYBOARD, 0x03 },
|
||||
{ "Key: Left Shift", ALIENWARE_AW510K_ZONE_DIRECT_KEYBOARD, 0xB4 },
|
||||
{ "Key: Z", ALIENWARE_AW510K_ZONE_DIRECT_KEYBOARD, 0xA4 },
|
||||
{ "Key: X", ALIENWARE_AW510K_ZONE_DIRECT_KEYBOARD, 0x9C },
|
||||
{ "Key: C", ALIENWARE_AW510K_ZONE_DIRECT_KEYBOARD, 0x94 },
|
||||
{ "Key: V", ALIENWARE_AW510K_ZONE_DIRECT_KEYBOARD, 0x8C },
|
||||
{ "Key: B", ALIENWARE_AW510K_ZONE_DIRECT_KEYBOARD, 0x84 },
|
||||
{ "Key: N", ALIENWARE_AW510K_ZONE_DIRECT_KEYBOARD, 0x7C },
|
||||
{ "Key: M", ALIENWARE_AW510K_ZONE_DIRECT_KEYBOARD, 0x74 },
|
||||
{ "Key: ,", ALIENWARE_AW510K_ZONE_DIRECT_KEYBOARD, 0x6C },
|
||||
{ "Key: .", ALIENWARE_AW510K_ZONE_DIRECT_KEYBOARD, 0x64 },
|
||||
{ "Key: /", ALIENWARE_AW510K_ZONE_DIRECT_KEYBOARD, 0x5C },
|
||||
{ "Key: Right Shift", ALIENWARE_AW510K_ZONE_DIRECT_KEYBOARD, 0x4C },
|
||||
{ "Key: Up Arrow", ALIENWARE_AW510K_ZONE_DIRECT_KEYBOARD, 0x2C },
|
||||
{ "Key: Number Pad 1", ALIENWARE_AW510K_ZONE_DIRECT_KEYBOARD, 0x1C },
|
||||
{ "Key: Number Pad 2", ALIENWARE_AW510K_ZONE_DIRECT_KEYBOARD, 0x14 },
|
||||
{ "Key: Number Pad 3", ALIENWARE_AW510K_ZONE_DIRECT_KEYBOARD, 0x0C },
|
||||
{ "Key: Left Control", ALIENWARE_AW510K_ZONE_DIRECT_KEYBOARD, 0xB5 },
|
||||
{ "Key: Left Windows", ALIENWARE_AW510K_ZONE_DIRECT_KEYBOARD, 0xAD },
|
||||
{ "Key: Left Alt", ALIENWARE_AW510K_ZONE_DIRECT_KEYBOARD, 0xA5 },
|
||||
{ "Key: Space", ALIENWARE_AW510K_ZONE_DIRECT_KEYBOARD, 0x85 },
|
||||
{ "Key: Right Alt", ALIENWARE_AW510K_ZONE_DIRECT_KEYBOARD, 0x65 },
|
||||
{ "Key: Right Fn", ALIENWARE_AW510K_ZONE_DIRECT_KEYBOARD, 0x5D },
|
||||
{ "Key: Menu", ALIENWARE_AW510K_ZONE_DIRECT_KEYBOARD, 0x55 },
|
||||
{ "Key: Right Control", ALIENWARE_AW510K_ZONE_DIRECT_KEYBOARD, 0x4D },
|
||||
{ "Key: Left Arrow", ALIENWARE_AW510K_ZONE_DIRECT_KEYBOARD, 0x35 },
|
||||
{ "Key: Down Arrow", ALIENWARE_AW510K_ZONE_DIRECT_KEYBOARD, 0x2D },
|
||||
{ "Key: Right Arrow", ALIENWARE_AW510K_ZONE_DIRECT_KEYBOARD, 0x25 },
|
||||
{ "Key: Number Pad 0", ALIENWARE_AW510K_ZONE_DIRECT_KEYBOARD, 0x1D },
|
||||
{ "Key: Number Pad .", ALIENWARE_AW510K_ZONE_DIRECT_KEYBOARD, 0x0D },
|
||||
{ "Key: Number Pad Enter", ALIENWARE_AW510K_ZONE_DIRECT_KEYBOARD, 0x05 },
|
||||
{ KEY_EN_ESCAPE, ALIENWARE_AW510K_ZONE_DIRECT_KEYBOARD, 0xB0 },
|
||||
{ KEY_EN_F1, ALIENWARE_AW510K_ZONE_DIRECT_KEYBOARD, 0x98 },
|
||||
{ KEY_EN_F2, ALIENWARE_AW510K_ZONE_DIRECT_KEYBOARD, 0x90 },
|
||||
{ KEY_EN_F3, ALIENWARE_AW510K_ZONE_DIRECT_KEYBOARD, 0x88 },
|
||||
{ KEY_EN_F4, ALIENWARE_AW510K_ZONE_DIRECT_KEYBOARD, 0x80 },
|
||||
{ KEY_EN_F5, ALIENWARE_AW510K_ZONE_DIRECT_KEYBOARD, 0x70 },
|
||||
{ KEY_EN_F6, ALIENWARE_AW510K_ZONE_DIRECT_KEYBOARD, 0x68 },
|
||||
{ KEY_EN_F7, ALIENWARE_AW510K_ZONE_DIRECT_KEYBOARD, 0x60 },
|
||||
{ KEY_EN_F8, ALIENWARE_AW510K_ZONE_DIRECT_KEYBOARD, 0x58 },
|
||||
{ KEY_EN_F9, ALIENWARE_AW510K_ZONE_DIRECT_KEYBOARD, 0x50 },
|
||||
{ KEY_EN_F10, ALIENWARE_AW510K_ZONE_DIRECT_KEYBOARD, 0x48 },
|
||||
{ KEY_EN_F11, ALIENWARE_AW510K_ZONE_DIRECT_KEYBOARD, 0x40 },
|
||||
{ KEY_EN_F12, ALIENWARE_AW510K_ZONE_DIRECT_KEYBOARD, 0x38 },
|
||||
{ KEY_EN_PRINT_SCREEN, ALIENWARE_AW510K_ZONE_DIRECT_KEYBOARD, 0x30 },
|
||||
{ KEY_EN_SCROLL_LOCK, ALIENWARE_AW510K_ZONE_DIRECT_KEYBOARD, 0x28 },
|
||||
{ KEY_EN_PAUSE_BREAK, ALIENWARE_AW510K_ZONE_DIRECT_KEYBOARD, 0x20 },
|
||||
{ KEY_EN_MEDIA_MUTE, ALIENWARE_AW510K_ZONE_DIRECT_MEDIA, 0x18 },
|
||||
{ KEY_EN_BACK_TICK, ALIENWARE_AW510K_ZONE_DIRECT_KEYBOARD, 0xB1 },
|
||||
{ KEY_EN_1, ALIENWARE_AW510K_ZONE_DIRECT_KEYBOARD, 0xA1 },
|
||||
{ KEY_EN_2, ALIENWARE_AW510K_ZONE_DIRECT_KEYBOARD, 0x99 },
|
||||
{ KEY_EN_3, ALIENWARE_AW510K_ZONE_DIRECT_KEYBOARD, 0x91 },
|
||||
{ KEY_EN_4, ALIENWARE_AW510K_ZONE_DIRECT_KEYBOARD, 0x89 },
|
||||
{ KEY_EN_5, ALIENWARE_AW510K_ZONE_DIRECT_KEYBOARD, 0x81 },
|
||||
{ KEY_EN_6, ALIENWARE_AW510K_ZONE_DIRECT_KEYBOARD, 0x79 },
|
||||
{ KEY_EN_7, ALIENWARE_AW510K_ZONE_DIRECT_KEYBOARD, 0x71 },
|
||||
{ KEY_EN_8, ALIENWARE_AW510K_ZONE_DIRECT_KEYBOARD, 0x69 },
|
||||
{ KEY_EN_9, ALIENWARE_AW510K_ZONE_DIRECT_KEYBOARD, 0x61 },
|
||||
{ KEY_EN_0, ALIENWARE_AW510K_ZONE_DIRECT_KEYBOARD, 0x59 },
|
||||
{ KEY_EN_MINUS, ALIENWARE_AW510K_ZONE_DIRECT_KEYBOARD, 0x51 },
|
||||
{ KEY_EN_EQUALS, ALIENWARE_AW510K_ZONE_DIRECT_KEYBOARD, 0x49 },
|
||||
{ KEY_EN_BACKSPACE, ALIENWARE_AW510K_ZONE_DIRECT_KEYBOARD, 0x39 },
|
||||
{ KEY_EN_INSERT, ALIENWARE_AW510K_ZONE_DIRECT_KEYBOARD, 0x31 },
|
||||
{ KEY_EN_HOME, ALIENWARE_AW510K_ZONE_DIRECT_KEYBOARD, 0x29 },
|
||||
{ KEY_EN_PAGE_UP, ALIENWARE_AW510K_ZONE_DIRECT_KEYBOARD, 0x21 },
|
||||
{ KEY_EN_NUMPAD_LOCK, ALIENWARE_AW510K_ZONE_DIRECT_KEYBOARD, 0x19 },
|
||||
{ KEY_EN_NUMPAD_DIVIDE, ALIENWARE_AW510K_ZONE_DIRECT_KEYBOARD, 0x11 },
|
||||
{ KEY_EN_NUMPAD_TIMES, ALIENWARE_AW510K_ZONE_DIRECT_KEYBOARD, 0x09 },
|
||||
{ KEY_EN_NUMPAD_MINUS, ALIENWARE_AW510K_ZONE_DIRECT_KEYBOARD, 0x01 },
|
||||
{ KEY_EN_TAB, ALIENWARE_AW510K_ZONE_DIRECT_KEYBOARD, 0xB2 },
|
||||
{ KEY_EN_Q, ALIENWARE_AW510K_ZONE_DIRECT_KEYBOARD, 0xA2 },
|
||||
{ KEY_EN_W, ALIENWARE_AW510K_ZONE_DIRECT_KEYBOARD, 0x9A },
|
||||
{ KEY_EN_E, ALIENWARE_AW510K_ZONE_DIRECT_KEYBOARD, 0x92 },
|
||||
{ KEY_EN_R, ALIENWARE_AW510K_ZONE_DIRECT_KEYBOARD, 0x8A },
|
||||
{ KEY_EN_T, ALIENWARE_AW510K_ZONE_DIRECT_KEYBOARD, 0x82 },
|
||||
{ KEY_EN_Y, ALIENWARE_AW510K_ZONE_DIRECT_KEYBOARD, 0x7A },
|
||||
{ KEY_EN_U, ALIENWARE_AW510K_ZONE_DIRECT_KEYBOARD, 0x72 },
|
||||
{ KEY_EN_I, ALIENWARE_AW510K_ZONE_DIRECT_KEYBOARD, 0x6A },
|
||||
{ KEY_EN_O, ALIENWARE_AW510K_ZONE_DIRECT_KEYBOARD, 0x62 },
|
||||
{ KEY_EN_P, ALIENWARE_AW510K_ZONE_DIRECT_KEYBOARD, 0x5A },
|
||||
{ KEY_EN_LEFT_BRACKET, ALIENWARE_AW510K_ZONE_DIRECT_KEYBOARD, 0x52 },
|
||||
{ KEY_EN_RIGHT_BRACKET, ALIENWARE_AW510K_ZONE_DIRECT_KEYBOARD, 0x4A },
|
||||
{ KEY_EN_ANSI_BACK_SLASH, ALIENWARE_AW510K_ZONE_DIRECT_KEYBOARD, 0x42 },//ANSI only
|
||||
{ KEY_EN_DELETE, ALIENWARE_AW510K_ZONE_DIRECT_KEYBOARD, 0x32 },
|
||||
{ KEY_EN_END, ALIENWARE_AW510K_ZONE_DIRECT_KEYBOARD, 0x2A },
|
||||
{ KEY_EN_PAGE_DOWN, ALIENWARE_AW510K_ZONE_DIRECT_KEYBOARD, 0x22 },
|
||||
{ KEY_EN_NUMPAD_7, ALIENWARE_AW510K_ZONE_DIRECT_KEYBOARD, 0x1A },
|
||||
{ KEY_EN_NUMPAD_8, ALIENWARE_AW510K_ZONE_DIRECT_KEYBOARD, 0x12 },
|
||||
{ KEY_EN_NUMPAD_9, ALIENWARE_AW510K_ZONE_DIRECT_KEYBOARD, 0x0A },
|
||||
{ KEY_EN_CAPS_LOCK, ALIENWARE_AW510K_ZONE_DIRECT_KEYBOARD, 0xB3 },
|
||||
{ KEY_EN_A, ALIENWARE_AW510K_ZONE_DIRECT_KEYBOARD, 0xA3 },
|
||||
{ KEY_EN_S, ALIENWARE_AW510K_ZONE_DIRECT_KEYBOARD, 0x9B },
|
||||
{ KEY_EN_D, ALIENWARE_AW510K_ZONE_DIRECT_KEYBOARD, 0x93 },
|
||||
{ KEY_EN_F, ALIENWARE_AW510K_ZONE_DIRECT_KEYBOARD, 0x8B },
|
||||
{ KEY_EN_G, ALIENWARE_AW510K_ZONE_DIRECT_KEYBOARD, 0x83 },
|
||||
{ KEY_EN_H, ALIENWARE_AW510K_ZONE_DIRECT_KEYBOARD, 0x7B },
|
||||
{ KEY_EN_J, ALIENWARE_AW510K_ZONE_DIRECT_KEYBOARD, 0x73 },
|
||||
{ KEY_EN_K, ALIENWARE_AW510K_ZONE_DIRECT_KEYBOARD, 0x6B },
|
||||
{ KEY_EN_L, ALIENWARE_AW510K_ZONE_DIRECT_KEYBOARD, 0x63 },
|
||||
{ KEY_EN_SEMICOLON, ALIENWARE_AW510K_ZONE_DIRECT_KEYBOARD, 0x5B },
|
||||
{ KEY_EN_QUOTE, ALIENWARE_AW510K_ZONE_DIRECT_KEYBOARD, 0x53 },
|
||||
{ KEY_EN_ANSI_ENTER, ALIENWARE_AW510K_ZONE_DIRECT_KEYBOARD, 0x43 },
|
||||
{ KEY_EN_NUMPAD_4, ALIENWARE_AW510K_ZONE_DIRECT_KEYBOARD, 0x1B },
|
||||
{ KEY_EN_NUMPAD_5, ALIENWARE_AW510K_ZONE_DIRECT_KEYBOARD, 0x13 },
|
||||
{ KEY_EN_NUMPAD_6, ALIENWARE_AW510K_ZONE_DIRECT_KEYBOARD, 0x0B },
|
||||
{ KEY_EN_NUMPAD_PLUS, ALIENWARE_AW510K_ZONE_DIRECT_KEYBOARD, 0x03 },
|
||||
{ KEY_EN_LEFT_SHIFT, ALIENWARE_AW510K_ZONE_DIRECT_KEYBOARD, 0xB4 },
|
||||
{ KEY_EN_Z, ALIENWARE_AW510K_ZONE_DIRECT_KEYBOARD, 0xA4 },
|
||||
{ KEY_EN_X, ALIENWARE_AW510K_ZONE_DIRECT_KEYBOARD, 0x9C },
|
||||
{ KEY_EN_C, ALIENWARE_AW510K_ZONE_DIRECT_KEYBOARD, 0x94 },
|
||||
{ KEY_EN_V, ALIENWARE_AW510K_ZONE_DIRECT_KEYBOARD, 0x8C },
|
||||
{ KEY_EN_B, ALIENWARE_AW510K_ZONE_DIRECT_KEYBOARD, 0x84 },
|
||||
{ KEY_EN_N, ALIENWARE_AW510K_ZONE_DIRECT_KEYBOARD, 0x7C },
|
||||
{ KEY_EN_M, ALIENWARE_AW510K_ZONE_DIRECT_KEYBOARD, 0x74 },
|
||||
{ KEY_EN_COMMA, ALIENWARE_AW510K_ZONE_DIRECT_KEYBOARD, 0x6C },
|
||||
{ KEY_EN_PERIOD, ALIENWARE_AW510K_ZONE_DIRECT_KEYBOARD, 0x64 },
|
||||
{ KEY_EN_FORWARD_SLASH, ALIENWARE_AW510K_ZONE_DIRECT_KEYBOARD, 0x5C },
|
||||
{ KEY_EN_RIGHT_SHIFT, ALIENWARE_AW510K_ZONE_DIRECT_KEYBOARD, 0x4C },
|
||||
{ KEY_EN_UP_ARROW, ALIENWARE_AW510K_ZONE_DIRECT_KEYBOARD, 0x2C },
|
||||
{ KEY_EN_NUMPAD_1, ALIENWARE_AW510K_ZONE_DIRECT_KEYBOARD, 0x1C },
|
||||
{ KEY_EN_NUMPAD_2, ALIENWARE_AW510K_ZONE_DIRECT_KEYBOARD, 0x14 },
|
||||
{ KEY_EN_NUMPAD_3, ALIENWARE_AW510K_ZONE_DIRECT_KEYBOARD, 0x0C },
|
||||
{ KEY_EN_LEFT_CONTROL, ALIENWARE_AW510K_ZONE_DIRECT_KEYBOARD, 0xB5 },
|
||||
{ KEY_EN_LEFT_WINDOWS, ALIENWARE_AW510K_ZONE_DIRECT_KEYBOARD, 0xAD },
|
||||
{ KEY_EN_LEFT_ALT, ALIENWARE_AW510K_ZONE_DIRECT_KEYBOARD, 0xA5 },
|
||||
{ KEY_EN_SPACE, ALIENWARE_AW510K_ZONE_DIRECT_KEYBOARD, 0x85 },
|
||||
{ KEY_EN_RIGHT_ALT, ALIENWARE_AW510K_ZONE_DIRECT_KEYBOARD, 0x65 },
|
||||
{ KEY_EN_RIGHT_FUNCTION, ALIENWARE_AW510K_ZONE_DIRECT_KEYBOARD, 0x5D },
|
||||
{ KEY_EN_MENU, ALIENWARE_AW510K_ZONE_DIRECT_KEYBOARD, 0x55 },
|
||||
{ KEY_EN_RIGHT_CONTROL, ALIENWARE_AW510K_ZONE_DIRECT_KEYBOARD, 0x4D },
|
||||
{ KEY_EN_LEFT_ARROW, ALIENWARE_AW510K_ZONE_DIRECT_KEYBOARD, 0x35 },
|
||||
{ KEY_EN_DOWN_ARROW, ALIENWARE_AW510K_ZONE_DIRECT_KEYBOARD, 0x2D },
|
||||
{ KEY_EN_RIGHT_ARROW, ALIENWARE_AW510K_ZONE_DIRECT_KEYBOARD, 0x25 },
|
||||
{ KEY_EN_NUMPAD_0, ALIENWARE_AW510K_ZONE_DIRECT_KEYBOARD, 0x1D },
|
||||
{ KEY_EN_NUMPAD_PERIOD, ALIENWARE_AW510K_ZONE_DIRECT_KEYBOARD, 0x0D },
|
||||
{ KEY_EN_NUMPAD_ENTER, ALIENWARE_AW510K_ZONE_DIRECT_KEYBOARD, 0x05 },
|
||||
{ "Logo", ALIENWARE_AW510K_ZONE_DIRECT_LOGO, 0x07 }
|
||||
};
|
||||
|
||||
RGBController_AlienwareAW510K::RGBController_AlienwareAW510K(AlienwareAW510KController* alienware_ptr)
|
||||
/**------------------------------------------------------------------*\
|
||||
@name Alienware AW510 Keyboard
|
||||
@type USB
|
||||
@save :x:
|
||||
@direct :white_check_mark:
|
||||
@effects :white_check_mark:
|
||||
@detectors DetectAlienwareAW510KControllers
|
||||
@comment
|
||||
\*-------------------------------------------------------------------*/
|
||||
|
||||
RGBController_AlienwareAW510K::RGBController_AlienwareAW510K(AlienwareAW510KController* controller_ptr)
|
||||
{
|
||||
alienware = alienware_ptr;
|
||||
controller = controller_ptr;
|
||||
|
||||
name = "Alienware AW510K Keyboard Device";
|
||||
vendor = "Alienware";
|
||||
type = DEVICE_TYPE_KEYBOARD;
|
||||
description = "Alienware AW510K Keyboard Device";
|
||||
location = alienware->GetDeviceLocation();
|
||||
serial = alienware->GetSerialString();
|
||||
location = controller->GetDeviceLocation();
|
||||
serial = controller->GetSerialString();
|
||||
|
||||
mode Direct_Per_LED;
|
||||
Direct_Per_LED.name = "Direct";
|
||||
@@ -274,7 +285,7 @@ RGBController_AlienwareAW510K::~RGBController_AlienwareAW510K()
|
||||
}
|
||||
}
|
||||
|
||||
delete alienware;
|
||||
delete controller;
|
||||
}
|
||||
|
||||
void RGBController_AlienwareAW510K::SetupZones()
|
||||
@@ -349,10 +360,10 @@ void RGBController_AlienwareAW510K::DeviceUpdateLEDs()
|
||||
{
|
||||
SelectedKeys key;
|
||||
|
||||
key.idx = (unsigned char)leds[led_idx].value;
|
||||
key.red = RGBGetRValue(colors[led_idx]);
|
||||
key.green = RGBGetGValue(colors[led_idx]);
|
||||
key.blue = RGBGetBValue(colors[led_idx]);
|
||||
key.idx = (unsigned char)leds[led_idx].value;
|
||||
key.red = RGBGetRValue(colors[led_idx]);
|
||||
key.green = RGBGetGValue(colors[led_idx]);
|
||||
key.blue = RGBGetBValue(colors[led_idx]);
|
||||
|
||||
frame_buf_keys.push_back(key);
|
||||
}
|
||||
@@ -360,22 +371,22 @@ void RGBController_AlienwareAW510K::DeviceUpdateLEDs()
|
||||
{
|
||||
SelectedKeys key;
|
||||
|
||||
key.idx = (unsigned char)leds[led_idx].value;
|
||||
key.red = RGBGetRValue(colors[led_idx]);
|
||||
key.green = RGBGetGValue(colors[led_idx]);
|
||||
key.blue = RGBGetBValue(colors[led_idx]);
|
||||
key.idx = (unsigned char)leds[led_idx].value;
|
||||
key.red = RGBGetRValue(colors[led_idx]);
|
||||
key.green = RGBGetGValue(colors[led_idx]);
|
||||
key.blue = RGBGetBValue(colors[led_idx]);
|
||||
|
||||
frame_buf_keys.push_back(key);
|
||||
}
|
||||
}
|
||||
|
||||
alienware->SendInitialize();
|
||||
alienware->SendfeatureReport(0x05, 0x01, 0x51, 0x00);
|
||||
alienware->SendCommit();
|
||||
controller->SendInitialize();
|
||||
controller->SendfeatureReport(0x05, 0x01, 0x51, 0x00);
|
||||
controller->SendCommit();
|
||||
|
||||
if(frame_buf_keys.size() > 0)
|
||||
{
|
||||
alienware->SendDirectOn(frame_buf_keys);
|
||||
controller->SendDirectOn(frame_buf_keys);
|
||||
}
|
||||
|
||||
std::copy(new_colors.begin(), new_colors.end(),current_colors.begin());
|
||||
@@ -383,12 +394,12 @@ void RGBController_AlienwareAW510K::DeviceUpdateLEDs()
|
||||
|
||||
void RGBController_AlienwareAW510K::UpdateZoneLEDs(int zone)
|
||||
{
|
||||
alienware->SetDirect((unsigned char) zone, RGBGetRValue(zones[zone].colors[0]), RGBGetGValue(zones[zone].colors[0]), RGBGetBValue(zones[zone].colors[0]));
|
||||
controller->SetDirect((unsigned char) zone, RGBGetRValue(zones[zone].colors[0]), RGBGetGValue(zones[zone].colors[0]), RGBGetBValue(zones[zone].colors[0]));
|
||||
}
|
||||
|
||||
void RGBController_AlienwareAW510K::UpdateSingleLED(int led)
|
||||
{
|
||||
alienware->UpdateSingleLED(leds[led].value, RGBGetRValue(colors[led]), RGBGetGValue(colors[led]), RGBGetBValue(colors[led]));
|
||||
controller->UpdateSingleLED(leds[led].value, RGBGetRValue(colors[led]), RGBGetGValue(colors[led]), RGBGetBValue(colors[led]));
|
||||
}
|
||||
|
||||
void RGBController_AlienwareAW510K::SetCustomMode()
|
||||
@@ -404,7 +415,7 @@ void RGBController_AlienwareAW510K::DeviceUpdateMode()
|
||||
return;
|
||||
}
|
||||
|
||||
alienware->SendfeatureReport(0x05, 0x01, 0x51, 0x00);
|
||||
controller->SendfeatureReport(0x05, 0x01, 0x51, 0x00);
|
||||
unsigned char red = 0;
|
||||
unsigned char grn = 0;
|
||||
unsigned char blu = 0;
|
||||
@@ -427,7 +438,7 @@ void RGBController_AlienwareAW510K::DeviceUpdateMode()
|
||||
unsigned char grn2 = RGBGetGValue(modes[active_mode].colors[1]);
|
||||
unsigned char blu2 = RGBGetBValue(modes[active_mode].colors[1]);
|
||||
|
||||
alienware->SetMorphMode(modes[active_mode].value, modes[active_mode].speed, red, grn, blu, red2, grn2, blu2);
|
||||
controller->SetMorphMode(modes[active_mode].value, modes[active_mode].speed, red, grn, blu, red2, grn2, blu2);
|
||||
}
|
||||
break;
|
||||
|
||||
@@ -435,7 +446,7 @@ void RGBController_AlienwareAW510K::DeviceUpdateMode()
|
||||
/*-------------------------------------------------------------*\
|
||||
| Spectrum only set mode, speed and colorMode |
|
||||
\*-------------------------------------------------------------*/
|
||||
alienware->SetMode(modes[active_mode].value, modes[active_mode].speed, 0x00, ALIENWARE_AW510K_RANBOW_COLOR_MODE, 0x00, 0x00, 0x00);
|
||||
controller->SetMode(modes[active_mode].value, modes[active_mode].speed, 0x00, ALIENWARE_AW510K_RANBOW_COLOR_MODE, 0x00, 0x00, 0x00);
|
||||
break;
|
||||
|
||||
case ALIENWARE_AW510K_MODE_SINGLE_WAVE:
|
||||
@@ -444,7 +455,7 @@ void RGBController_AlienwareAW510K::DeviceUpdateMode()
|
||||
\*-------------------------------------------------------------*/
|
||||
{
|
||||
int waveDirection = GetAW520K_WaveDirection(modes[active_mode].direction);
|
||||
alienware->SetMode(modes[active_mode].value, modes[active_mode].speed, waveDirection, ALIENWARE_AW510K_SINGLE_COLOR_MODE, red, grn, blu);
|
||||
controller->SetMode(modes[active_mode].value, modes[active_mode].speed, waveDirection, ALIENWARE_AW510K_SINGLE_COLOR_MODE, red, grn, blu);
|
||||
}
|
||||
break;
|
||||
|
||||
@@ -454,13 +465,13 @@ void RGBController_AlienwareAW510K::DeviceUpdateMode()
|
||||
\*-------------------------------------------------------------*/
|
||||
{
|
||||
int waveDirection = GetAW520K_WaveDirection(modes[active_mode].direction);
|
||||
alienware->SetMode(modes[active_mode].value, modes[active_mode].speed, waveDirection, ALIENWARE_AW510K_RANBOW_COLOR_MODE, 0x00, 0x00, 0x00);
|
||||
controller->SetMode(modes[active_mode].value, modes[active_mode].speed, waveDirection, ALIENWARE_AW510K_RANBOW_COLOR_MODE, 0x00, 0x00, 0x00);
|
||||
}
|
||||
break;
|
||||
|
||||
|
||||
default:
|
||||
alienware->SetMode(modes[active_mode].value, modes[active_mode].speed, 0x00, ALIENWARE_AW510K_SINGLE_COLOR_MODE, red, grn, blu);
|
||||
controller->SetMode(modes[active_mode].value, modes[active_mode].speed, 0x00, ALIENWARE_AW510K_SINGLE_COLOR_MODE, red, grn, blu);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
class RGBController_AlienwareAW510K : public RGBController
|
||||
{
|
||||
public:
|
||||
RGBController_AlienwareAW510K(AlienwareAW510KController* alienware_ptr);
|
||||
RGBController_AlienwareAW510K(AlienwareAW510KController* controller_ptr);
|
||||
~RGBController_AlienwareAW510K();
|
||||
|
||||
void SetupZones();
|
||||
@@ -30,6 +30,6 @@ public:
|
||||
void DeviceUpdateMode();
|
||||
|
||||
private:
|
||||
AlienwareAW510KController* alienware;
|
||||
AlienwareAW510KController* controller;
|
||||
std::vector<RGBColor> current_colors;
|
||||
};
|
||||
|
||||
@@ -7,6 +7,7 @@
|
||||
| Sergey Gavrilov (DrZlo13) 06/06/2021 |
|
||||
\*-----------------------------------------*/
|
||||
|
||||
#include "RGBControllerKeyNames.h"
|
||||
#include "RGBController_AnnePro2.h"
|
||||
|
||||
#define NA 0xFFFFFFFF
|
||||
@@ -44,79 +45,89 @@ typedef struct
|
||||
static const led_type led_names[] =
|
||||
{
|
||||
/* Key Label Index */
|
||||
{ "Key: Escape", 0 },
|
||||
{ "Key: 1", 1 },
|
||||
{ "Key: 2", 2 },
|
||||
{ "Key: 3", 3 },
|
||||
{ "Key: 4", 4 },
|
||||
{ "Key: 5", 5 },
|
||||
{ "Key: 6", 6 },
|
||||
{ "Key: 7", 7 },
|
||||
{ "Key: 8", 8 },
|
||||
{ "Key: 9", 9 },
|
||||
{ "Key: 0", 10 },
|
||||
{ "Key: -", 11 },
|
||||
{ "Key: =", 12 },
|
||||
{ "Key: Backspace", 13 },
|
||||
{ "Key: Tab", 14 },
|
||||
{ "Key: Q", 15 },
|
||||
{ "Key: W", 16 },
|
||||
{ "Key: E", 17 },
|
||||
{ "Key: R", 18 },
|
||||
{ "Key: T", 19 },
|
||||
{ "Key: Y", 20 },
|
||||
{ "Key: U", 21 },
|
||||
{ "Key: I", 22 },
|
||||
{ "Key: O", 23 },
|
||||
{ "Key: P", 24 },
|
||||
{ "Key: [", 25 },
|
||||
{ "Key: ]", 26 },
|
||||
{ "Key: \\ (ANSI)", 27 },
|
||||
{ "Key: Caps Lock", 28 },
|
||||
{ "Key: A", 29 },
|
||||
{ "Key: S", 30 },
|
||||
{ "Key: D", 31 },
|
||||
{ "Key: F", 32 },
|
||||
{ "Key: G", 33 },
|
||||
{ "Key: H", 34 },
|
||||
{ "Key: J", 35 },
|
||||
{ "Key: K", 36 },
|
||||
{ "Key: L", 37 },
|
||||
{ "Key: ;", 38 },
|
||||
{ "Key: '", 39 },
|
||||
{ "Key: Enter", 40 },
|
||||
{ "Key: Left Shift", 41 },
|
||||
{ "Key: Z", 42 },
|
||||
{ "Key: X", 43 },
|
||||
{ "Key: C", 44 },
|
||||
{ "Key: V", 45 },
|
||||
{ "Key: B", 46 },
|
||||
{ "Key: N", 47 },
|
||||
{ "Key: M", 48 },
|
||||
{ "Key: ,", 49 },
|
||||
{ "Key: .", 50 },
|
||||
{ "Key: /", 51 },
|
||||
{ "Key: Right Shift", 52 },
|
||||
{ "Key: Left Control", 53 },
|
||||
{ "Key: Left Windows", 54 },
|
||||
{ "Key: Left Alt", 55 },
|
||||
{ "Key: Space", 56 },
|
||||
{ "Key: Right Alt", 57 },
|
||||
{ "Key: Right Fn", 58 },
|
||||
{ "Key: Menu", 59 },
|
||||
{ "Key: Right Control", 60 },
|
||||
{ KEY_EN_ESCAPE, 0 },
|
||||
{ KEY_EN_1, 1 },
|
||||
{ KEY_EN_2, 2 },
|
||||
{ KEY_EN_3, 3 },
|
||||
{ KEY_EN_4, 4 },
|
||||
{ KEY_EN_5, 5 },
|
||||
{ KEY_EN_6, 6 },
|
||||
{ KEY_EN_7, 7 },
|
||||
{ KEY_EN_8, 8 },
|
||||
{ KEY_EN_9, 9 },
|
||||
{ KEY_EN_0, 10 },
|
||||
{ KEY_EN_MINUS, 11 },
|
||||
{ KEY_EN_EQUALS, 12 },
|
||||
{ KEY_EN_BACKSPACE, 13 },
|
||||
{ KEY_EN_TAB, 14 },
|
||||
{ KEY_EN_Q, 15 },
|
||||
{ KEY_EN_W, 16 },
|
||||
{ KEY_EN_E, 17 },
|
||||
{ KEY_EN_R, 18 },
|
||||
{ KEY_EN_T, 19 },
|
||||
{ KEY_EN_Y, 20 },
|
||||
{ KEY_EN_U, 21 },
|
||||
{ KEY_EN_I, 22 },
|
||||
{ KEY_EN_O, 23 },
|
||||
{ KEY_EN_P, 24 },
|
||||
{ KEY_EN_LEFT_BRACKET, 25 },
|
||||
{ KEY_EN_RIGHT_BRACKET, 26 },
|
||||
{ KEY_EN_ANSI_BACK_SLASH, 27 },
|
||||
{ KEY_EN_CAPS_LOCK, 28 },
|
||||
{ KEY_EN_A, 29 },
|
||||
{ KEY_EN_S, 30 },
|
||||
{ KEY_EN_D, 31 },
|
||||
{ KEY_EN_F, 32 },
|
||||
{ KEY_EN_G, 33 },
|
||||
{ KEY_EN_H, 34 },
|
||||
{ KEY_EN_J, 35 },
|
||||
{ KEY_EN_K, 36 },
|
||||
{ KEY_EN_L, 37 },
|
||||
{ KEY_EN_SEMICOLON, 38 },
|
||||
{ KEY_EN_QUOTE, 39 },
|
||||
{ KEY_EN_ANSI_ENTER, 40 },
|
||||
{ KEY_EN_LEFT_SHIFT, 41 },
|
||||
{ KEY_EN_Z, 42 },
|
||||
{ KEY_EN_X, 43 },
|
||||
{ KEY_EN_C, 44 },
|
||||
{ KEY_EN_V, 45 },
|
||||
{ KEY_EN_B, 46 },
|
||||
{ KEY_EN_N, 47 },
|
||||
{ KEY_EN_M, 48 },
|
||||
{ KEY_EN_COMMA, 49 },
|
||||
{ KEY_EN_PERIOD, 50 },
|
||||
{ KEY_EN_FORWARD_SLASH, 51 },
|
||||
{ KEY_EN_RIGHT_SHIFT, 52 },
|
||||
{ KEY_EN_LEFT_CONTROL, 53 },
|
||||
{ KEY_EN_LEFT_WINDOWS, 54 },
|
||||
{ KEY_EN_LEFT_ALT, 55 },
|
||||
{ KEY_EN_SPACE, 56 },
|
||||
{ KEY_EN_RIGHT_ALT, 57 },
|
||||
{ KEY_EN_RIGHT_FUNCTION, 58 },
|
||||
{ KEY_EN_MENU, 59 },
|
||||
{ KEY_EN_RIGHT_CONTROL, 60 },
|
||||
};
|
||||
|
||||
RGBController_AnnePro2::RGBController_AnnePro2(AnnePro2Controller* annepro2_ptr)
|
||||
/**------------------------------------------------------------------*\
|
||||
@name Anne Pro 2
|
||||
@type USB
|
||||
@save :x:
|
||||
@direct :white_check_mark:
|
||||
@effects :x:
|
||||
@detectors DetectAnnePro2Controllers
|
||||
@comment
|
||||
\*-------------------------------------------------------------------*/
|
||||
|
||||
RGBController_AnnePro2::RGBController_AnnePro2(AnnePro2Controller* controller_ptr)
|
||||
{
|
||||
annepro2 = annepro2_ptr;
|
||||
controller = controller_ptr;
|
||||
|
||||
name = "Anne Pro 2";
|
||||
vendor = "Obinslab";
|
||||
type = DEVICE_TYPE_KEYBOARD;
|
||||
description = "Obinslab Anne Pro 2 Device";
|
||||
location = annepro2->GetDeviceLocation();
|
||||
serial = annepro2->GetSerialString();
|
||||
location = controller->GetDeviceLocation();
|
||||
serial = controller->GetSerialString();
|
||||
|
||||
mode Direct;
|
||||
Direct.name = "Direct";
|
||||
@@ -130,7 +141,7 @@ RGBController_AnnePro2::RGBController_AnnePro2(AnnePro2Controller* annepro2_ptr)
|
||||
|
||||
RGBController_AnnePro2::~RGBController_AnnePro2()
|
||||
{
|
||||
delete annepro2;
|
||||
delete controller;
|
||||
}
|
||||
|
||||
void RGBController_AnnePro2::SetupZones()
|
||||
@@ -211,7 +222,7 @@ void RGBController_AnnePro2::DeviceUpdateLEDs()
|
||||
led_real_idx++;
|
||||
}
|
||||
|
||||
annepro2->SendDirect(frame_buf_length, frame_buf);
|
||||
controller->SendDirect(frame_buf_length, frame_buf);
|
||||
}
|
||||
|
||||
void RGBController_AnnePro2::UpdateZoneLEDs(int /*zone*/)
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
class RGBController_AnnePro2 : public RGBController
|
||||
{
|
||||
public:
|
||||
RGBController_AnnePro2(AnnePro2Controller* annepro2_ptr);
|
||||
RGBController_AnnePro2(AnnePro2Controller* controller_ptr);
|
||||
~RGBController_AnnePro2();
|
||||
|
||||
void SetupZones();
|
||||
@@ -28,5 +28,5 @@ public:
|
||||
void DeviceUpdateMode();
|
||||
|
||||
private:
|
||||
AnnePro2Controller* annepro2;
|
||||
AnnePro2Controller* controller;
|
||||
};
|
||||
|
||||
@@ -1,34 +1,38 @@
|
||||
#include "Detector.h"
|
||||
#include "AsusAuraCoreController.h"
|
||||
#include "RGBController.h"
|
||||
#include "RGBController_AsusAuraCore.h"
|
||||
#include <hidapi/hidapi.h>
|
||||
|
||||
#define AURA_CORE_VID 0x0B05
|
||||
|
||||
/******************************************************************************************\
|
||||
* *
|
||||
* DetectAuraCoreControllers *
|
||||
* *
|
||||
* Tests the USB address to see if an Asus ROG Aura Core controller exists there *
|
||||
* *
|
||||
\******************************************************************************************/
|
||||
|
||||
void DetectAsusAuraCoreControllers(hid_device_info* info, const std::string&)
|
||||
{
|
||||
hid_device* dev = hid_open_path(info->path);
|
||||
if( dev )
|
||||
{
|
||||
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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
REGISTER_HID_DETECTOR("ASUS Aura Core", DetectAsusAuraCoreControllers, AURA_CORE_VID, 0x1854);
|
||||
REGISTER_HID_DETECTOR("ASUS Aura Core", DetectAsusAuraCoreControllers, AURA_CORE_VID, 0x1866);
|
||||
REGISTER_HID_DETECTOR("ASUS Aura Core", DetectAsusAuraCoreControllers, AURA_CORE_VID, 0x1869);
|
||||
#include "Detector.h"
|
||||
#include "AsusAuraCoreController.h"
|
||||
#include "RGBController.h"
|
||||
#include "RGBController_AsusAuraCore.h"
|
||||
#include <hidapi/hidapi.h>
|
||||
|
||||
#define AURA_CORE_VID 0x0B05
|
||||
|
||||
/******************************************************************************************\
|
||||
* *
|
||||
* DetectAuraCoreControllers *
|
||||
* *
|
||||
* Tests the USB address to see if an Asus ROG Aura Core controller exists there *
|
||||
* *
|
||||
\******************************************************************************************/
|
||||
|
||||
void DetectAsusAuraCoreControllers(hid_device_info* info, const std::string&)
|
||||
{
|
||||
hid_device* dev = hid_open_path(info->path);
|
||||
if( dev )
|
||||
{
|
||||
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);
|
||||
}
|
||||
else
|
||||
{
|
||||
delete rgb_controller;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
REGISTER_HID_DETECTOR("ASUS Aura Core", DetectAsusAuraCoreControllers, AURA_CORE_VID, 0x1854);
|
||||
REGISTER_HID_DETECTOR("ASUS Aura Core", DetectAsusAuraCoreControllers, AURA_CORE_VID, 0x1866);
|
||||
REGISTER_HID_DETECTOR("ASUS Aura Core", DetectAsusAuraCoreControllers, AURA_CORE_VID, 0x1869);
|
||||
|
||||
@@ -1,319 +1,329 @@
|
||||
/*-----------------------------------------*\
|
||||
| RGBController_AsusAuraCore.cpp |
|
||||
| |
|
||||
| Generic RGB Interface for ROG Aura Core |
|
||||
| |
|
||||
| Adam Honse (CalcProgrammer1) 4/17/2020 |
|
||||
\*-----------------------------------------*/
|
||||
|
||||
#include "RGBController_AsusAuraCore.h"
|
||||
|
||||
RGBController_AuraCore::RGBController_AuraCore(AuraCoreController* aura_ptr)
|
||||
{
|
||||
aura = aura_ptr;
|
||||
|
||||
name = "ASUS Aura Core Device";
|
||||
vendor = "ASUS";
|
||||
location = aura->GetDeviceLocation();
|
||||
serial = aura->GetSerialString();
|
||||
description = "ASUS Aura Core Device";
|
||||
type = DEVICE_TYPE_UNKNOWN;
|
||||
|
||||
if(aura->aura_device.aura_type == AURA_CORE_DEVICE_KEYBOARD)
|
||||
{
|
||||
SetupKeyboard();
|
||||
}
|
||||
else if(aura->aura_device.aura_type == AURA_CORE_DEVICE_GA15DH)
|
||||
{
|
||||
SetupGA15DH();
|
||||
}
|
||||
|
||||
SetupZones();
|
||||
}
|
||||
|
||||
void RGBController_AuraCore::SetupKeyboard()
|
||||
{
|
||||
name = "ASUS Aura Keyboard";
|
||||
vendor = "ASUS";
|
||||
type = DEVICE_TYPE_KEYBOARD;
|
||||
description = "ASUS Aura Core Device";
|
||||
|
||||
mode Static;
|
||||
Static.name = "Static";
|
||||
Static.value = AURA_CORE_MODE_STATIC;
|
||||
Static.flags = MODE_FLAG_HAS_PER_LED_COLOR;
|
||||
Static.color_mode = MODE_COLORS_PER_LED;
|
||||
modes.push_back(Static);
|
||||
|
||||
mode Breathing;
|
||||
Breathing.name = "Breathing";
|
||||
Breathing.value = AURA_CORE_MODE_BREATHING;
|
||||
Breathing.flags = MODE_FLAG_HAS_PER_LED_COLOR;
|
||||
Breathing.color_mode = MODE_COLORS_PER_LED;
|
||||
modes.push_back(Breathing);
|
||||
|
||||
mode ColorCycle;
|
||||
ColorCycle.name = "Color Cycle";
|
||||
ColorCycle.value = AURA_CORE_MODE_SPECTRUM_CYCLE;
|
||||
ColorCycle.flags = 0;
|
||||
ColorCycle.color_mode = MODE_COLORS_NONE;
|
||||
modes.push_back(ColorCycle);
|
||||
}
|
||||
|
||||
void RGBController_AuraCore::SetupGA15DH()
|
||||
{
|
||||
name = "ASUS Aura GA15DH";
|
||||
vendor = "ASUS";
|
||||
type = DEVICE_TYPE_LEDSTRIP;
|
||||
description = "ASUS Aura Core Device";
|
||||
|
||||
mode Static;
|
||||
Static.name = "Static";
|
||||
Static.value = AURA_CORE_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_CORE_MODE_BREATHING;
|
||||
Breathing.flags = MODE_FLAG_HAS_MODE_SPECIFIC_COLOR | MODE_FLAG_HAS_SPEED;
|
||||
Breathing.speed_min = AURA_CORE_SPEED_SLOW;
|
||||
Breathing.speed_max = AURA_CORE_SPEED_FAST;
|
||||
Breathing.speed = AURA_CORE_SPEED_NORMAL;
|
||||
Breathing.colors_min = 1;
|
||||
Breathing.colors_max = 2;
|
||||
Breathing.color_mode = MODE_COLORS_MODE_SPECIFIC;
|
||||
Breathing.colors.resize(2);
|
||||
modes.push_back(Breathing);
|
||||
|
||||
mode ColorCycle;
|
||||
ColorCycle.name = "Color Cycle";
|
||||
ColorCycle.value = AURA_CORE_MODE_SPECTRUM_CYCLE;
|
||||
ColorCycle.flags = MODE_FLAG_HAS_SPEED;
|
||||
ColorCycle.speed_min = AURA_CORE_SPEED_SLOW;
|
||||
ColorCycle.speed_max = AURA_CORE_SPEED_FAST;
|
||||
ColorCycle.speed = AURA_CORE_SPEED_NORMAL;
|
||||
ColorCycle.color_mode = MODE_COLORS_NONE;
|
||||
modes.push_back(ColorCycle);
|
||||
|
||||
mode Rainbow;
|
||||
Rainbow.name = "Rainbow";
|
||||
Rainbow.value = AURA_CORE_MODE_RAINBOW;
|
||||
Rainbow.flags = MODE_FLAG_HAS_SPEED | MODE_FLAG_HAS_DIRECTION_LR;
|
||||
Rainbow.speed_min = AURA_CORE_SPEED_SLOW;
|
||||
Rainbow.speed_max = AURA_CORE_SPEED_FAST;
|
||||
Rainbow.speed = AURA_CORE_SPEED_NORMAL;
|
||||
Rainbow.direction = MODE_DIRECTION_RIGHT;
|
||||
Rainbow.color_mode = MODE_COLORS_NONE;
|
||||
modes.push_back(Rainbow);
|
||||
|
||||
mode Strobe;
|
||||
Strobe.name = "Strobe";
|
||||
Strobe.value = AURA_CORE_MODE_STROBE;
|
||||
Strobe.flags = MODE_FLAG_HAS_MODE_SPECIFIC_COLOR;
|
||||
Strobe.colors_min = 1;
|
||||
Strobe.colors_max = 1;
|
||||
Strobe.color_mode = MODE_COLORS_MODE_SPECIFIC;
|
||||
Strobe.colors.resize(1);
|
||||
modes.push_back(Strobe);
|
||||
|
||||
mode Comet;
|
||||
Comet.name = "Comet";
|
||||
Comet.value = AURA_CORE_MODE_COMET;
|
||||
Comet.flags = MODE_FLAG_HAS_MODE_SPECIFIC_COLOR;
|
||||
Comet.colors_min = 1;
|
||||
Comet.colors_max = 1;
|
||||
Comet.color_mode = MODE_COLORS_MODE_SPECIFIC;
|
||||
Comet.colors.resize(1);
|
||||
modes.push_back(Comet);
|
||||
|
||||
mode Flash;
|
||||
Flash.name = "Flash & Dash";
|
||||
Flash.value = AURA_CORE_MODE_FLASHNDASH;
|
||||
Flash.flags = MODE_FLAG_HAS_MODE_SPECIFIC_COLOR;
|
||||
Flash.colors_min = 1;
|
||||
Flash.colors_max = 1;
|
||||
Flash.color_mode = MODE_COLORS_MODE_SPECIFIC;
|
||||
Flash.colors.resize(1);
|
||||
modes.push_back(Flash);
|
||||
|
||||
mode Irradiation;
|
||||
Irradiation.name = "Irradiation";
|
||||
Irradiation.value = AURA_CORE_MODE_IRRADIATION;
|
||||
Irradiation.flags = 0;
|
||||
Irradiation.color_mode = MODE_COLORS_NONE;
|
||||
modes.push_back(Irradiation);
|
||||
|
||||
mode Direct;
|
||||
Static.name = "Direct";
|
||||
Static.value = AURA_CORE_MODE_DIRECT;
|
||||
Static.flags = MODE_FLAG_HAS_PER_LED_COLOR;
|
||||
Static.color_mode = MODE_COLORS_PER_LED;
|
||||
modes.push_back(Static);
|
||||
}
|
||||
|
||||
RGBController_AuraCore::~RGBController_AuraCore()
|
||||
{
|
||||
delete aura;
|
||||
}
|
||||
|
||||
void RGBController_AuraCore::SetupZones()
|
||||
{
|
||||
zone auraZone;
|
||||
|
||||
if(aura->aura_device.aura_type == AURA_CORE_DEVICE_KEYBOARD)
|
||||
{
|
||||
auraZone.name = "Keyboard";
|
||||
auraZone.type = ZONE_TYPE_SINGLE;
|
||||
auraZone.leds_min = 4;
|
||||
auraZone.leds_max = 4;
|
||||
auraZone.leds_count = 4;
|
||||
auraZone.matrix_map = NULL;
|
||||
}
|
||||
else if(aura->aura_device.aura_type == AURA_CORE_DEVICE_GA15DH)
|
||||
{
|
||||
auraZone.name = "GA15DH";
|
||||
auraZone.type = ZONE_TYPE_LINEAR;
|
||||
auraZone.leds_min = 20;
|
||||
auraZone.leds_max = 20;
|
||||
auraZone.leds_count = 20;
|
||||
auraZone.matrix_map = NULL;
|
||||
}
|
||||
else
|
||||
{
|
||||
auraZone.leds_count = 0;
|
||||
}
|
||||
|
||||
zones.push_back(auraZone);
|
||||
|
||||
for(unsigned int led_idx = 0; led_idx < auraZone.leds_count; led_idx++)
|
||||
{
|
||||
led KeyLED;
|
||||
KeyLED.name = auraZone.name + " ";
|
||||
KeyLED.name.append(std::to_string(led_idx + 1));
|
||||
leds.push_back(KeyLED);
|
||||
}
|
||||
|
||||
SetupColors();
|
||||
}
|
||||
|
||||
void RGBController_AuraCore::ResizeZone(int /*zone*/, int /*new_size*/)
|
||||
{
|
||||
/*---------------------------------------------------------*\
|
||||
| This device does not support resizing zones |
|
||||
\*---------------------------------------------------------*/
|
||||
}
|
||||
|
||||
void RGBController_AuraCore::DeviceUpdateLEDs()
|
||||
{
|
||||
UpdateZoneLEDs(0);
|
||||
}
|
||||
|
||||
void RGBController_AuraCore::UpdateZoneLEDs(int /*zone*/)
|
||||
{
|
||||
if(modes[active_mode].value == AURA_CORE_MODE_DIRECT)
|
||||
{
|
||||
std::vector<AuraColor> aura_colors;
|
||||
std::vector<RGBColor>& color_set = colors;
|
||||
|
||||
if(modes[active_mode].color_mode == MODE_COLORS_MODE_SPECIFIC)
|
||||
{
|
||||
color_set = modes[active_mode].colors;
|
||||
}
|
||||
|
||||
for(unsigned int led_idx = 0; led_idx < leds.size(); led_idx++)
|
||||
{
|
||||
AuraColor new_color;
|
||||
|
||||
new_color.red = RGBGetRValue(color_set[led_idx]);
|
||||
new_color.green = RGBGetGValue(color_set[led_idx]);
|
||||
new_color.blue = RGBGetBValue(color_set[led_idx]);
|
||||
|
||||
aura_colors.push_back(new_color);
|
||||
}
|
||||
|
||||
aura->UpdateDirect(aura_colors);
|
||||
}
|
||||
else if(modes[active_mode].color_mode == MODE_COLORS_PER_LED)
|
||||
{
|
||||
for(unsigned int led_idx = 0; led_idx < leds.size(); led_idx++)
|
||||
{
|
||||
UpdateSingleLED(led_idx);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
UpdateSingleLED(0);
|
||||
}
|
||||
}
|
||||
|
||||
void RGBController_AuraCore::UpdateSingleLED(int led)
|
||||
{
|
||||
unsigned char speed = 0xFF;
|
||||
unsigned char red = 0;
|
||||
unsigned char green = 0;
|
||||
unsigned char blue = 0;
|
||||
unsigned char dir = 0;
|
||||
mode& curr_mode = modes[active_mode];
|
||||
|
||||
if(curr_mode.color_mode == MODE_COLORS_PER_LED)
|
||||
{
|
||||
red = RGBGetRValue(colors[led]);
|
||||
green = RGBGetGValue(colors[led]);
|
||||
blue = RGBGetBValue(colors[led]);
|
||||
}
|
||||
else if(curr_mode.color_mode == MODE_COLORS_MODE_SPECIFIC)
|
||||
{
|
||||
red = RGBGetRValue(curr_mode.colors[led]);
|
||||
green = RGBGetGValue(curr_mode.colors[led]);
|
||||
blue = RGBGetBValue(curr_mode.colors[led]);
|
||||
}
|
||||
|
||||
if(curr_mode.flags & MODE_FLAG_HAS_SPEED)
|
||||
{
|
||||
speed = curr_mode.speed;
|
||||
}
|
||||
|
||||
if(curr_mode.flags & MODE_FLAG_HAS_DIRECTION_LR)
|
||||
{
|
||||
if(curr_mode.direction == MODE_DIRECTION_RIGHT)
|
||||
{
|
||||
dir = 1;
|
||||
}
|
||||
}
|
||||
|
||||
aura->SendUpdate
|
||||
(
|
||||
led,
|
||||
curr_mode.value,
|
||||
speed,
|
||||
dir,
|
||||
red,
|
||||
green,
|
||||
blue
|
||||
);
|
||||
|
||||
aura->SendSet();
|
||||
aura->SendApply();
|
||||
}
|
||||
|
||||
void RGBController_AuraCore::SetCustomMode()
|
||||
{
|
||||
active_mode = 0;
|
||||
}
|
||||
|
||||
void RGBController_AuraCore::DeviceUpdateMode()
|
||||
{
|
||||
if(modes[active_mode].value == AURA_CORE_MODE_DIRECT)
|
||||
{
|
||||
aura->InitDirectMode();
|
||||
}
|
||||
else
|
||||
{
|
||||
DeviceUpdateLEDs();
|
||||
}
|
||||
}
|
||||
/*-----------------------------------------*\
|
||||
| RGBController_AsusAuraCore.cpp |
|
||||
| |
|
||||
| Generic RGB Interface for ROG Aura Core |
|
||||
| |
|
||||
| Adam Honse (CalcProgrammer1) 4/17/2020 |
|
||||
\*-----------------------------------------*/
|
||||
|
||||
#include "RGBController_AsusAuraCore.h"
|
||||
|
||||
/**------------------------------------------------------------------*\
|
||||
@name Asus AURA Core
|
||||
@type USB
|
||||
@save :x:
|
||||
@direct :warning:
|
||||
@effects :white_check_mark:
|
||||
@detectors DetectAsusAuraCoreControllers
|
||||
@comment
|
||||
\*-------------------------------------------------------------------*/
|
||||
|
||||
RGBController_AuraCore::RGBController_AuraCore(AuraCoreController* controller_ptr)
|
||||
{
|
||||
controller = controller_ptr;
|
||||
|
||||
name = "ASUS Aura Core Device";
|
||||
vendor = "ASUS";
|
||||
location = controller->GetDeviceLocation();
|
||||
serial = controller->GetSerialString();
|
||||
description = "ASUS Aura Core Device";
|
||||
type = DEVICE_TYPE_UNKNOWN;
|
||||
|
||||
if(controller->aura_device.aura_type == AURA_CORE_DEVICE_KEYBOARD)
|
||||
{
|
||||
SetupKeyboard();
|
||||
}
|
||||
else if(controller->aura_device.aura_type == AURA_CORE_DEVICE_GA15DH)
|
||||
{
|
||||
SetupGA15DH();
|
||||
}
|
||||
|
||||
SetupZones();
|
||||
}
|
||||
|
||||
void RGBController_AuraCore::SetupKeyboard()
|
||||
{
|
||||
name = "ASUS Aura Keyboard";
|
||||
vendor = "ASUS";
|
||||
type = DEVICE_TYPE_KEYBOARD;
|
||||
description = "ASUS Aura Core Device";
|
||||
|
||||
mode Static;
|
||||
Static.name = "Static";
|
||||
Static.value = AURA_CORE_MODE_STATIC;
|
||||
Static.flags = MODE_FLAG_HAS_PER_LED_COLOR;
|
||||
Static.color_mode = MODE_COLORS_PER_LED;
|
||||
modes.push_back(Static);
|
||||
|
||||
mode Breathing;
|
||||
Breathing.name = "Breathing";
|
||||
Breathing.value = AURA_CORE_MODE_BREATHING;
|
||||
Breathing.flags = MODE_FLAG_HAS_PER_LED_COLOR;
|
||||
Breathing.color_mode = MODE_COLORS_PER_LED;
|
||||
modes.push_back(Breathing);
|
||||
|
||||
mode ColorCycle;
|
||||
ColorCycle.name = "Color Cycle";
|
||||
ColorCycle.value = AURA_CORE_MODE_SPECTRUM_CYCLE;
|
||||
ColorCycle.flags = 0;
|
||||
ColorCycle.color_mode = MODE_COLORS_NONE;
|
||||
modes.push_back(ColorCycle);
|
||||
}
|
||||
|
||||
void RGBController_AuraCore::SetupGA15DH()
|
||||
{
|
||||
name = "ASUS Aura GA15DH";
|
||||
vendor = "ASUS";
|
||||
type = DEVICE_TYPE_LEDSTRIP;
|
||||
description = "ASUS Aura Core Device";
|
||||
|
||||
mode Static;
|
||||
Static.name = "Static";
|
||||
Static.value = AURA_CORE_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_CORE_MODE_BREATHING;
|
||||
Breathing.flags = MODE_FLAG_HAS_MODE_SPECIFIC_COLOR | MODE_FLAG_HAS_SPEED;
|
||||
Breathing.speed_min = AURA_CORE_SPEED_SLOW;
|
||||
Breathing.speed_max = AURA_CORE_SPEED_FAST;
|
||||
Breathing.speed = AURA_CORE_SPEED_NORMAL;
|
||||
Breathing.colors_min = 1;
|
||||
Breathing.colors_max = 2;
|
||||
Breathing.color_mode = MODE_COLORS_MODE_SPECIFIC;
|
||||
Breathing.colors.resize(2);
|
||||
modes.push_back(Breathing);
|
||||
|
||||
mode ColorCycle;
|
||||
ColorCycle.name = "Color Cycle";
|
||||
ColorCycle.value = AURA_CORE_MODE_SPECTRUM_CYCLE;
|
||||
ColorCycle.flags = MODE_FLAG_HAS_SPEED;
|
||||
ColorCycle.speed_min = AURA_CORE_SPEED_SLOW;
|
||||
ColorCycle.speed_max = AURA_CORE_SPEED_FAST;
|
||||
ColorCycle.speed = AURA_CORE_SPEED_NORMAL;
|
||||
ColorCycle.color_mode = MODE_COLORS_NONE;
|
||||
modes.push_back(ColorCycle);
|
||||
|
||||
mode Rainbow;
|
||||
Rainbow.name = "Rainbow";
|
||||
Rainbow.value = AURA_CORE_MODE_RAINBOW;
|
||||
Rainbow.flags = MODE_FLAG_HAS_SPEED | MODE_FLAG_HAS_DIRECTION_LR;
|
||||
Rainbow.speed_min = AURA_CORE_SPEED_SLOW;
|
||||
Rainbow.speed_max = AURA_CORE_SPEED_FAST;
|
||||
Rainbow.speed = AURA_CORE_SPEED_NORMAL;
|
||||
Rainbow.direction = MODE_DIRECTION_RIGHT;
|
||||
Rainbow.color_mode = MODE_COLORS_NONE;
|
||||
modes.push_back(Rainbow);
|
||||
|
||||
mode Strobe;
|
||||
Strobe.name = "Strobe";
|
||||
Strobe.value = AURA_CORE_MODE_STROBE;
|
||||
Strobe.flags = MODE_FLAG_HAS_MODE_SPECIFIC_COLOR;
|
||||
Strobe.colors_min = 1;
|
||||
Strobe.colors_max = 1;
|
||||
Strobe.color_mode = MODE_COLORS_MODE_SPECIFIC;
|
||||
Strobe.colors.resize(1);
|
||||
modes.push_back(Strobe);
|
||||
|
||||
mode Comet;
|
||||
Comet.name = "Comet";
|
||||
Comet.value = AURA_CORE_MODE_COMET;
|
||||
Comet.flags = MODE_FLAG_HAS_MODE_SPECIFIC_COLOR;
|
||||
Comet.colors_min = 1;
|
||||
Comet.colors_max = 1;
|
||||
Comet.color_mode = MODE_COLORS_MODE_SPECIFIC;
|
||||
Comet.colors.resize(1);
|
||||
modes.push_back(Comet);
|
||||
|
||||
mode Flash;
|
||||
Flash.name = "Flash & Dash";
|
||||
Flash.value = AURA_CORE_MODE_FLASHNDASH;
|
||||
Flash.flags = MODE_FLAG_HAS_MODE_SPECIFIC_COLOR;
|
||||
Flash.colors_min = 1;
|
||||
Flash.colors_max = 1;
|
||||
Flash.color_mode = MODE_COLORS_MODE_SPECIFIC;
|
||||
Flash.colors.resize(1);
|
||||
modes.push_back(Flash);
|
||||
|
||||
mode Irradiation;
|
||||
Irradiation.name = "Irradiation";
|
||||
Irradiation.value = AURA_CORE_MODE_IRRADIATION;
|
||||
Irradiation.flags = 0;
|
||||
Irradiation.color_mode = MODE_COLORS_NONE;
|
||||
modes.push_back(Irradiation);
|
||||
|
||||
mode Direct;
|
||||
Static.name = "Direct";
|
||||
Static.value = AURA_CORE_MODE_DIRECT;
|
||||
Static.flags = MODE_FLAG_HAS_PER_LED_COLOR;
|
||||
Static.color_mode = MODE_COLORS_PER_LED;
|
||||
modes.push_back(Static);
|
||||
}
|
||||
|
||||
RGBController_AuraCore::~RGBController_AuraCore()
|
||||
{
|
||||
delete controller;
|
||||
}
|
||||
|
||||
void RGBController_AuraCore::SetupZones()
|
||||
{
|
||||
zone auraZone;
|
||||
|
||||
if(controller->aura_device.aura_type == AURA_CORE_DEVICE_KEYBOARD)
|
||||
{
|
||||
auraZone.name = "Keyboard";
|
||||
auraZone.type = ZONE_TYPE_SINGLE;
|
||||
auraZone.leds_min = 4;
|
||||
auraZone.leds_max = 4;
|
||||
auraZone.leds_count = 4;
|
||||
auraZone.matrix_map = NULL;
|
||||
}
|
||||
else if(controller->aura_device.aura_type == AURA_CORE_DEVICE_GA15DH)
|
||||
{
|
||||
auraZone.name = "GA15DH";
|
||||
auraZone.type = ZONE_TYPE_LINEAR;
|
||||
auraZone.leds_min = 20;
|
||||
auraZone.leds_max = 20;
|
||||
auraZone.leds_count = 20;
|
||||
auraZone.matrix_map = NULL;
|
||||
}
|
||||
else
|
||||
{
|
||||
auraZone.leds_count = 0;
|
||||
}
|
||||
|
||||
zones.push_back(auraZone);
|
||||
|
||||
for(unsigned int led_idx = 0; led_idx < auraZone.leds_count; led_idx++)
|
||||
{
|
||||
led KeyLED;
|
||||
KeyLED.name = auraZone.name + " ";
|
||||
KeyLED.name.append(std::to_string(led_idx + 1));
|
||||
leds.push_back(KeyLED);
|
||||
}
|
||||
|
||||
SetupColors();
|
||||
}
|
||||
|
||||
void RGBController_AuraCore::ResizeZone(int /*zone*/, int /*new_size*/)
|
||||
{
|
||||
/*---------------------------------------------------------*\
|
||||
| This device does not support resizing zones |
|
||||
\*---------------------------------------------------------*/
|
||||
}
|
||||
|
||||
void RGBController_AuraCore::DeviceUpdateLEDs()
|
||||
{
|
||||
UpdateZoneLEDs(0);
|
||||
}
|
||||
|
||||
void RGBController_AuraCore::UpdateZoneLEDs(int /*zone*/)
|
||||
{
|
||||
if(modes[active_mode].value == AURA_CORE_MODE_DIRECT)
|
||||
{
|
||||
std::vector<AuraColor> aura_colors;
|
||||
std::vector<RGBColor>& color_set = colors;
|
||||
|
||||
if(modes[active_mode].color_mode == MODE_COLORS_MODE_SPECIFIC)
|
||||
{
|
||||
color_set = modes[active_mode].colors;
|
||||
}
|
||||
|
||||
for(unsigned int led_idx = 0; led_idx < leds.size(); led_idx++)
|
||||
{
|
||||
AuraColor new_color;
|
||||
|
||||
new_color.red = RGBGetRValue(color_set[led_idx]);
|
||||
new_color.green = RGBGetGValue(color_set[led_idx]);
|
||||
new_color.blue = RGBGetBValue(color_set[led_idx]);
|
||||
|
||||
aura_colors.push_back(new_color);
|
||||
}
|
||||
|
||||
controller->UpdateDirect(aura_colors);
|
||||
}
|
||||
else if(modes[active_mode].color_mode == MODE_COLORS_PER_LED)
|
||||
{
|
||||
for(unsigned int led_idx = 0; led_idx < leds.size(); led_idx++)
|
||||
{
|
||||
UpdateSingleLED(led_idx);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
UpdateSingleLED(0);
|
||||
}
|
||||
}
|
||||
|
||||
void RGBController_AuraCore::UpdateSingleLED(int led)
|
||||
{
|
||||
unsigned char speed = 0xFF;
|
||||
unsigned char red = 0;
|
||||
unsigned char green = 0;
|
||||
unsigned char blue = 0;
|
||||
unsigned char dir = 0;
|
||||
mode& curr_mode = modes[active_mode];
|
||||
|
||||
if(curr_mode.color_mode == MODE_COLORS_PER_LED)
|
||||
{
|
||||
red = RGBGetRValue(colors[led]);
|
||||
green = RGBGetGValue(colors[led]);
|
||||
blue = RGBGetBValue(colors[led]);
|
||||
}
|
||||
else if(curr_mode.color_mode == MODE_COLORS_MODE_SPECIFIC)
|
||||
{
|
||||
red = RGBGetRValue(curr_mode.colors[led]);
|
||||
green = RGBGetGValue(curr_mode.colors[led]);
|
||||
blue = RGBGetBValue(curr_mode.colors[led]);
|
||||
}
|
||||
|
||||
if(curr_mode.flags & MODE_FLAG_HAS_SPEED)
|
||||
{
|
||||
speed = curr_mode.speed;
|
||||
}
|
||||
|
||||
if(curr_mode.flags & MODE_FLAG_HAS_DIRECTION_LR)
|
||||
{
|
||||
if(curr_mode.direction == MODE_DIRECTION_RIGHT)
|
||||
{
|
||||
dir = 1;
|
||||
}
|
||||
}
|
||||
|
||||
controller->SendUpdate
|
||||
(
|
||||
led,
|
||||
curr_mode.value,
|
||||
speed,
|
||||
dir,
|
||||
red,
|
||||
green,
|
||||
blue
|
||||
);
|
||||
|
||||
controller->SendSet();
|
||||
controller->SendApply();
|
||||
}
|
||||
|
||||
void RGBController_AuraCore::SetCustomMode()
|
||||
{
|
||||
active_mode = 0;
|
||||
}
|
||||
|
||||
void RGBController_AuraCore::DeviceUpdateMode()
|
||||
{
|
||||
if(modes[active_mode].value == AURA_CORE_MODE_DIRECT)
|
||||
{
|
||||
controller->InitDirectMode();
|
||||
}
|
||||
else
|
||||
{
|
||||
DeviceUpdateLEDs();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,35 +1,35 @@
|
||||
/*-----------------------------------------*\
|
||||
| RGBController_AsusAuraCore.h |
|
||||
| |
|
||||
| Generic RGB Interface for ROG Aura Core |
|
||||
| |
|
||||
| Adam Honse (CalcProgrammer1) 4/17/2020 |
|
||||
\*-----------------------------------------*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "RGBController.h"
|
||||
#include "AsusAuraCoreController.h"
|
||||
|
||||
class RGBController_AuraCore : public RGBController
|
||||
{
|
||||
public:
|
||||
RGBController_AuraCore(AuraCoreController* aura_ptr);
|
||||
~RGBController_AuraCore();
|
||||
|
||||
void SetupKeyboard();
|
||||
void SetupGA15DH();
|
||||
void SetupZones();
|
||||
|
||||
void ResizeZone(int zone, int new_size);
|
||||
|
||||
void DeviceUpdateLEDs();
|
||||
void UpdateZoneLEDs(int zone);
|
||||
void UpdateSingleLED(int led);
|
||||
|
||||
void SetCustomMode();
|
||||
void DeviceUpdateMode();
|
||||
|
||||
private:
|
||||
AuraCoreController* aura;
|
||||
};
|
||||
/*-----------------------------------------*\
|
||||
| RGBController_AsusAuraCore.h |
|
||||
| |
|
||||
| Generic RGB Interface for ROG Aura Core |
|
||||
| |
|
||||
| Adam Honse (CalcProgrammer1) 4/17/2020 |
|
||||
\*-----------------------------------------*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "RGBController.h"
|
||||
#include "AsusAuraCoreController.h"
|
||||
|
||||
class RGBController_AuraCore : public RGBController
|
||||
{
|
||||
public:
|
||||
RGBController_AuraCore(AuraCoreController* controller_ptr);
|
||||
~RGBController_AuraCore();
|
||||
|
||||
void SetupKeyboard();
|
||||
void SetupGA15DH();
|
||||
void SetupZones();
|
||||
|
||||
void ResizeZone(int zone, int new_size);
|
||||
|
||||
void DeviceUpdateLEDs();
|
||||
void UpdateZoneLEDs(int zone);
|
||||
void UpdateSingleLED(int led);
|
||||
|
||||
void SetCustomMode();
|
||||
void DeviceUpdateMode();
|
||||
|
||||
private:
|
||||
AuraCoreController* controller;
|
||||
};
|
||||
|
||||
@@ -36,10 +36,12 @@ static const gpu_pci_device device_list[] =
|
||||
{
|
||||
{ NVIDIA_VEN, NVIDIA_GTX1050_DEV, ASUS_SUB_VEN, ASUS_GTX1050_STRIX_O2G_GAMING, 0x29, "ASUS ROG Strix GTX 1050 O2G Gaming" },
|
||||
{ NVIDIA_VEN, NVIDIA_GTX1050TI_DEV, ASUS_SUB_VEN, ASUS_ROG_STRIX_GTX1050TI_O4G_GAMING, 0x29, "ASUS ROG Strix GTX 1050 TI O4G Gaming" },
|
||||
{ NVIDIA_VEN, NVIDIA_GTX1050TI_DEV, ASUS_SUB_VEN, ASUS_ROG_STRIX_GTX1050TI_O4G_GAMING_2, 0x29, "ASUS ROG Strix GTX 1050 TI O4G Gaming" },
|
||||
{ NVIDIA_VEN, NVIDIA_GTX1060_DEV, ASUS_SUB_VEN, ASUS_GTX1060_STRIX_6G_GAMING, 0x29, "ASUS GTX 1060 Strix 6G Gaming" },
|
||||
{ NVIDIA_VEN, NVIDIA_GTX1060_DEV, ASUS_SUB_VEN, ASUS_GTX1060_STRIX, 0x29, "ASUS GTX 1060 Strix" },
|
||||
{ NVIDIA_VEN, NVIDIA_GTX1070_DEV, ASUS_SUB_VEN, ASUS_GTX1070_STRIX_GAMING, 0x29, "ASUS GTX 1070 Strix Gaming" },
|
||||
{ NVIDIA_VEN, NVIDIA_GTX1070_DEV, ASUS_SUB_VEN, ASUS_GTX1070_STRIX_OC, 0x29, "ASUS GTX 1070 Strix OC" },
|
||||
{ NVIDIA_VEN, NVIDIA_GTX1070TI_DEV, ASUS_SUB_VEN, ASUS_ROG_STRIX_GTX1070TI_8G_GAMING, 0x29, "ASUS ROG Strix GTX1070 Ti 8G Gaming" },
|
||||
{ NVIDIA_VEN, NVIDIA_GTX1070TI_DEV, ASUS_SUB_VEN, ASUS_ROG_STRIX_GTX1070TI_A8G_GAMING, 0x29, "ASUS ROG Strix GTX1070 Ti A8G Gaming" },
|
||||
{ NVIDIA_VEN, NVIDIA_GTX1080_DEV, ASUS_SUB_VEN, ASUS_GTX1080_STRIX, 0x29, "ASUS GTX 1080 Strix OC" },
|
||||
{ NVIDIA_VEN, NVIDIA_GTX1080_DEV, ASUS_SUB_VEN, ASUS_ROG_STRIX_GTX1080_A8G_GAMING, 0x29, "ASUS ROG Strix GTX1080 A8G Gaming" },
|
||||
@@ -52,22 +54,34 @@ static const gpu_pci_device device_list[] =
|
||||
{ NVIDIA_VEN, NVIDIA_GTX1660S_DEV, ASUS_SUB_VEN, ASUS_ROG_STRIX_GTX1660S_O6G_GAMING, 0x2A, "ASUS ROG Strix GTX 1660S O6G Gaming" },
|
||||
{ NVIDIA_VEN, NVIDIA_GTX1660TI_DEV, ASUS_SUB_VEN, ASUS_ROG_GTX1660TI_OC, 0x2A, "ASUS ROG GTX 1660 Ti OC 6G" },
|
||||
{ NVIDIA_VEN, NVIDIA_RTX2060_TU106_DEV, ASUS_SUB_VEN, ASUS_ROG_STRIX_RTX2060_EVO_GAMING, 0x2A, "ASUS ROG STRIX RTX 2060 EVO Gaming 6G" },
|
||||
{ NVIDIA_VEN, NVIDIA_RTX2060_TU106_DEV, ASUS_SUB_VEN, ASUS_ROG_STRIX_RTX2060_O6G_GAMING, 0x2A, "ASUS ROG STRIX RTX 2060 O6G Gaming 6G" },
|
||||
{ NVIDIA_VEN, NVIDIA_RTX2060_TU104_DEV, ASUS_SUB_VEN, ASUS_ROG_STRIX_RTX2060_O6G_EVO_GAMING, 0x2A, "ASUS ROG STRIX RTX 2060 O6G EVO Gaming" },
|
||||
{ NVIDIA_VEN, NVIDIA_RTX2060S_OC_DEV, ASUS_SUB_VEN, ASUS_ROG_STRIX_RTX2060S_8G_GAMING, 0x2A, "ASUS ROG STRIX RTX 2060S 8G Gaming 8G" },
|
||||
{ NVIDIA_VEN, NVIDIA_RTX2060S_DEV, ASUS_SUB_VEN, ASUS_ROG_STRIX_RTX2060S_A8G_EVO_GAMING, 0x2A, "ASUS ROG STRIX RTX 2060S A8G EVO Gaming 8G"},
|
||||
{ NVIDIA_VEN, NVIDIA_RTX2060S_OC_DEV, ASUS_SUB_VEN, ASUS_ROG_STRIX_RTX2060S_O8G_GAMING, 0x2A, "ASUS ROG STRIX RTX 2060S O8G Gaming 8G" },
|
||||
{ NVIDIA_VEN, NVIDIA_RTX2060S_OC_DEV, ASUS_SUB_VEN, ASUS_ROG_STRIX_RTX2060S_A8G_GAMING, 0x2A, "ASUS ROG STRIX RTX 2060S A8G Gaming 8G" },
|
||||
{ NVIDIA_VEN, NVIDIA_RTX2070_OC_DEV, ASUS_SUB_VEN, ASUS_ROG_STRIX_RTX2070_A8G_GAMING, 0x2A, "ASUS ROG STRIX RTX 2070 A8G Gaming 8G" },
|
||||
{ NVIDIA_VEN, NVIDIA_RTX2070_OC_DEV, ASUS_SUB_VEN, ASUS_ROG_STRIX_RTX2070_O8G_GAMING, 0x2A, "ASUS ROG STRIX RTX 2070 O8G Gaming 8G" },
|
||||
{ NVIDIA_VEN, NVIDIA_RTX2070S_DEV, ASUS_SUB_VEN, ASUS_ROG_STRIX_RTX2070S_A8G_GAMING_86FF, 0x2A, "ASUS ROG STRIX RTX 2070S A8G Gaming 8G" },
|
||||
{ NVIDIA_VEN, NVIDIA_RTX2070S_OC_DEV, ASUS_SUB_VEN, ASUS_ROG_STRIX_RTX2070S_A8G_GAMING, 0x2A, "ASUS ROG STRIX RTX 2070S A8G Gaming 8G" },
|
||||
{ NVIDIA_VEN, NVIDIA_RTX2070S_OC_DEV, ASUS_SUB_VEN, ASUS_ROG_STRIX_RTX2070S_A8G_GAMING_8706, 0x2A, "ASUS ROG STRIX RTX 2070S A8G Gaming 8G" },
|
||||
{ NVIDIA_VEN, NVIDIA_RTX2070S_OC_DEV, ASUS_SUB_VEN, ASUS_ROG_STRIX_RTX2070S_O8G_GAMING_8729, 0x2A, "ASUS ROG STRIX RTX 2070S O8G Gaming" },
|
||||
{ NVIDIA_VEN, NVIDIA_RTX2070S_OC_DEV, ASUS_SUB_VEN, ASUS_ROG_STRIX_RTX2070S_8G_GAMING_8707, 0x2A, "ASUS ROG STRIX RTX 2070S 8G Gaming" },
|
||||
{ NVIDIA_VEN, NVIDIA_RTX2070S_OC_DEV, ASUS_SUB_VEN, ASUS_ROG_STRIX_RTX2070S_O8G_GAMING, 0x2A, "ASUS ROG STRIX RTX 2070S O8G Gaming 8G" },
|
||||
{ NVIDIA_VEN, NVIDIA_RTX2080_A_DEV, ASUS_SUB_VEN, ASUS_ROG_STRIX_RTX2080_O8G_GAMING, 0x2A, "ASUS ROG STRIX RTX 2080 O8G Gaming" },
|
||||
{ NVIDIA_VEN, NVIDIA_RTX2080S_DEV, ASUS_SUB_VEN, ASUS_ROG_STRIX_RTX2080S_A8G_GAMING, 0x2A, "ASUS ROG STRIX RTX 2080S A8G Gaming" },
|
||||
{ NVIDIA_VEN, NVIDIA_RTX2080S_DEV, ASUS_SUB_VEN, ASUS_ROG_STRIX_RTX2080S_O8G_GAMING, 0x2A, "ASUS ROG STRIX RTX 2080S O8G Gaming" },
|
||||
{ NVIDIA_VEN, NVIDIA_RTX2080S_DEV, ASUS_SUB_VEN, ASUS_ROG_STRIX_RTX2080S_O8G_WHITE, 0x2A, "ASUS ROG STRIX RTX 2080S O8G White" },
|
||||
{ NVIDIA_VEN, NVIDIA_RTX2080TI_DEV, ASUS_SUB_VEN, ASUS_ROG_STRIX_RTX2080TI_11G_GAMING, 0x2A, "ASUS ROG STRIX RTX 2080 Ti 11G Gaming" },
|
||||
{ NVIDIA_VEN, NVIDIA_RTX2080TI_A_DEV, ASUS_SUB_VEN, ASUS_ROG_STRIX_RTX2080TI_O11G_GAMING, 0x2A, "ASUS ROG STRIX RTX 2080 Ti O11G Gaming" },
|
||||
{ NVIDIA_VEN, NVIDIA_RTX2080TI_A_DEV, ASUS_SUB_VEN, ASUS_ROG_STRIX_RTX2080TI_A11G_GAMING, 0x2A, "ASUS ROG STRIX RTX 2080 Ti A11G Gaming" },
|
||||
{ NVIDIA_VEN, NVIDIA_RTX3060TI_LHR_DEV, ASUS_SUB_VEN, ASUS_TUF_RTX_3060_TI_O8G_OC, 0x2A, "ASUS TUF RTX 3060 Ti 8G Gaming OC" },
|
||||
{ AMD_GPU_VEN, AMD_VEGA10_DEV, ASUS_SUB_VEN, ASUS_AREZ_STRIX_VEGA56_08G_GAMING, 0x29, "ASUS AREZ Strix RX Vega 56 O8G" },
|
||||
{ AMD_GPU_VEN, AMD_VEGA10_DEV, ASUS_SUB_VEN, ASUS_VEGA64_STRIX, 0x29, "ASUS Vega 64 Strix" },
|
||||
{ AMD_GPU_VEN, AMD_NAVI10_DEV, ASUS_SUB_VEN, ASUS_RX5600XT_STRIX_O6G_GAMING, 0x2A, "ASUS RX 5600XT Strix O6G Gaming" },
|
||||
{ AMD_GPU_VEN, AMD_NAVI10_DEV, ASUS_SUB_VEN, ASUS_RX5700XT_STRIX_GAMING_OC, 0x2A, "ASUS RX 5700XT Strix Gaming OC" },
|
||||
{ AMD_GPU_VEN, AMD_POLARIS_DEV, ASUS_SUB_VEN, ASUS_RX480_STRIX_GAMING_OC, 0x29, "ASUS ROG STRIX RX480 Gaming OC" },
|
||||
{ AMD_GPU_VEN, AMD_POLARIS11, ASUS_SUB_VEN, ASUS_RX560_STRIX_4G_GAMING, 0x29, "ASUS ROG STRIX RX560 Gaming" },
|
||||
{ AMD_GPU_VEN, AMD_POLARIS_DEV, ASUS_SUB_VEN, ASUS_RX570_STRIX_O4G_GAMING_OC, 0x29, "ASUS RX 570 Strix O4G Gaming OC" },
|
||||
{ AMD_GPU_VEN, AMD_POLARIS_DEV, ASUS_SUB_VEN, ASUS_RX580_STRIX_GAMING_OC, 0x29, "ASUS RX 580 Strix Gaming OC" },
|
||||
{ AMD_GPU_VEN, AMD_POLARIS_DEV, ASUS_SUB_VEN, ASUS_RX580_STRIX_GAMING_TOP, 0x29, "ASUS RX 580 Strix Gaming TOP" },
|
||||
@@ -109,10 +123,7 @@ bool TestForAsusAuraGPUController(i2c_smbus_interface* bus, unsigned char addres
|
||||
|
||||
void DetectAsusAuraGPUControllers(std::vector<i2c_smbus_interface*> &busses)
|
||||
{
|
||||
AuraGPUController* new_aura_gpu;
|
||||
RGBController_AuraGPU* new_controller;
|
||||
|
||||
for (unsigned int bus = 0; bus < busses.size(); bus++)
|
||||
for(unsigned int bus = 0; bus < busses.size(); bus++)
|
||||
{
|
||||
for(unsigned int dev_idx = 0; dev_idx < GPU_NUM_DEVICES; dev_idx++)
|
||||
{
|
||||
@@ -122,12 +133,13 @@ void DetectAsusAuraGPUControllers(std::vector<i2c_smbus_interface*> &busses)
|
||||
busses[bus]->pci_subsystem_device == device_list[dev_idx].pci_subsystem_device)
|
||||
{
|
||||
LOG_DEBUG(GPU_DETECT_MESSAGE, ASUSGPU_CONTROLLER_NAME, bus, device_list[dev_idx].pci_device, device_list[dev_idx].pci_subsystem_device, device_list[dev_idx].name );
|
||||
if (TestForAsusAuraGPUController(busses[bus], device_list[dev_idx].controller_address))
|
||||
|
||||
if(TestForAsusAuraGPUController(busses[bus], device_list[dev_idx].controller_address))
|
||||
{
|
||||
new_aura_gpu = new AuraGPUController(busses[bus], device_list[dev_idx].controller_address);
|
||||
new_controller = new RGBController_AuraGPU(new_aura_gpu);
|
||||
new_controller->name = device_list[dev_idx].name;
|
||||
ResourceManager::get()->RegisterRGBController(new_controller);
|
||||
AuraGPUController* controller = new AuraGPUController(busses[bus], device_list[dev_idx].controller_address);
|
||||
RGBController_AuraGPU* rgb_controller = new RGBController_AuraGPU(controller);
|
||||
rgb_controller->name = device_list[dev_idx].name;
|
||||
ResourceManager::get()->RegisterRGBController(rgb_controller);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,204 +1,211 @@
|
||||
/*-----------------------------------------*\
|
||||
| RGBController_AsusAuraGPU.h |
|
||||
| |
|
||||
| Generic RGB Interface for Asus Aura GPU |
|
||||
| |
|
||||
| Jan Rettig (Klapstuhl) 14.02.2020 |
|
||||
\*-----------------------------------------*/
|
||||
|
||||
#include "RGBController_AsusAuraGPU.h"
|
||||
|
||||
int RGBController_AuraGPU::GetDeviceMode()
|
||||
{
|
||||
int dev_mode = aura_gpu->AuraGPURegisterRead(AURA_GPU_REG_MODE);
|
||||
int color_mode = MODE_COLORS_PER_LED;
|
||||
|
||||
if(dev_mode == AURA_GPU_MODE_STATIC)
|
||||
{
|
||||
if (aura_gpu->direct)
|
||||
{
|
||||
dev_mode = AURA_GPU_MODE_DIRECT;
|
||||
}
|
||||
}
|
||||
|
||||
switch(dev_mode)
|
||||
{
|
||||
case AURA_GPU_MODE_OFF:
|
||||
case AURA_GPU_MODE_SPECTRUM_CYCLE:
|
||||
color_mode = MODE_COLORS_NONE;
|
||||
break;
|
||||
}
|
||||
|
||||
for(std::size_t mode = 0; mode < modes.size(); mode++)
|
||||
{
|
||||
if(modes[mode].value == dev_mode)
|
||||
{
|
||||
active_mode = mode;
|
||||
modes[mode].color_mode = color_mode;
|
||||
}
|
||||
}
|
||||
|
||||
return(active_mode);
|
||||
}
|
||||
|
||||
RGBController_AuraGPU::RGBController_AuraGPU(AuraGPUController * aura_gpu_ptr)
|
||||
{
|
||||
aura_gpu = aura_gpu_ptr;
|
||||
|
||||
|
||||
name = aura_gpu->GetDeviceName();
|
||||
vendor = "ASUS";
|
||||
type = DEVICE_TYPE_GPU;
|
||||
description = "ASUS Aura GPU Device";
|
||||
version = "0.00.1";
|
||||
location = aura_gpu->GetDeviceLocation();
|
||||
|
||||
mode Direct;
|
||||
Direct.name = "Direct";
|
||||
Direct.value = AURA_GPU_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_GPU_MODE_OFF;
|
||||
Off.flags = 0;
|
||||
Off.color_mode = MODE_COLORS_NONE;
|
||||
modes.push_back(Off);
|
||||
|
||||
mode Static;
|
||||
Static.name = "Static";
|
||||
Static.value = AURA_GPU_MODE_STATIC;
|
||||
Static.flags = MODE_FLAG_HAS_PER_LED_COLOR;
|
||||
Static.color_mode = MODE_COLORS_PER_LED;
|
||||
modes.push_back(Static);
|
||||
|
||||
mode Breathing;
|
||||
Breathing.name = "Breathing";
|
||||
Breathing.value = AURA_GPU_MODE_BREATHING;
|
||||
Breathing.flags = MODE_FLAG_HAS_PER_LED_COLOR;
|
||||
Breathing.color_mode = MODE_COLORS_PER_LED;
|
||||
modes.push_back(Breathing);
|
||||
|
||||
mode Flashing;
|
||||
Flashing.name = "Flashing";
|
||||
Flashing.value = AURA_GPU_MODE_FLASHING;
|
||||
Flashing.flags = MODE_FLAG_HAS_PER_LED_COLOR;
|
||||
Flashing.color_mode = MODE_COLORS_PER_LED;
|
||||
modes.push_back(Flashing);
|
||||
|
||||
mode Spectrum_Cycle;
|
||||
Spectrum_Cycle.name = "Spectrum Cycle";
|
||||
Spectrum_Cycle.value = AURA_GPU_MODE_SPECTRUM_CYCLE;
|
||||
Spectrum_Cycle.flags = 0;
|
||||
Spectrum_Cycle.color_mode = MODE_COLORS_NONE;
|
||||
modes.push_back(Spectrum_Cycle);
|
||||
|
||||
SetupZones();
|
||||
|
||||
active_mode = GetDeviceMode();
|
||||
}
|
||||
|
||||
RGBController_AuraGPU::~RGBController_AuraGPU()
|
||||
{
|
||||
delete aura_gpu;
|
||||
}
|
||||
|
||||
void RGBController_AuraGPU::SetupZones()
|
||||
{
|
||||
/*---------------------------------------------------------*\
|
||||
| Set up zone |
|
||||
\*---------------------------------------------------------*/
|
||||
zone aura_gpu_zone;
|
||||
aura_gpu_zone.name = "GPU";
|
||||
aura_gpu_zone.type = ZONE_TYPE_SINGLE;
|
||||
aura_gpu_zone.leds_min = 1;
|
||||
aura_gpu_zone.leds_max = 1;
|
||||
aura_gpu_zone.leds_count = 1;
|
||||
aura_gpu_zone.matrix_map = NULL;
|
||||
zones.push_back(aura_gpu_zone);
|
||||
|
||||
/*---------------------------------------------------------*\
|
||||
| Set up LED |
|
||||
\*---------------------------------------------------------*/
|
||||
led aura_gpu_led;
|
||||
aura_gpu_led.name = "GPU";
|
||||
leds.push_back(aura_gpu_led);
|
||||
|
||||
SetupColors();
|
||||
|
||||
/*---------------------------------------------------------*\
|
||||
| Initialize color |
|
||||
\*---------------------------------------------------------*/
|
||||
unsigned char red = aura_gpu->GetLEDRed();
|
||||
unsigned char grn = aura_gpu->GetLEDGreen();
|
||||
unsigned char blu = aura_gpu->GetLEDBlue();
|
||||
|
||||
colors[0] = ToRGBColor(red, grn, blu);
|
||||
}
|
||||
|
||||
void RGBController_AuraGPU::ResizeZone(int /*zone*/, int /*new_size*/)
|
||||
{
|
||||
/*---------------------------------------------------------*\
|
||||
| This device does not support resizing zones |
|
||||
\*---------------------------------------------------------*/
|
||||
}
|
||||
|
||||
void RGBController_AuraGPU::DeviceUpdateLEDs()
|
||||
{
|
||||
for(std::size_t led = 0; led < colors.size(); led++)
|
||||
{
|
||||
unsigned char red = RGBGetRValue(colors[led]);
|
||||
unsigned char grn = RGBGetGValue(colors[led]);
|
||||
unsigned char blu = RGBGetBValue(colors[led]);
|
||||
|
||||
if (GetMode() == 0)
|
||||
{
|
||||
aura_gpu->SetLEDColorsDirect(red, grn, blu);
|
||||
}
|
||||
else
|
||||
{
|
||||
aura_gpu->SetLEDColorsEffect(red, grn, blu);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void RGBController_AuraGPU::UpdateZoneLEDs(int /*zone*/)
|
||||
{
|
||||
DeviceUpdateLEDs();
|
||||
}
|
||||
|
||||
void RGBController_AuraGPU::UpdateSingleLED(int /*led*/)
|
||||
{
|
||||
DeviceUpdateLEDs();
|
||||
}
|
||||
|
||||
void RGBController_AuraGPU::SetCustomMode()
|
||||
{
|
||||
active_mode = 0;
|
||||
}
|
||||
|
||||
void RGBController_AuraGPU::DeviceUpdateMode()
|
||||
{
|
||||
int new_mode = modes[active_mode].value;
|
||||
aura_gpu->direct = false;
|
||||
|
||||
switch(new_mode)
|
||||
{
|
||||
|
||||
// Set all LEDs to 0 and Mode to static as a workaround for the non existing Off Mode
|
||||
case AURA_GPU_MODE_OFF:
|
||||
aura_gpu->SetLEDColorsEffect(0, 0, 0);
|
||||
new_mode = AURA_GPU_MODE_STATIC;
|
||||
break;
|
||||
|
||||
// Direct mode is done by switching to Static and not applying color changes
|
||||
case AURA_GPU_MODE_DIRECT:
|
||||
aura_gpu->direct = true;
|
||||
new_mode = AURA_GPU_MODE_STATIC;
|
||||
break;
|
||||
}
|
||||
|
||||
aura_gpu->SetMode(new_mode);
|
||||
}
|
||||
/*-----------------------------------------*\
|
||||
| RGBController_AsusAuraGPU.h |
|
||||
| |
|
||||
| Generic RGB Interface for Asus Aura GPU |
|
||||
| |
|
||||
| Jan Rettig (Klapstuhl) 14.02.2020 |
|
||||
\*-----------------------------------------*/
|
||||
|
||||
#include "RGBController_AsusAuraGPU.h"
|
||||
|
||||
int RGBController_AuraGPU::GetDeviceMode()
|
||||
{
|
||||
int dev_mode = controller->AuraGPURegisterRead(AURA_GPU_REG_MODE);
|
||||
int color_mode = MODE_COLORS_PER_LED;
|
||||
|
||||
if(dev_mode == AURA_GPU_MODE_STATIC)
|
||||
{
|
||||
if (controller->direct)
|
||||
{
|
||||
dev_mode = AURA_GPU_MODE_DIRECT;
|
||||
}
|
||||
}
|
||||
|
||||
switch(dev_mode)
|
||||
{
|
||||
case AURA_GPU_MODE_OFF:
|
||||
case AURA_GPU_MODE_SPECTRUM_CYCLE:
|
||||
color_mode = MODE_COLORS_NONE;
|
||||
break;
|
||||
}
|
||||
|
||||
for(std::size_t mode = 0; mode < modes.size(); mode++)
|
||||
{
|
||||
if(modes[mode].value == dev_mode)
|
||||
{
|
||||
active_mode = mode;
|
||||
modes[mode].color_mode = color_mode;
|
||||
}
|
||||
}
|
||||
|
||||
return(active_mode);
|
||||
}
|
||||
|
||||
/**------------------------------------------------------------------*\
|
||||
@name Asus Aura GPU
|
||||
@type SMBus
|
||||
@save :x:
|
||||
@direct :white_check_mark:
|
||||
@effects :white_check_mark::
|
||||
@detectors DetectAsusAuraGPUControllers
|
||||
@comment
|
||||
\*-------------------------------------------------------------------*/
|
||||
|
||||
RGBController_AuraGPU::RGBController_AuraGPU(AuraGPUController * controller_ptr)
|
||||
{
|
||||
controller = controller_ptr;
|
||||
|
||||
name = controller->GetDeviceName();
|
||||
vendor = "ASUS";
|
||||
type = DEVICE_TYPE_GPU;
|
||||
description = "ASUS Aura GPU Device";
|
||||
location = controller->GetDeviceLocation();
|
||||
|
||||
mode Direct;
|
||||
Direct.name = "Direct";
|
||||
Direct.value = AURA_GPU_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_GPU_MODE_OFF;
|
||||
Off.flags = 0;
|
||||
Off.color_mode = MODE_COLORS_NONE;
|
||||
modes.push_back(Off);
|
||||
|
||||
mode Static;
|
||||
Static.name = "Static";
|
||||
Static.value = AURA_GPU_MODE_STATIC;
|
||||
Static.flags = MODE_FLAG_HAS_PER_LED_COLOR;
|
||||
Static.color_mode = MODE_COLORS_PER_LED;
|
||||
modes.push_back(Static);
|
||||
|
||||
mode Breathing;
|
||||
Breathing.name = "Breathing";
|
||||
Breathing.value = AURA_GPU_MODE_BREATHING;
|
||||
Breathing.flags = MODE_FLAG_HAS_PER_LED_COLOR;
|
||||
Breathing.color_mode = MODE_COLORS_PER_LED;
|
||||
modes.push_back(Breathing);
|
||||
|
||||
mode Flashing;
|
||||
Flashing.name = "Flashing";
|
||||
Flashing.value = AURA_GPU_MODE_FLASHING;
|
||||
Flashing.flags = MODE_FLAG_HAS_PER_LED_COLOR;
|
||||
Flashing.color_mode = MODE_COLORS_PER_LED;
|
||||
modes.push_back(Flashing);
|
||||
|
||||
mode Spectrum_Cycle;
|
||||
Spectrum_Cycle.name = "Spectrum Cycle";
|
||||
Spectrum_Cycle.value = AURA_GPU_MODE_SPECTRUM_CYCLE;
|
||||
Spectrum_Cycle.flags = 0;
|
||||
Spectrum_Cycle.color_mode = MODE_COLORS_NONE;
|
||||
modes.push_back(Spectrum_Cycle);
|
||||
|
||||
SetupZones();
|
||||
|
||||
active_mode = GetDeviceMode();
|
||||
}
|
||||
|
||||
RGBController_AuraGPU::~RGBController_AuraGPU()
|
||||
{
|
||||
delete controller;
|
||||
}
|
||||
|
||||
void RGBController_AuraGPU::SetupZones()
|
||||
{
|
||||
/*---------------------------------------------------------*\
|
||||
| Set up zone |
|
||||
\*---------------------------------------------------------*/
|
||||
zone aura_gpu_zone;
|
||||
aura_gpu_zone.name = "GPU";
|
||||
aura_gpu_zone.type = ZONE_TYPE_SINGLE;
|
||||
aura_gpu_zone.leds_min = 1;
|
||||
aura_gpu_zone.leds_max = 1;
|
||||
aura_gpu_zone.leds_count = 1;
|
||||
aura_gpu_zone.matrix_map = NULL;
|
||||
zones.push_back(aura_gpu_zone);
|
||||
|
||||
/*---------------------------------------------------------*\
|
||||
| Set up LED |
|
||||
\*---------------------------------------------------------*/
|
||||
led aura_gpu_led;
|
||||
aura_gpu_led.name = "GPU";
|
||||
leds.push_back(aura_gpu_led);
|
||||
|
||||
SetupColors();
|
||||
|
||||
/*---------------------------------------------------------*\
|
||||
| Initialize color |
|
||||
\*---------------------------------------------------------*/
|
||||
unsigned char red = controller->GetLEDRed();
|
||||
unsigned char grn = controller->GetLEDGreen();
|
||||
unsigned char blu = controller->GetLEDBlue();
|
||||
|
||||
colors[0] = ToRGBColor(red, grn, blu);
|
||||
}
|
||||
|
||||
void RGBController_AuraGPU::ResizeZone(int /*zone*/, int /*new_size*/)
|
||||
{
|
||||
/*---------------------------------------------------------*\
|
||||
| This device does not support resizing zones |
|
||||
\*---------------------------------------------------------*/
|
||||
}
|
||||
|
||||
void RGBController_AuraGPU::DeviceUpdateLEDs()
|
||||
{
|
||||
for(std::size_t led = 0; led < colors.size(); led++)
|
||||
{
|
||||
unsigned char red = RGBGetRValue(colors[led]);
|
||||
unsigned char grn = RGBGetGValue(colors[led]);
|
||||
unsigned char blu = RGBGetBValue(colors[led]);
|
||||
|
||||
if (GetMode() == 0)
|
||||
{
|
||||
controller->SetLEDColorsDirect(red, grn, blu);
|
||||
}
|
||||
else
|
||||
{
|
||||
controller->SetLEDColorsEffect(red, grn, blu);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void RGBController_AuraGPU::UpdateZoneLEDs(int /*zone*/)
|
||||
{
|
||||
DeviceUpdateLEDs();
|
||||
}
|
||||
|
||||
void RGBController_AuraGPU::UpdateSingleLED(int /*led*/)
|
||||
{
|
||||
DeviceUpdateLEDs();
|
||||
}
|
||||
|
||||
void RGBController_AuraGPU::SetCustomMode()
|
||||
{
|
||||
active_mode = 0;
|
||||
}
|
||||
|
||||
void RGBController_AuraGPU::DeviceUpdateMode()
|
||||
{
|
||||
int new_mode = modes[active_mode].value;
|
||||
controller->direct = false;
|
||||
|
||||
switch(new_mode)
|
||||
{
|
||||
// Set all LEDs to 0 and Mode to static as a workaround for the non existing Off Mode
|
||||
case AURA_GPU_MODE_OFF:
|
||||
controller->SetLEDColorsEffect(0, 0, 0);
|
||||
new_mode = AURA_GPU_MODE_STATIC;
|
||||
break;
|
||||
|
||||
// Direct mode is done by switching to Static and not applying color changes
|
||||
case AURA_GPU_MODE_DIRECT:
|
||||
controller->direct = true;
|
||||
new_mode = AURA_GPU_MODE_STATIC;
|
||||
break;
|
||||
}
|
||||
|
||||
controller->SetMode(new_mode);
|
||||
}
|
||||
|
||||
@@ -1,35 +1,35 @@
|
||||
/*-----------------------------------------*\
|
||||
| RGBController_AsusAuraGPU.h |
|
||||
| |
|
||||
| Generic RGB Interface for Asus Aura GPU |
|
||||
| |
|
||||
| Jan Rettig (Klapstuhl) 14.02.2020 |
|
||||
\*-----------------------------------------*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "RGBController.h"
|
||||
#include "AsusAuraGPUController.h"
|
||||
|
||||
class RGBController_AuraGPU : public RGBController
|
||||
{
|
||||
public:
|
||||
RGBController_AuraGPU(AuraGPUController* aura_gpu_ptr);
|
||||
~RGBController_AuraGPU();
|
||||
|
||||
void SetupZones();
|
||||
|
||||
void ResizeZone(int zone, int new_size);
|
||||
|
||||
void DeviceUpdateLEDs();
|
||||
void UpdateZoneLEDs(int zone);
|
||||
void UpdateSingleLED(int led);
|
||||
|
||||
void SetCustomMode();
|
||||
void DeviceUpdateMode();
|
||||
|
||||
private:
|
||||
AuraGPUController* aura_gpu;
|
||||
|
||||
int GetDeviceMode();
|
||||
};
|
||||
/*-----------------------------------------*\
|
||||
| RGBController_AsusAuraGPU.h |
|
||||
| |
|
||||
| Generic RGB Interface for Asus Aura GPU |
|
||||
| |
|
||||
| Jan Rettig (Klapstuhl) 14.02.2020 |
|
||||
\*-----------------------------------------*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "RGBController.h"
|
||||
#include "AsusAuraGPUController.h"
|
||||
|
||||
class RGBController_AuraGPU : public RGBController
|
||||
{
|
||||
public:
|
||||
RGBController_AuraGPU(AuraGPUController* controller_ptr);
|
||||
~RGBController_AuraGPU();
|
||||
|
||||
void SetupZones();
|
||||
|
||||
void ResizeZone(int zone, int new_size);
|
||||
|
||||
void DeviceUpdateLEDs();
|
||||
void UpdateZoneLEDs(int zone);
|
||||
void UpdateSingleLED(int led);
|
||||
|
||||
void SetCustomMode();
|
||||
void DeviceUpdateMode();
|
||||
|
||||
private:
|
||||
AuraGPUController* controller;
|
||||
|
||||
int GetDeviceMode();
|
||||
};
|
||||
|
||||
@@ -19,7 +19,7 @@ AuraHeadsetStandController::AuraHeadsetStandController(hid_device* dev_handle, c
|
||||
|
||||
AuraHeadsetStandController::~AuraHeadsetStandController()
|
||||
{
|
||||
hid_close(dev);
|
||||
hid_close(dev);
|
||||
}
|
||||
|
||||
std::string AuraHeadsetStandController::GetDeviceLocation()
|
||||
|
||||
@@ -0,0 +1,94 @@
|
||||
/*-----------------------------------------*\
|
||||
| AsusAuraMonitorController.cpp |
|
||||
| |
|
||||
| Driver for ASUS Aura RGB USB |
|
||||
| lighting controller |
|
||||
| |
|
||||
| Mola19 08/03/2021 |
|
||||
\*-----------------------------------------*/
|
||||
|
||||
#include "AsusAuraMonitorController.h"
|
||||
|
||||
#include <cstring>
|
||||
#include "LogManager.h"
|
||||
|
||||
AuraMonitorController::AuraMonitorController(hid_device* dev_handle, const char* path)
|
||||
{
|
||||
dev = dev_handle;
|
||||
location = path;
|
||||
}
|
||||
|
||||
AuraMonitorController::~AuraMonitorController()
|
||||
{
|
||||
hid_close(dev);
|
||||
}
|
||||
|
||||
std::string AuraMonitorController::GetDeviceLocation()
|
||||
{
|
||||
return("HID: " + location);
|
||||
}
|
||||
|
||||
std::string AuraMonitorController::GetSerialString()
|
||||
{
|
||||
wchar_t serial_string[128];
|
||||
int ret = hid_get_serial_number_string(dev, serial_string, 128);
|
||||
|
||||
if(ret != 0)
|
||||
{
|
||||
return("");
|
||||
}
|
||||
|
||||
std::wstring return_wstring = serial_string;
|
||||
std::string return_string(return_wstring.begin(), return_wstring.end());
|
||||
|
||||
return(return_string);
|
||||
}
|
||||
|
||||
void AuraMonitorController::UpdateLed
|
||||
(
|
||||
int led,
|
||||
unsigned char red,
|
||||
unsigned char green,
|
||||
unsigned char blue
|
||||
)
|
||||
{
|
||||
unsigned char usb_buf[8];
|
||||
|
||||
memset(usb_buf, 0x00, sizeof(usb_buf));
|
||||
|
||||
usb_buf[0x00] = 0x03;
|
||||
usb_buf[0x01] = 0x02;
|
||||
usb_buf[0x02] = 0xa1;
|
||||
usb_buf[0x03] = 0x80;
|
||||
|
||||
usb_buf[0x04] = 16 + led * 3;
|
||||
usb_buf[0x05] = red;
|
||||
|
||||
hid_send_feature_report(dev, usb_buf, 8);
|
||||
|
||||
usb_buf[0x04] = 16 + led * 3 + 1;
|
||||
usb_buf[0x05] = blue;
|
||||
|
||||
hid_send_feature_report(dev, usb_buf, 8);
|
||||
|
||||
usb_buf[0x04] = 16 + led * 3 + 2;
|
||||
usb_buf[0x05] = green;
|
||||
|
||||
hid_send_feature_report(dev, usb_buf, 8);
|
||||
}
|
||||
|
||||
void AuraMonitorController::ApplyChanges()
|
||||
{
|
||||
unsigned char usb_buf[8];
|
||||
|
||||
memset(usb_buf, 0x00, sizeof(usb_buf));
|
||||
|
||||
usb_buf[0x00] = 0x03;
|
||||
usb_buf[0x01] = 0x02;
|
||||
usb_buf[0x02] = 0xa1;
|
||||
usb_buf[0x03] = 0x80;
|
||||
usb_buf[0x04] = 0xa0;
|
||||
usb_buf[0x05] = 0x01;
|
||||
|
||||
hid_send_feature_report(dev, usb_buf, 8);
|
||||
}
|
||||
@@ -0,0 +1,31 @@
|
||||
/*-----------------------------------------*\
|
||||
| AsusAuraMonitorController.h |
|
||||
| |
|
||||
| Definitions and types for ASUS Aura |
|
||||
| USB RGB lighting controller |
|
||||
| |
|
||||
| Mola19 08/03/2023 |
|
||||
\*-----------------------------------------*/
|
||||
|
||||
#include "RGBController.h"
|
||||
|
||||
#include <hidapi/hidapi.h>
|
||||
|
||||
#pragma once
|
||||
|
||||
class AuraMonitorController
|
||||
{
|
||||
public:
|
||||
AuraMonitorController(hid_device* dev_handle, const char* path);
|
||||
virtual ~AuraMonitorController();
|
||||
|
||||
std::string GetDeviceLocation();
|
||||
std::string GetSerialString();
|
||||
|
||||
void UpdateLed(int led, unsigned char red, unsigned char green, unsigned char blue);
|
||||
void ApplyChanges();
|
||||
|
||||
private:
|
||||
hid_device* dev;
|
||||
std::string location;
|
||||
};
|
||||
@@ -82,6 +82,15 @@ std::string AuraMouseController::GetVersion(bool wireless, int protocol)
|
||||
str = "0." + str.substr(0, 2) + "." + str.substr(2, 2);
|
||||
}
|
||||
break;
|
||||
|
||||
case 3:
|
||||
{
|
||||
char version[9];
|
||||
int offset = (wireless ? 13 : 4);
|
||||
snprintf(version, 9, "%2d.%02d.%02d", usb_buf_out[offset + 1], usb_buf_out[offset + 2], usb_buf_out[offset + 3]);
|
||||
str = std::string(version);
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
return str;
|
||||
@@ -125,28 +134,41 @@ void AuraMouseController::SendUpdate
|
||||
/*-----------------------------------------------------*\
|
||||
| Set up message packet |
|
||||
\*-----------------------------------------------------*/
|
||||
usb_buf[0x00] = 0x00;
|
||||
usb_buf[0x01] = 0x51;
|
||||
usb_buf[0x02] = 0x28;
|
||||
usb_buf[0x03] = zone;
|
||||
usb_buf[0x04] = 0x00;
|
||||
usb_buf[0x05] = mode;
|
||||
usb_buf[0x06] = brightness;
|
||||
usb_buf[0x07] = red;
|
||||
usb_buf[0x08] = grn;
|
||||
usb_buf[0x09] = blu;
|
||||
|
||||
|
||||
if (device_pid == AURA_ROG_GLADIUS_II_ORIGIN_PNK_LTD_PID)
|
||||
{
|
||||
usb_buf[0x0A] = 0;
|
||||
usb_buf[0x0B] = 0;
|
||||
usb_buf[0x0C] = 0;
|
||||
usb_buf[0x0D] = dir;
|
||||
usb_buf[0x0E] = random;
|
||||
usb_buf[0x0F] = speed;
|
||||
// this device supports 2 color for breathing,
|
||||
// but since this mode is per led and openrgb doesn't support 2 colors per led this feature is not implemented
|
||||
usb_buf[0x00] = 0x00;
|
||||
usb_buf[0x01] = 0x51;
|
||||
usb_buf[0x02] = 0x28;
|
||||
usb_buf[0x03] = zone;
|
||||
usb_buf[0x04] = 0x00;
|
||||
usb_buf[0x05] = mode;
|
||||
usb_buf[0x06] = brightness;
|
||||
usb_buf[0x07] = 0x00; // boolean signaling if the 2nd set of colors is in use
|
||||
usb_buf[0x08] = red;
|
||||
usb_buf[0x09] = grn;
|
||||
usb_buf[0x0A] = blu;
|
||||
usb_buf[0x0B] = 0; // 2nd red
|
||||
usb_buf[0x0C] = 0; // 2nd green
|
||||
usb_buf[0x0D] = 0; // 2nd blue
|
||||
usb_buf[0x0E] = dir;
|
||||
usb_buf[0x0F] = random;
|
||||
usb_buf[0x10] = speed;
|
||||
}
|
||||
else
|
||||
{
|
||||
usb_buf[0x00] = 0x00;
|
||||
usb_buf[0x01] = 0x51;
|
||||
usb_buf[0x02] = 0x28;
|
||||
usb_buf[0x03] = zone;
|
||||
usb_buf[0x04] = 0x00;
|
||||
usb_buf[0x05] = mode;
|
||||
usb_buf[0x06] = brightness;
|
||||
usb_buf[0x07] = red;
|
||||
usb_buf[0x08] = grn;
|
||||
usb_buf[0x09] = blu;
|
||||
usb_buf[0x0A] = dir;
|
||||
usb_buf[0x0B] = random;
|
||||
usb_buf[0x0C] = speed;
|
||||
@@ -158,5 +180,5 @@ void AuraMouseController::SendUpdate
|
||||
hid_write(dev, usb_buf, ASUS_AURA_MOUSE_PACKET_SIZE);
|
||||
|
||||
unsigned char usb_buf_out[ASUS_AURA_MOUSE_PACKET_SIZE];
|
||||
hid_read(dev, usb_buf_out, ASUS_AURA_MOUSE_PACKET_SIZE);
|
||||
hid_read_timeout(dev, usb_buf_out, ASUS_AURA_MOUSE_PACKET_SIZE, 10);
|
||||
}
|
||||
|
||||
@@ -40,7 +40,7 @@ public:
|
||||
bool random,
|
||||
unsigned char speed,
|
||||
unsigned char brightness
|
||||
);
|
||||
);
|
||||
|
||||
uint16_t device_pid;
|
||||
|
||||
|
||||
@@ -24,7 +24,12 @@
|
||||
#define AURA_ROG_PUGIO_PID 0x1846
|
||||
#define AURA_ROG_PUGIO_II_WIRED_PID 0x1906
|
||||
#define AURA_ROG_PUGIO_II_WIRELESS_PID 0x1908
|
||||
#define AURA_ROG_STRIX_IMPACT_PID 0x1847
|
||||
#define AURA_ROG_STRIX_IMPACT_II_PID 0x18E1
|
||||
#define AURA_ROG_KERIS 0x195C
|
||||
#define AURA_ROG_KERIS_WIRELESS_USB_PID 0x195E
|
||||
#define AURA_ROG_KERIS_WIRELESS_2_4_PID 0x1960
|
||||
#define AURA_ROG_KERIS_WIRELESS_BT_PID 0x1962
|
||||
#define AURA_TUF_M3_PID 0x1910
|
||||
#define AURA_TUF_M5_PID 0x1898
|
||||
|
||||
@@ -211,6 +216,17 @@ static std::map<int,mouse_type> aura_mouse_devices =
|
||||
{ AURA_MOUSE_MODE_STATIC, AURA_MOUSE_MODE_BREATHING, AURA_MOUSE_MODE_SPECTRUM, AURA_MOUSE_MODE_WAVE, AURA_MOUSE_MODE_REACTIVE, AURA_MOUSE_MODE_COMET, AURA_MOUSE_MODE_BATTERY }
|
||||
}
|
||||
},
|
||||
{
|
||||
AURA_ROG_STRIX_IMPACT_PID, // ROG Strix Impact
|
||||
{
|
||||
0,
|
||||
0,
|
||||
false,
|
||||
3,
|
||||
{ AURA_MOUSE_ZONE_LOGO },
|
||||
{ AURA_MOUSE_MODE_STATIC, AURA_MOUSE_MODE_BREATHING, AURA_MOUSE_MODE_SPECTRUM }
|
||||
}
|
||||
},
|
||||
{
|
||||
AURA_ROG_STRIX_IMPACT_II_PID, // ROG Strix Impact II
|
||||
{
|
||||
@@ -222,6 +238,50 @@ static std::map<int,mouse_type> aura_mouse_devices =
|
||||
{ AURA_MOUSE_MODE_STATIC, AURA_MOUSE_MODE_BREATHING, AURA_MOUSE_MODE_SPECTRUM, AURA_MOUSE_MODE_REACTIVE }
|
||||
}
|
||||
},
|
||||
{
|
||||
AURA_ROG_KERIS, // ROG Keris
|
||||
{
|
||||
0,
|
||||
0,
|
||||
false,
|
||||
1, // might be the wrong protocol for version
|
||||
{ AURA_MOUSE_ZONE_LOGO, AURA_MOUSE_ZONE_SCROLL },
|
||||
{ AURA_MOUSE_MODE_STATIC, AURA_MOUSE_MODE_BREATHING, AURA_MOUSE_MODE_SPECTRUM, AURA_MOUSE_MODE_REACTIVE }
|
||||
}
|
||||
},
|
||||
{
|
||||
AURA_ROG_KERIS_WIRELESS_USB_PID, // ROG Keris
|
||||
{
|
||||
0,
|
||||
0,
|
||||
true,
|
||||
1, // might be the wrong protocol for version
|
||||
{ AURA_MOUSE_ZONE_LOGO, AURA_MOUSE_ZONE_SCROLL },
|
||||
{ AURA_MOUSE_MODE_STATIC, AURA_MOUSE_MODE_BREATHING, AURA_MOUSE_MODE_SPECTRUM, AURA_MOUSE_MODE_NONE, AURA_MOUSE_MODE_REACTIVE, AURA_MOUSE_MODE_NONE, AURA_MOUSE_MODE_BATTERY }
|
||||
}
|
||||
},
|
||||
{
|
||||
AURA_ROG_KERIS_WIRELESS_2_4_PID, // ROG Keris
|
||||
{
|
||||
0,
|
||||
0,
|
||||
true,
|
||||
1, // might be the wrong protocol for version
|
||||
{ AURA_MOUSE_ZONE_LOGO, AURA_MOUSE_ZONE_SCROLL },
|
||||
{ AURA_MOUSE_MODE_STATIC, AURA_MOUSE_MODE_BREATHING, AURA_MOUSE_MODE_SPECTRUM, AURA_MOUSE_MODE_NONE, AURA_MOUSE_MODE_REACTIVE, AURA_MOUSE_MODE_NONE, AURA_MOUSE_MODE_BATTERY }
|
||||
}
|
||||
},
|
||||
{
|
||||
AURA_ROG_KERIS_WIRELESS_BT_PID, // ROG Keris
|
||||
{
|
||||
0,
|
||||
0,
|
||||
true,
|
||||
1, // might be the wrong protocol for version
|
||||
{ AURA_MOUSE_ZONE_LOGO, AURA_MOUSE_ZONE_SCROLL },
|
||||
{ AURA_MOUSE_MODE_STATIC, AURA_MOUSE_MODE_BREATHING, AURA_MOUSE_MODE_SPECTRUM, AURA_MOUSE_MODE_NONE, AURA_MOUSE_MODE_REACTIVE, AURA_MOUSE_MODE_NONE, AURA_MOUSE_MODE_BATTERY }
|
||||
}
|
||||
},
|
||||
{
|
||||
AURA_TUF_M3_PID, // TUF M3
|
||||
{
|
||||
|
||||
@@ -0,0 +1,134 @@
|
||||
/*-----------------------------------------*\
|
||||
| AsusAuraMousematController.cpp |
|
||||
| |
|
||||
| Driver for ASUS Aura RGB USB |
|
||||
| lighting controller |
|
||||
| |
|
||||
| Adam Honse (CalcProgrammer1) 1/10/2022 |
|
||||
\*-----------------------------------------*/
|
||||
|
||||
#include "AsusAuraMousematController.h"
|
||||
#include <cstring>
|
||||
|
||||
AuraMousematController::AuraMousematController(hid_device* dev_handle, const char* path)
|
||||
{
|
||||
dev = dev_handle;
|
||||
location = path;
|
||||
}
|
||||
|
||||
AuraMousematController::~AuraMousematController()
|
||||
{
|
||||
hid_close(dev);
|
||||
}
|
||||
|
||||
std::string AuraMousematController::GetDeviceLocation()
|
||||
{
|
||||
return("HID: " + location);
|
||||
}
|
||||
|
||||
std::string AuraMousematController::GetSerialString()
|
||||
{
|
||||
wchar_t serial_string[128];
|
||||
int ret = hid_get_serial_number_string(dev, serial_string, 128);
|
||||
|
||||
if(ret != 0)
|
||||
{
|
||||
return("");
|
||||
}
|
||||
|
||||
std::wstring return_wstring = serial_string;
|
||||
std::string return_string(return_wstring.begin(), return_wstring.end());
|
||||
|
||||
return(return_string);
|
||||
}
|
||||
|
||||
std::string AuraMousematController::GetVersion()
|
||||
{
|
||||
unsigned char usb_buf[65];
|
||||
memset(usb_buf, 0x00, sizeof(usb_buf));
|
||||
usb_buf[0x00] = 0xEE;
|
||||
usb_buf[0x01] = 0x12;
|
||||
usb_buf[0x02] = 0x00;
|
||||
|
||||
hid_write(dev, usb_buf, 65);
|
||||
|
||||
unsigned char usb_buf_out[65];
|
||||
hid_read(dev, usb_buf_out, 65);
|
||||
|
||||
char version[5];
|
||||
snprintf(version, 5, "%04X", (usb_buf_out[6] << 8) | usb_buf_out[7]);
|
||||
return std::string(version);
|
||||
}
|
||||
|
||||
void AuraMousematController::UpdateLeds
|
||||
(
|
||||
std::vector<RGBColor> colors
|
||||
)
|
||||
{
|
||||
unsigned char usb_buf[65];
|
||||
|
||||
memset(usb_buf, 0x00, sizeof(usb_buf));
|
||||
|
||||
usb_buf[0x00] = 0xEE;
|
||||
usb_buf[0x01] = 0xC0;
|
||||
usb_buf[0x02] = 0x81;
|
||||
usb_buf[0x03] = 0x00;
|
||||
usb_buf[0x04] = 0x00;
|
||||
|
||||
for(unsigned int i = 0; i < 60; i += 4)
|
||||
{
|
||||
usb_buf[5 + i] = 0x00;
|
||||
usb_buf[6 + i] = RGBGetRValue(colors[i / 4]);
|
||||
usb_buf[7 + i] = RGBGetGValue(colors[i / 4]);
|
||||
usb_buf[8 + i] = RGBGetBValue(colors[i / 4]);
|
||||
}
|
||||
|
||||
hid_write(dev, usb_buf, 65);
|
||||
}
|
||||
|
||||
void AuraMousematController::UpdateDevice
|
||||
(
|
||||
unsigned char mode,
|
||||
std::vector<RGBColor> colors,
|
||||
unsigned char speed,
|
||||
unsigned char brightness,
|
||||
unsigned char pattern
|
||||
)
|
||||
{
|
||||
unsigned char usb_buf[65];
|
||||
|
||||
memset(usb_buf, 0x00, sizeof(usb_buf));
|
||||
|
||||
usb_buf[0x00] = 0xEE;
|
||||
usb_buf[0x01] = 0x51;
|
||||
usb_buf[0x02] = 0x28;
|
||||
usb_buf[0x03] = 0x00;
|
||||
usb_buf[0x04] = 0x00;
|
||||
usb_buf[0x05] = mode;
|
||||
usb_buf[0x06] = speed;
|
||||
usb_buf[0x07] = brightness;
|
||||
usb_buf[0x08] = pattern;
|
||||
usb_buf[0x09] = 0x00;
|
||||
|
||||
for(int i = 0; i < colors.size(); i++)
|
||||
{
|
||||
usb_buf[0x0a + i * 3] = RGBGetRValue(colors[i]);
|
||||
usb_buf[0x0b + i * 3] = RGBGetGValue(colors[i]);
|
||||
usb_buf[0x0c + i * 3] = RGBGetBValue(colors[i]);
|
||||
}
|
||||
|
||||
hid_write(dev, usb_buf, 65);
|
||||
}
|
||||
|
||||
void AuraMousematController::SaveMode()
|
||||
{
|
||||
unsigned char usb_save_buf[65];
|
||||
|
||||
memset(usb_save_buf, 0x00, sizeof(usb_save_buf));
|
||||
|
||||
usb_save_buf[0x00] = 0xEE;
|
||||
usb_save_buf[0x01] = 0x50;
|
||||
usb_save_buf[0x02] = 0x55;
|
||||
|
||||
hid_write(dev, usb_save_buf, 65);
|
||||
}
|
||||
@@ -0,0 +1,59 @@
|
||||
/*-----------------------------------------*\
|
||||
| AsusAuraMousematController.h |
|
||||
| |
|
||||
| Definitions and types for ASUS Aura |
|
||||
| USB RGB lighting controller |
|
||||
| |
|
||||
| Adam Honse (CalcProgrammer1) 1/10/2022 |
|
||||
\*-----------------------------------------*/
|
||||
|
||||
#include "RGBController.h"
|
||||
#include <hidapi/hidapi.h>
|
||||
|
||||
#pragma once
|
||||
|
||||
|
||||
enum
|
||||
{
|
||||
AURA_MOUSEMAT_MODE_STATIC = 0,
|
||||
AURA_MOUSEMAT_MODE_BREATHING = 1,
|
||||
AURA_MOUSEMAT_MODE_COLOR_CYCLE = 2,
|
||||
AURA_MOUSEMAT_MODE_WAVE = 3,
|
||||
AURA_MOUSEMAT_MODE_WAVE_PLANE = 4,
|
||||
AURA_MOUSEMAT_MODE_COMET = 5,
|
||||
AURA_MOUSEMAT_MODE_GLOWING_YOYO = 6,
|
||||
AURA_MOUSEMAT_MODE_CROSS = 7,
|
||||
AURA_MOUSEMAT_MODE_STARRY_NIGHT = 8,
|
||||
AURA_MOUSEMAT_MODE_DIRECT = 0xFF,
|
||||
};
|
||||
|
||||
class AuraMousematController
|
||||
{
|
||||
public:
|
||||
AuraMousematController(hid_device* dev_handle, const char* path);
|
||||
virtual ~AuraMousematController();
|
||||
|
||||
std::string GetDeviceLocation();
|
||||
std::string GetSerialString();
|
||||
std::string GetVersion();
|
||||
|
||||
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 SaveMode();
|
||||
|
||||
private:
|
||||
hid_device* dev;
|
||||
std::string location;
|
||||
};
|
||||
@@ -31,7 +31,7 @@ public:
|
||||
(
|
||||
unsigned char key,
|
||||
unsigned char value
|
||||
);
|
||||
);
|
||||
|
||||
void UpdateProfile
|
||||
(
|
||||
|
||||
@@ -17,10 +17,11 @@
|
||||
#include <string.h>
|
||||
#include <cmath>
|
||||
|
||||
AuraTUFKeyboardController::AuraTUFKeyboardController(hid_device* dev_handle, const char* path)
|
||||
AuraTUFKeyboardController::AuraTUFKeyboardController(hid_device* dev_handle, const char* path, uint16_t pid)
|
||||
{
|
||||
dev = dev_handle;
|
||||
location = path;
|
||||
device_pid = pid;
|
||||
}
|
||||
|
||||
AuraTUFKeyboardController::~AuraTUFKeyboardController()
|
||||
@@ -63,7 +64,15 @@ std::string AuraTUFKeyboardController::GetVersion()
|
||||
hid_read(dev, usb_buf_out, 65);
|
||||
|
||||
char version[9];
|
||||
snprintf(version, 9, "%02X.%02X.%02X", usb_buf_out[5], usb_buf_out[6], usb_buf_out[7]);
|
||||
if (device_pid == AURA_TUF_K3_GAMING_PID)
|
||||
{
|
||||
snprintf(version, 9, "%02X.%02X.%02X", usb_buf_out[6], usb_buf_out[5], usb_buf_out[4]);
|
||||
}
|
||||
else
|
||||
{
|
||||
snprintf(version, 9, "%02X.%02X.%02X", usb_buf_out[5], usb_buf_out[6], usb_buf_out[7]);
|
||||
}
|
||||
|
||||
return std::string(version);
|
||||
}
|
||||
|
||||
|
||||
@@ -39,10 +39,17 @@ enum
|
||||
AURA_KEYBOARD_MODE_DIRECT = 15,
|
||||
};
|
||||
|
||||
enum
|
||||
{
|
||||
AURA_TUF_K7_GAMING_PID = 0x18AA,
|
||||
AURA_TUF_K3_GAMING_PID = 0x194B,
|
||||
};
|
||||
|
||||
|
||||
class AuraTUFKeyboardController
|
||||
{
|
||||
public:
|
||||
AuraTUFKeyboardController(hid_device* dev_handle, const char* path);
|
||||
AuraTUFKeyboardController(hid_device* dev_handle, const char* path, uint16_t pid);
|
||||
~AuraTUFKeyboardController();
|
||||
|
||||
std::string GetDeviceLocation();
|
||||
@@ -76,6 +83,8 @@ public:
|
||||
void AwaitResponse();
|
||||
void ClearResponses();
|
||||
|
||||
uint16_t device_pid;
|
||||
|
||||
private:
|
||||
hid_device* dev;
|
||||
std::string location;
|
||||
|
||||
@@ -7,6 +7,7 @@
|
||||
| Mola19 10/02/2021 |
|
||||
\*-----------------------------------------*/
|
||||
|
||||
#include "RGBControllerKeyNames.h"
|
||||
#include <vector>
|
||||
#include <map>
|
||||
#include "RGBController.h"
|
||||
@@ -77,166 +78,166 @@ static std::map<int,layout_type> AsusTUFK7Layouts =
|
||||
{
|
||||
(unsigned int *) ASUS_TUF_K7_LAYOUT_KEYS_105,
|
||||
{
|
||||
"Key: Escape",
|
||||
"Key: `",
|
||||
"Key: Tab",
|
||||
"Key: Caps Lock",
|
||||
"Key: Left Shift",
|
||||
"Key: Left Control",
|
||||
KEY_EN_ESCAPE,
|
||||
KEY_EN_BACK_TICK,
|
||||
KEY_EN_TAB,
|
||||
KEY_EN_CAPS_LOCK,
|
||||
KEY_EN_LEFT_SHIFT,
|
||||
KEY_EN_LEFT_CONTROL,
|
||||
|
||||
"Unused",
|
||||
"Unused",
|
||||
"Unused",
|
||||
"Unused",
|
||||
KEY_EN_UNUSED,
|
||||
KEY_EN_UNUSED,
|
||||
KEY_EN_UNUSED,
|
||||
KEY_EN_UNUSED,
|
||||
"Key: \\",
|
||||
"Key: Left Windows",
|
||||
KEY_EN_LEFT_WINDOWS,
|
||||
|
||||
"Unused",
|
||||
"Key: 1",
|
||||
"Key: Q",
|
||||
"Key: A",
|
||||
"Key: Z",
|
||||
"Key: Left Alt",
|
||||
KEY_EN_UNUSED,
|
||||
KEY_EN_1,
|
||||
KEY_EN_Q,
|
||||
KEY_EN_A,
|
||||
KEY_EN_Z,
|
||||
KEY_EN_LEFT_ALT,
|
||||
|
||||
"Key: F1",
|
||||
"Key: 2",
|
||||
"Key: W",
|
||||
"Key: S",
|
||||
"Key: X",
|
||||
"Unused",
|
||||
KEY_EN_F1,
|
||||
KEY_EN_2,
|
||||
KEY_EN_W,
|
||||
KEY_EN_S,
|
||||
KEY_EN_X,
|
||||
KEY_EN_UNUSED,
|
||||
|
||||
"Key: F2",
|
||||
"Key: 3",
|
||||
"Key: E",
|
||||
"Key: D",
|
||||
"Key: C",
|
||||
"Unused",
|
||||
KEY_EN_F2,
|
||||
KEY_EN_3,
|
||||
KEY_EN_E,
|
||||
KEY_EN_D,
|
||||
KEY_EN_C,
|
||||
KEY_EN_UNUSED,
|
||||
|
||||
"Key: F3",
|
||||
"Key: 4",
|
||||
"Key: R",
|
||||
"Key: F",
|
||||
"Key: V",
|
||||
"Unused",
|
||||
KEY_EN_F3,
|
||||
KEY_EN_4,
|
||||
KEY_EN_R,
|
||||
KEY_EN_F,
|
||||
KEY_EN_V,
|
||||
KEY_EN_UNUSED,
|
||||
|
||||
"Key: F4",
|
||||
"Key: 5",
|
||||
"Key: T",
|
||||
"Key: G",
|
||||
"Key: B",
|
||||
"Key: Space",
|
||||
KEY_EN_F4,
|
||||
KEY_EN_5,
|
||||
KEY_EN_T,
|
||||
KEY_EN_G,
|
||||
KEY_EN_B,
|
||||
KEY_EN_SPACE,
|
||||
|
||||
"Unused",
|
||||
"Key: 6",
|
||||
"Key: Y",
|
||||
"Key: H",
|
||||
"Key: N",
|
||||
"Unused",
|
||||
KEY_EN_UNUSED,
|
||||
KEY_EN_6,
|
||||
KEY_EN_Y,
|
||||
KEY_EN_H,
|
||||
KEY_EN_N,
|
||||
KEY_EN_UNUSED,
|
||||
|
||||
"Key: F5",
|
||||
"Key: 7",
|
||||
"Key: U",
|
||||
"Key: J",
|
||||
"Key: M",
|
||||
"Unused",
|
||||
KEY_EN_F5,
|
||||
KEY_EN_7,
|
||||
KEY_EN_U,
|
||||
KEY_EN_J,
|
||||
KEY_EN_M,
|
||||
KEY_EN_UNUSED,
|
||||
|
||||
"Key: F6",
|
||||
"Key: 8",
|
||||
"Key: I",
|
||||
"Key: K",
|
||||
"Key: ,",
|
||||
"Key: Right Alt",
|
||||
KEY_EN_F6,
|
||||
KEY_EN_8,
|
||||
KEY_EN_I,
|
||||
KEY_EN_K,
|
||||
KEY_EN_COMMA,
|
||||
KEY_EN_RIGHT_ALT,
|
||||
|
||||
"Key: F7",
|
||||
"Key: 9",
|
||||
"Key: O",
|
||||
"Key: L",
|
||||
"Key: .",
|
||||
"Unused",
|
||||
KEY_EN_F7,
|
||||
KEY_EN_9,
|
||||
KEY_EN_O,
|
||||
KEY_EN_L,
|
||||
KEY_EN_PERIOD,
|
||||
KEY_EN_UNUSED,
|
||||
|
||||
"Key: F8",
|
||||
"Key: 0",
|
||||
"Key: P",
|
||||
"Key: ;",
|
||||
"Key: /",
|
||||
"Key: Right Fn",
|
||||
KEY_EN_F8,
|
||||
KEY_EN_0,
|
||||
KEY_EN_P,
|
||||
KEY_EN_SEMICOLON,
|
||||
KEY_EN_FORWARD_SLASH,
|
||||
KEY_EN_RIGHT_FUNCTION,
|
||||
|
||||
"Key: F9",
|
||||
"Key: -",
|
||||
"Key: [",
|
||||
"Key: '",
|
||||
"Unused",
|
||||
"Key: Menu",
|
||||
KEY_EN_F9,
|
||||
KEY_EN_MINUS,
|
||||
KEY_EN_LEFT_BRACKET,
|
||||
KEY_EN_QUOTE,
|
||||
KEY_EN_UNUSED,
|
||||
KEY_EN_MENU,
|
||||
|
||||
"Key: F10",
|
||||
"Key: =",
|
||||
"Key: ]",
|
||||
"Key: #",
|
||||
"Unused",
|
||||
"Unused",
|
||||
KEY_EN_F10,
|
||||
KEY_EN_EQUALS,
|
||||
KEY_EN_RIGHT_BRACKET,
|
||||
KEY_EN_POUND,
|
||||
KEY_EN_UNUSED,
|
||||
KEY_EN_UNUSED,
|
||||
|
||||
"Key: F11",
|
||||
"Unused",
|
||||
"Unused",
|
||||
"Unused",
|
||||
"Unused",
|
||||
"Unused",
|
||||
KEY_EN_F11,
|
||||
KEY_EN_UNUSED,
|
||||
KEY_EN_UNUSED,
|
||||
KEY_EN_UNUSED,
|
||||
KEY_EN_UNUSED,
|
||||
KEY_EN_UNUSED,
|
||||
|
||||
"Key: F12",
|
||||
"Key: Backspace",
|
||||
"Unused",
|
||||
"Key: Enter",
|
||||
"Key: Right Shift",
|
||||
"Key: Right Control",
|
||||
KEY_EN_F12,
|
||||
KEY_EN_BACKSPACE,
|
||||
KEY_EN_UNUSED,
|
||||
KEY_EN_ANSI_ENTER,
|
||||
KEY_EN_RIGHT_SHIFT,
|
||||
KEY_EN_RIGHT_CONTROL,
|
||||
|
||||
"Key: Print Screen",
|
||||
"Key: Insert",
|
||||
"Key: Delete",
|
||||
"Unused",
|
||||
"Unused",
|
||||
"Key: Left Arrow",
|
||||
KEY_EN_PRINT_SCREEN,
|
||||
KEY_EN_INSERT,
|
||||
KEY_EN_DELETE,
|
||||
KEY_EN_UNUSED,
|
||||
KEY_EN_UNUSED,
|
||||
KEY_EN_LEFT_ARROW,
|
||||
|
||||
"Key: Scroll Lock",
|
||||
"Key: Home",
|
||||
"Key: End",
|
||||
"Unused",
|
||||
"Key: Up Arrow",
|
||||
"Key: Down Arrow",
|
||||
KEY_EN_SCROLL_LOCK,
|
||||
KEY_EN_HOME,
|
||||
KEY_EN_END,
|
||||
KEY_EN_UNUSED,
|
||||
KEY_EN_UP_ARROW,
|
||||
KEY_EN_DOWN_ARROW,
|
||||
|
||||
"Key: Pause/Break",
|
||||
"Key: Page Up",
|
||||
"Key: Page Down",
|
||||
"Unused",
|
||||
"Unused",
|
||||
"Key: Right Arrow",
|
||||
KEY_EN_PAUSE_BREAK,
|
||||
KEY_EN_PAGE_UP,
|
||||
KEY_EN_PAGE_DOWN,
|
||||
KEY_EN_UNUSED,
|
||||
KEY_EN_UNUSED,
|
||||
KEY_EN_RIGHT_ARROW,
|
||||
|
||||
"Unused",
|
||||
"Key: Num Lock",
|
||||
"Key: Number Pad 7",
|
||||
"Key: Number Pad 4",
|
||||
"Key: Number Pad 1",
|
||||
"Key: Number Pad 0",
|
||||
KEY_EN_UNUSED,
|
||||
KEY_EN_NUMPAD_LOCK,
|
||||
KEY_EN_NUMPAD_7,
|
||||
KEY_EN_NUMPAD_4,
|
||||
KEY_EN_NUMPAD_1,
|
||||
KEY_EN_NUMPAD_0,
|
||||
|
||||
"Unused",
|
||||
"Key: Number Pad /",
|
||||
"Key: Number Pad 8",
|
||||
"Key: Number Pad 5",
|
||||
"Key: Number Pad 2",
|
||||
"Unused",
|
||||
KEY_EN_UNUSED,
|
||||
KEY_EN_NUMPAD_DIVIDE,
|
||||
KEY_EN_NUMPAD_8,
|
||||
KEY_EN_NUMPAD_5,
|
||||
KEY_EN_NUMPAD_2,
|
||||
KEY_EN_UNUSED,
|
||||
|
||||
"Unused",
|
||||
"Key: Number Pad *",
|
||||
"Key: Number Pad 9",
|
||||
"Key: Number Pad 6",
|
||||
"Key: Number Pad 3",
|
||||
KEY_EN_UNUSED,
|
||||
KEY_EN_NUMPAD_TIMES,
|
||||
KEY_EN_NUMPAD_9,
|
||||
KEY_EN_NUMPAD_6,
|
||||
KEY_EN_NUMPAD_3,
|
||||
"Key: Number Pad ,",
|
||||
|
||||
"Unused",
|
||||
"Key: Number Pad -",
|
||||
"Key: Number Pad +",
|
||||
"Unused",
|
||||
"Key: Number Pad Enter",
|
||||
"Unused",
|
||||
KEY_EN_UNUSED,
|
||||
KEY_EN_NUMPAD_MINUS,
|
||||
KEY_EN_NUMPAD_PLUS,
|
||||
KEY_EN_UNUSED,
|
||||
KEY_EN_NUMPAD_ENTER,
|
||||
KEY_EN_UNUSED,
|
||||
}
|
||||
}
|
||||
},
|
||||
@@ -245,166 +246,166 @@ static std::map<int,layout_type> AsusTUFK7Layouts =
|
||||
{
|
||||
(unsigned int *) ASUS_TUF_K7_LAYOUT_KEYS_104,
|
||||
{
|
||||
"Key: Escape",
|
||||
"Key: `",
|
||||
"Key: Tab",
|
||||
"Key: Caps Lock",
|
||||
"Key: Left Shift",
|
||||
"Key: Left Control",
|
||||
KEY_EN_ESCAPE,
|
||||
KEY_EN_BACK_TICK,
|
||||
KEY_EN_TAB,
|
||||
KEY_EN_CAPS_LOCK,
|
||||
KEY_EN_LEFT_SHIFT,
|
||||
KEY_EN_LEFT_CONTROL,
|
||||
|
||||
"Unused",
|
||||
"Unused",
|
||||
"Unused",
|
||||
"Unused",
|
||||
"Unused",
|
||||
"Key: Left Windows",
|
||||
KEY_EN_UNUSED,
|
||||
KEY_EN_UNUSED,
|
||||
KEY_EN_UNUSED,
|
||||
KEY_EN_UNUSED,
|
||||
KEY_EN_UNUSED,
|
||||
KEY_EN_LEFT_WINDOWS,
|
||||
|
||||
"Unused",
|
||||
"Key: 1",
|
||||
"Key: Q",
|
||||
"Key: A",
|
||||
"Key: Z",
|
||||
"Key: Left Alt",
|
||||
KEY_EN_UNUSED,
|
||||
KEY_EN_1,
|
||||
KEY_EN_Q,
|
||||
KEY_EN_A,
|
||||
KEY_EN_Z,
|
||||
KEY_EN_LEFT_ALT,
|
||||
|
||||
"Key: F1",
|
||||
"Key: 2",
|
||||
"Key: W",
|
||||
"Key: S",
|
||||
"Key: X",
|
||||
"Unused",
|
||||
KEY_EN_F1,
|
||||
KEY_EN_2,
|
||||
KEY_EN_W,
|
||||
KEY_EN_S,
|
||||
KEY_EN_X,
|
||||
KEY_EN_UNUSED,
|
||||
|
||||
"Key: F2",
|
||||
"Key: 3",
|
||||
"Key: E",
|
||||
"Key: D",
|
||||
"Key: C",
|
||||
"Unused",
|
||||
KEY_EN_F2,
|
||||
KEY_EN_3,
|
||||
KEY_EN_E,
|
||||
KEY_EN_D,
|
||||
KEY_EN_C,
|
||||
KEY_EN_UNUSED,
|
||||
|
||||
"Key: F3",
|
||||
"Key: 4",
|
||||
"Key: R",
|
||||
"Key: F",
|
||||
"Key: V",
|
||||
"Unused",
|
||||
KEY_EN_F3,
|
||||
KEY_EN_4,
|
||||
KEY_EN_R,
|
||||
KEY_EN_F,
|
||||
KEY_EN_V,
|
||||
KEY_EN_UNUSED,
|
||||
|
||||
"Key: F4",
|
||||
"Key: 5",
|
||||
"Key: T",
|
||||
"Key: G",
|
||||
"Key: B",
|
||||
"Key: Space",
|
||||
KEY_EN_F4,
|
||||
KEY_EN_5,
|
||||
KEY_EN_T,
|
||||
KEY_EN_G,
|
||||
KEY_EN_B,
|
||||
KEY_EN_SPACE,
|
||||
|
||||
"Unused",
|
||||
"Key: 6",
|
||||
"Key: Y",
|
||||
"Key: H",
|
||||
"Key: N",
|
||||
"Unused",
|
||||
KEY_EN_UNUSED,
|
||||
KEY_EN_6,
|
||||
KEY_EN_Y,
|
||||
KEY_EN_H,
|
||||
KEY_EN_N,
|
||||
KEY_EN_UNUSED,
|
||||
|
||||
"Key: F5",
|
||||
"Key: 7",
|
||||
"Key: U",
|
||||
"Key: J",
|
||||
"Key: M",
|
||||
"Unused",
|
||||
KEY_EN_F5,
|
||||
KEY_EN_7,
|
||||
KEY_EN_U,
|
||||
KEY_EN_J,
|
||||
KEY_EN_M,
|
||||
KEY_EN_UNUSED,
|
||||
|
||||
"Key: F6",
|
||||
"Key: 8",
|
||||
"Key: I",
|
||||
"Key: K",
|
||||
"Key: ,",
|
||||
"Key: Right Alt",
|
||||
KEY_EN_F6,
|
||||
KEY_EN_8,
|
||||
KEY_EN_I,
|
||||
KEY_EN_K,
|
||||
KEY_EN_COMMA,
|
||||
KEY_EN_RIGHT_ALT,
|
||||
|
||||
"Key: F7",
|
||||
"Key: 9",
|
||||
"Key: O",
|
||||
"Key: L",
|
||||
"Key: .",
|
||||
"Unused",
|
||||
KEY_EN_F7,
|
||||
KEY_EN_9,
|
||||
KEY_EN_O,
|
||||
KEY_EN_L,
|
||||
KEY_EN_PERIOD,
|
||||
KEY_EN_UNUSED,
|
||||
|
||||
"Key: F8",
|
||||
"Key: 0",
|
||||
"Key: P",
|
||||
"Key: ;",
|
||||
"Key: /",
|
||||
"Key: Right Fn",
|
||||
KEY_EN_F8,
|
||||
KEY_EN_0,
|
||||
KEY_EN_P,
|
||||
KEY_EN_SEMICOLON,
|
||||
KEY_EN_FORWARD_SLASH,
|
||||
KEY_EN_RIGHT_FUNCTION,
|
||||
|
||||
"Key: F9",
|
||||
"Key: -",
|
||||
"Key: [",
|
||||
"Key: '",
|
||||
"Unused",
|
||||
"Key: Menu",
|
||||
KEY_EN_F9,
|
||||
KEY_EN_MINUS,
|
||||
KEY_EN_LEFT_BRACKET,
|
||||
KEY_EN_QUOTE,
|
||||
KEY_EN_UNUSED,
|
||||
KEY_EN_MENU,
|
||||
|
||||
"Key: F10",
|
||||
"Key: =",
|
||||
"Key: ]",
|
||||
"Unused",
|
||||
"Unused",
|
||||
"Unused",
|
||||
KEY_EN_F10,
|
||||
KEY_EN_EQUALS,
|
||||
KEY_EN_RIGHT_BRACKET,
|
||||
KEY_EN_UNUSED,
|
||||
KEY_EN_UNUSED,
|
||||
KEY_EN_UNUSED,
|
||||
|
||||
"Key: F11",
|
||||
"Unused",
|
||||
"Unused",
|
||||
"Unused",
|
||||
"Unused",
|
||||
"Unused",
|
||||
KEY_EN_F11,
|
||||
KEY_EN_UNUSED,
|
||||
KEY_EN_UNUSED,
|
||||
KEY_EN_UNUSED,
|
||||
KEY_EN_UNUSED,
|
||||
KEY_EN_UNUSED,
|
||||
|
||||
"Key: F12",
|
||||
"Key: Backspace",
|
||||
KEY_EN_F12,
|
||||
KEY_EN_BACKSPACE,
|
||||
"Key: \\",
|
||||
"Key: Enter",
|
||||
"Key: Right Shift",
|
||||
"Key: Right Control",
|
||||
KEY_EN_ANSI_ENTER,
|
||||
KEY_EN_RIGHT_SHIFT,
|
||||
KEY_EN_RIGHT_CONTROL,
|
||||
|
||||
"Key: Print Screen",
|
||||
"Key: Insert",
|
||||
"Key: Delete",
|
||||
"Unused",
|
||||
"Unused",
|
||||
"Key: Left Arrow",
|
||||
KEY_EN_PRINT_SCREEN,
|
||||
KEY_EN_INSERT,
|
||||
KEY_EN_DELETE,
|
||||
KEY_EN_UNUSED,
|
||||
KEY_EN_UNUSED,
|
||||
KEY_EN_LEFT_ARROW,
|
||||
|
||||
"Key: Scroll Lock",
|
||||
"Key: Home",
|
||||
"Key: End",
|
||||
"Unused",
|
||||
"Key: Up Arrow",
|
||||
"Key: Down Arrow",
|
||||
KEY_EN_SCROLL_LOCK,
|
||||
KEY_EN_HOME,
|
||||
KEY_EN_END,
|
||||
KEY_EN_UNUSED,
|
||||
KEY_EN_UP_ARROW,
|
||||
KEY_EN_DOWN_ARROW,
|
||||
|
||||
"Key: Pause/Break",
|
||||
"Key: Page Up",
|
||||
"Key: Page Down",
|
||||
"Unused",
|
||||
"Unused",
|
||||
"Key: Right Arrow",
|
||||
KEY_EN_PAUSE_BREAK,
|
||||
KEY_EN_PAGE_UP,
|
||||
KEY_EN_PAGE_DOWN,
|
||||
KEY_EN_UNUSED,
|
||||
KEY_EN_UNUSED,
|
||||
KEY_EN_RIGHT_ARROW,
|
||||
|
||||
"Unused",
|
||||
"Key: Num Lock",
|
||||
"Key: Number Pad 7",
|
||||
"Key: Number Pad 4",
|
||||
"Key: Number Pad 1",
|
||||
"Key: Number Pad 0",
|
||||
KEY_EN_UNUSED,
|
||||
KEY_EN_NUMPAD_LOCK,
|
||||
KEY_EN_NUMPAD_7,
|
||||
KEY_EN_NUMPAD_4,
|
||||
KEY_EN_NUMPAD_1,
|
||||
KEY_EN_NUMPAD_0,
|
||||
|
||||
"Unused",
|
||||
"Key: Number Pad /",
|
||||
"Key: Number Pad 8",
|
||||
"Key: Number Pad 5",
|
||||
"Key: Number Pad 2",
|
||||
"Unused",
|
||||
KEY_EN_UNUSED,
|
||||
KEY_EN_NUMPAD_DIVIDE,
|
||||
KEY_EN_NUMPAD_8,
|
||||
KEY_EN_NUMPAD_5,
|
||||
KEY_EN_NUMPAD_2,
|
||||
KEY_EN_UNUSED,
|
||||
|
||||
"Unused",
|
||||
"Key: Number Pad *",
|
||||
"Key: Number Pad 9",
|
||||
"Key: Number Pad 6",
|
||||
"Key: Number Pad 3",
|
||||
KEY_EN_UNUSED,
|
||||
KEY_EN_NUMPAD_TIMES,
|
||||
KEY_EN_NUMPAD_9,
|
||||
KEY_EN_NUMPAD_6,
|
||||
KEY_EN_NUMPAD_3,
|
||||
"Key: Number Pad ,",
|
||||
|
||||
"Unused",
|
||||
"Key: Number Pad -",
|
||||
"Key: Number Pad +",
|
||||
"Unused",
|
||||
"Key: Number Pad Enter",
|
||||
"Unused",
|
||||
KEY_EN_UNUSED,
|
||||
KEY_EN_NUMPAD_MINUS,
|
||||
KEY_EN_NUMPAD_PLUS,
|
||||
KEY_EN_UNUSED,
|
||||
KEY_EN_NUMPAD_ENTER,
|
||||
KEY_EN_UNUSED,
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
@@ -8,6 +8,8 @@
|
||||
\*-----------------------------------------*/
|
||||
|
||||
#include "AsusAuraUSBController.h"
|
||||
#include "LogManager.h"
|
||||
|
||||
#include <cstring>
|
||||
#include <stdexcept>
|
||||
|
||||
@@ -88,14 +90,17 @@ void AuraUSBController::GetConfigTable()
|
||||
{
|
||||
memcpy(config_table, &usb_buf[4], 60);
|
||||
|
||||
LOG_DEBUG("[%s] ASUS Aura USB config table:", device_name);
|
||||
|
||||
for(int i = 0; i < 60; i+=6)
|
||||
{
|
||||
printf("%02X %02X %02X %02X %02X %02X\r\n", config_table[i + 0],
|
||||
config_table[i + 1],
|
||||
config_table[i + 2],
|
||||
config_table[i + 3],
|
||||
config_table[i + 4],
|
||||
config_table[i + 5]);
|
||||
LOG_DEBUG("[%s] %02X %02X %02X %02X %02X %02X", device_name,
|
||||
config_table[i + 0],
|
||||
config_table[i + 1],
|
||||
config_table[i + 2],
|
||||
config_table[i + 3],
|
||||
config_table[i + 4],
|
||||
config_table[i + 5]);
|
||||
}
|
||||
}
|
||||
else
|
||||
|
||||
@@ -5,14 +5,19 @@
|
||||
#include "AsusAuraTUFKeyboardController.h"
|
||||
#include "AsusAuraMainboardController.h"
|
||||
#include "AsusAuraMouseController.h"
|
||||
#include "AsusAuraMousematController.h"
|
||||
#include "AsusAuraStrixEvolveController.h"
|
||||
#include "AsusAuraMonitorController.h"
|
||||
#include "RGBController.h"
|
||||
#include "RGBController_AsusAuraUSB.h"
|
||||
#include "RGBController_AsusAuraHeadsetStand.h"
|
||||
#include "RGBController_AsusAuraKeyboard.h"
|
||||
#include "RGBController_AsusAuraTUFKeyboard.h"
|
||||
#include "RGBController_AsusAuraMouse.h"
|
||||
#include "RGBController_AsusAuraMousemat.h"
|
||||
#include "RGBController_ROGStrixLC_Controller.h"
|
||||
#include "RGBController_AsusAuraStrixEvolve.h"
|
||||
#include "RGBController_AsusAuraMonitor.h"
|
||||
#include <stdexcept>
|
||||
#include <hidapi/hidapi.h>
|
||||
#include "dependencies/dmiinfo.h"
|
||||
@@ -41,6 +46,7 @@
|
||||
#define AURA_ROG_STRIX_SCOPE_RX_PID 0x1951
|
||||
#define AURA_ROG_STRIX_SCOPE_TKL_PID 0x190C
|
||||
#define AURA_TUF_K7_GAMING_PID 0x18AA
|
||||
#define AURA_TUF_K3_GAMING_PID 0x194B
|
||||
|
||||
/*-----------------------------------------------------------------*\
|
||||
| MICE - defined in AsusAuraMouseDevices.h |
|
||||
@@ -48,13 +54,31 @@
|
||||
|
||||
#define AURA_ROG_STRIX_EVOLVE_PID 0x185B
|
||||
|
||||
/*-----------------------------------------------------------------*\
|
||||
| MOUSEMATS |
|
||||
\*-----------------------------------------------------------------*/
|
||||
#define AURA_ROG_BALTEUS_PID 0x1891
|
||||
#define AURA_ROG_BALTEUS_QI_PID 0x1890
|
||||
|
||||
/*-----------------------------------------------------------------*\
|
||||
| MONITORS |
|
||||
\*-----------------------------------------------------------------*/
|
||||
|
||||
#define AURA_ROG_STRIX_XG27AQ_PID 0x198C
|
||||
|
||||
/*-----------------------------------------------------------------*\
|
||||
| HEADSETSTANDS |
|
||||
\*-----------------------------------------------------------------*/
|
||||
|
||||
#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 AURA_ROG_THRONE_PID 0x18D9
|
||||
#define AURA_ROG_THRONE_QI_PID 0x18C5
|
||||
|
||||
#define ROG_STRIX_LC120_PID 0x879E
|
||||
|
||||
AuraKeyboardMappingLayoutType GetKeyboardMappingLayoutType(int pid)
|
||||
{
|
||||
@@ -88,9 +112,9 @@ void DetectAsusAuraUSBTerminal(hid_device_info* info, const std::string& name)
|
||||
|
||||
if(dev)
|
||||
{
|
||||
AuraAddressableController* controller = new AuraAddressableController(dev, info->path);
|
||||
RGBController_AuraUSB* rgb_controller = new RGBController_AuraUSB(controller);
|
||||
rgb_controller->name = name;
|
||||
AuraAddressableController* controller = new AuraAddressableController(dev, info->path);
|
||||
RGBController_AuraUSB* rgb_controller = new RGBController_AuraUSB(controller);
|
||||
rgb_controller->name = name;
|
||||
ResourceManager::get()->RegisterRGBController(rgb_controller);
|
||||
}
|
||||
}
|
||||
@@ -102,9 +126,9 @@ void DetectAsusAuraUSBAddressable(hid_device_info* info, const std::string& /*na
|
||||
if(dev)
|
||||
{
|
||||
DMIInfo dmi;
|
||||
AuraAddressableController* controller = new AuraAddressableController(dev, info->path);
|
||||
RGBController_AuraUSB* rgb_controller = new RGBController_AuraUSB(controller);
|
||||
rgb_controller->name = "ASUS " + dmi.getMainboard() + " Addressable";
|
||||
AuraAddressableController* controller = new AuraAddressableController(dev, info->path);
|
||||
RGBController_AuraUSB* rgb_controller = new RGBController_AuraUSB(controller);
|
||||
rgb_controller->name = "ASUS " + dmi.getMainboard() + " Addressable";
|
||||
ResourceManager::get()->RegisterRGBController(rgb_controller);
|
||||
}
|
||||
}
|
||||
@@ -112,19 +136,21 @@ void DetectAsusAuraUSBAddressable(hid_device_info* info, const std::string& /*na
|
||||
void DetectAsusAuraUSBMotherboards(hid_device_info* info, const std::string& /*name*/)
|
||||
{
|
||||
hid_device* dev = hid_open_path(info->path);
|
||||
|
||||
if(dev)
|
||||
{
|
||||
try
|
||||
{
|
||||
DMIInfo dmi;
|
||||
AuraMainboardController* controller = new AuraMainboardController(dev, info->path);
|
||||
RGBController_AuraUSB* rgb_controller = new RGBController_AuraUSB(controller);
|
||||
rgb_controller->name = "ASUS " + dmi.getMainboard();
|
||||
AuraMainboardController* controller = new AuraMainboardController(dev, info->path);
|
||||
RGBController_AuraUSB* rgb_controller = new RGBController_AuraUSB(controller);
|
||||
rgb_controller->name = "ASUS " + dmi.getMainboard();
|
||||
ResourceManager::get()->RegisterRGBController(rgb_controller);
|
||||
}
|
||||
catch(std::runtime_error&)
|
||||
catch(const std::runtime_error& ex)
|
||||
{
|
||||
// reading the config table failed
|
||||
LOG_ERROR("[AsusAuraUSB] An error occured while reading the config table: %s", ex.what());
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -132,12 +158,13 @@ void DetectAsusAuraUSBMotherboards(hid_device_info* info, const std::string& /*n
|
||||
void DetectAsusAuraUSBKeyboards(hid_device_info* info, const std::string& name)
|
||||
{
|
||||
hid_device* dev = hid_open_path(info->path);
|
||||
|
||||
if(dev)
|
||||
{
|
||||
AuraKeyboardController* controller = new AuraKeyboardController(dev, info->path);
|
||||
AuraKeyboardMappingLayoutType layout = GetKeyboardMappingLayoutType(info->product_id);
|
||||
RGBController_AuraKeyboard* rgb_controller = new RGBController_AuraKeyboard(controller, layout);
|
||||
rgb_controller->name = name;
|
||||
AuraKeyboardController* controller = new AuraKeyboardController(dev, info->path);
|
||||
AuraKeyboardMappingLayoutType layout = GetKeyboardMappingLayoutType(info->product_id);
|
||||
RGBController_AuraKeyboard* rgb_controller = new RGBController_AuraKeyboard(controller, layout);
|
||||
rgb_controller->name = name;
|
||||
ResourceManager::get()->RegisterRGBController(rgb_controller);
|
||||
}
|
||||
}
|
||||
@@ -145,11 +172,38 @@ void DetectAsusAuraUSBKeyboards(hid_device_info* info, const std::string& name)
|
||||
void DetectAsusAuraUSBMice(hid_device_info* info, const std::string& name)
|
||||
{
|
||||
hid_device* dev = hid_open_path(info->path);
|
||||
|
||||
if(dev)
|
||||
{
|
||||
AuraMouseController* controller = new AuraMouseController(dev, info->path, info->product_id);
|
||||
RGBController_AuraMouse* rgb_controller = new RGBController_AuraMouse(controller);
|
||||
rgb_controller->name = name;
|
||||
AuraMouseController* controller = new AuraMouseController(dev, info->path, info->product_id);
|
||||
RGBController_AuraMouse* rgb_controller = new RGBController_AuraMouse(controller);
|
||||
rgb_controller->name = name;
|
||||
ResourceManager::get()->RegisterRGBController(rgb_controller);
|
||||
}
|
||||
}
|
||||
|
||||
void DetectAsusAuraUSBMousemats(hid_device_info* info, const std::string& name)
|
||||
{
|
||||
hid_device* dev = hid_open_path(info->path);
|
||||
|
||||
if(dev)
|
||||
{
|
||||
AuraMousematController* controller = new AuraMousematController(dev, info->path);
|
||||
RGBController_AuraMousemat* rgb_controller = new RGBController_AuraMousemat(controller);
|
||||
rgb_controller->name = name;
|
||||
ResourceManager::get()->RegisterRGBController(rgb_controller);
|
||||
}
|
||||
}
|
||||
|
||||
void DetectAsusAuraUSBROGStrixLC(hid_device_info* info, const std::string& name)
|
||||
{
|
||||
hid_device* dev = hid_open_path(info->path);
|
||||
|
||||
if(dev)
|
||||
{
|
||||
ROGStrixLC_Controller* controller = new ROGStrixLC_Controller(dev, info->path);
|
||||
RGBController_ROGStrixLC_Controller* rgb_controller = new RGBController_ROGStrixLC_Controller(controller);
|
||||
rgb_controller->name = name;
|
||||
ResourceManager::get()->RegisterRGBController(rgb_controller);
|
||||
}
|
||||
}
|
||||
@@ -157,11 +211,12 @@ void DetectAsusAuraUSBMice(hid_device_info* info, const std::string& name)
|
||||
void DetectAsusAuraUSBStrixEvolve(hid_device_info* info, const std::string& name)
|
||||
{
|
||||
hid_device* dev = hid_open_path(info->path);
|
||||
|
||||
if(dev)
|
||||
{
|
||||
AuraStrixEvolveController* controller = new AuraStrixEvolveController(dev, info->path, info->product_id);
|
||||
RGBController_AuraStrixEvolve* rgb_controller = new RGBController_AuraStrixEvolve(controller);
|
||||
rgb_controller->name = name;
|
||||
AuraStrixEvolveController* controller = new AuraStrixEvolveController(dev, info->path, info->product_id);
|
||||
RGBController_AuraStrixEvolve* rgb_controller = new RGBController_AuraStrixEvolve(controller);
|
||||
rgb_controller->name = name;
|
||||
ResourceManager::get()->RegisterRGBController(rgb_controller);
|
||||
}
|
||||
}
|
||||
@@ -169,11 +224,12 @@ void DetectAsusAuraUSBStrixEvolve(hid_device_info* info, const std::string& name
|
||||
void DetectAsusAuraUSBHeadsetStand(hid_device_info* info, const std::string& name)
|
||||
{
|
||||
hid_device* dev = hid_open_path(info->path);
|
||||
|
||||
if(dev)
|
||||
{
|
||||
AuraHeadsetStandController* controller = new AuraHeadsetStandController(dev, info->path);
|
||||
RGBController_AuraHeadsetStand* rgb_controller = new RGBController_AuraHeadsetStand(controller);
|
||||
rgb_controller->name = name;
|
||||
AuraHeadsetStandController* controller = new AuraHeadsetStandController(dev, info->path);
|
||||
RGBController_AuraHeadsetStand* rgb_controller = new RGBController_AuraHeadsetStand(controller);
|
||||
rgb_controller->name = name;
|
||||
ResourceManager::get()->RegisterRGBController(rgb_controller);
|
||||
}
|
||||
}
|
||||
@@ -181,11 +237,25 @@ void DetectAsusAuraUSBHeadsetStand(hid_device_info* info, const std::string& nam
|
||||
void DetectAsusAuraTUFUSBKeyboard(hid_device_info* info, const std::string& name)
|
||||
{
|
||||
hid_device* dev = hid_open_path(info->path);
|
||||
|
||||
if(dev)
|
||||
{
|
||||
AuraTUFKeyboardController* controller = new AuraTUFKeyboardController(dev, info->path);
|
||||
RGBController_AuraTUFKeyboard* rgb_controller = new RGBController_AuraTUFKeyboard(controller);
|
||||
rgb_controller->name = name;
|
||||
AuraTUFKeyboardController* controller = new AuraTUFKeyboardController(dev, info->path, info->product_id);
|
||||
RGBController_AuraTUFKeyboard* rgb_controller = new RGBController_AuraTUFKeyboard(controller);
|
||||
rgb_controller->name = name;
|
||||
ResourceManager::get()->RegisterRGBController(rgb_controller);
|
||||
}
|
||||
}
|
||||
|
||||
void DetectAsusAuraUSBMonitor(hid_device_info* info, const std::string& name)
|
||||
{
|
||||
hid_device* dev = hid_open_path(info->path);
|
||||
|
||||
if(dev)
|
||||
{
|
||||
AuraMonitorController* controller = new AuraMonitorController(dev, info->path);
|
||||
RGBController_AuraMonitor* rgb_controller = new RGBController_AuraMonitor(controller);
|
||||
rgb_controller->name = name;
|
||||
ResourceManager::get()->RegisterRGBController(rgb_controller);
|
||||
}
|
||||
}
|
||||
@@ -211,7 +281,8 @@ REGISTER_HID_DETECTOR_IP("ASUS ROG Strix Flare PNK LTD", DetectAsusAuraUS
|
||||
REGISTER_HID_DETECTOR_IP("ASUS ROG Strix Scope", DetectAsusAuraUSBKeyboards, AURA_USB_VID, AURA_ROG_STRIX_SCOPE_PID, 1, 0xFF00);
|
||||
REGISTER_HID_DETECTOR_IP("ASUS ROG Strix Scope RX", DetectAsusAuraUSBKeyboards, AURA_USB_VID, AURA_ROG_STRIX_SCOPE_RX_PID, 1, 0xFF00);
|
||||
REGISTER_HID_DETECTOR_IP("ASUS ROG Strix Scope TKL", DetectAsusAuraUSBKeyboards, AURA_USB_VID, AURA_ROG_STRIX_SCOPE_TKL_PID, 1, 0xFF00);
|
||||
REGISTER_HID_DETECTOR_I ("ASUS TUF Gaming K7", DetectAsusAuraTUFUSBKeyboard, AURA_USB_VID, AURA_TUF_K7_GAMING_PID, 1);
|
||||
REGISTER_HID_DETECTOR_IP("ASUS TUF Gaming K7", DetectAsusAuraTUFUSBKeyboard, AURA_USB_VID, AURA_TUF_K7_GAMING_PID, 1, 0xFF00);
|
||||
REGISTER_HID_DETECTOR_IP("ASUS TUF Gaming K3", DetectAsusAuraTUFUSBKeyboard, AURA_USB_VID, AURA_TUF_K3_GAMING_PID, 1, 0xFF00);
|
||||
|
||||
/*-----------------------------------------------------------------*\
|
||||
| MICE |
|
||||
@@ -220,7 +291,7 @@ REGISTER_HID_DETECTOR_IP("ASUS ROG Gladius II Core", DetectAsusAuraUS
|
||||
REGISTER_HID_DETECTOR_IP("ASUS ROG Gladius II", DetectAsusAuraUSBMice, AURA_USB_VID, AURA_ROG_GLADIUS_II_PID, 2, 0xFF01);
|
||||
REGISTER_HID_DETECTOR_IP("ASUS ROG Gladius II Origin", DetectAsusAuraUSBMice, AURA_USB_VID, AURA_ROG_GLADIUS_II_ORIGIN_PID, 2, 0xFF01);
|
||||
REGISTER_HID_DETECTOR_IP("ASUS ROG Gladius II Origin PNK LTD", DetectAsusAuraUSBMice, AURA_USB_VID, AURA_ROG_GLADIUS_II_ORIGIN_PNK_LTD_PID, 2, 0xFF01);
|
||||
REGISTER_HID_DETECTOR_IP("ASUS ROG Gladius II Origin COD", DetectAsusAuraUSBMice, AURA_USB_VID, AURA_ROG_GLADIUS_II_ORIGIN_COD_PID, 1, 0xFF01);
|
||||
REGISTER_HID_DETECTOR_IP("ASUS ROG Gladius II Origin COD", DetectAsusAuraUSBMice, AURA_USB_VID, AURA_ROG_GLADIUS_II_ORIGIN_COD_PID, 2, 0xFF01);
|
||||
REGISTER_HID_DETECTOR_IP("ASUS ROG Gladius II Wireless", DetectAsusAuraUSBMice, AURA_USB_VID, AURA_ROG_GLADIUS_II_WIRELESS_1_PID, 1, 0xFF13);
|
||||
REGISTER_HID_DETECTOR_IP("ASUS ROG Gladius II Wireless", DetectAsusAuraUSBMice, AURA_USB_VID, AURA_ROG_GLADIUS_II_WIRELESS_2_PID, 2, 0xFF01);
|
||||
REGISTER_HID_DETECTOR_IP("ASUS ROG Chakram (Wireless)", DetectAsusAuraUSBMice, AURA_USB_VID, AURA_ROG_CHAKRAM_WIRELESS_PID, 0, 0xFF01);
|
||||
@@ -229,15 +300,33 @@ REGISTER_HID_DETECTOR_IP("Asus ROG Chakram Core", DetectAsusAuraUS
|
||||
REGISTER_HID_DETECTOR_IP("ASUS ROG Pugio", DetectAsusAuraUSBMice, AURA_USB_VID, AURA_ROG_PUGIO_PID, 2, 0xFF01);
|
||||
REGISTER_HID_DETECTOR_IP("ASUS ROG Pugio II (Wired)", DetectAsusAuraUSBMice, AURA_USB_VID, AURA_ROG_PUGIO_II_WIRED_PID, 0, 0xFF01);
|
||||
REGISTER_HID_DETECTOR_IP("ASUS ROG Pugio II (Wireless)", DetectAsusAuraUSBMice, AURA_USB_VID, AURA_ROG_PUGIO_II_WIRELESS_PID, 0, 0xFF01);
|
||||
REGISTER_HID_DETECTOR_IP("ASUS ROG Strix Impact II", DetectAsusAuraUSBMice, AURA_USB_VID, AURA_ROG_STRIX_IMPACT_II_PID, 1, 0xFF01);
|
||||
REGISTER_HID_DETECTOR_IP("ASUS ROG Strix Impact", DetectAsusAuraUSBMice, AURA_USB_VID, AURA_ROG_STRIX_IMPACT_PID, 0, 0xFF01);
|
||||
REGISTER_HID_DETECTOR_IP("ASUS ROG Strix Impact II", DetectAsusAuraUSBMice, AURA_USB_VID, AURA_ROG_STRIX_IMPACT_II_PID, 0, 0xFF01);
|
||||
REGISTER_HID_DETECTOR_IP("ASUS ROG Keris", DetectAsusAuraUSBMice, AURA_USB_VID, AURA_ROG_KERIS, 0, 0xFF01);
|
||||
REGISTER_HID_DETECTOR_IP("ASUS ROG Keris Wireless USB", DetectAsusAuraUSBMice, AURA_USB_VID, AURA_ROG_KERIS_WIRELESS_USB_PID, 0, 0xFF01);
|
||||
REGISTER_HID_DETECTOR_IP("ASUS ROG Keris Wireless 2.4Ghz", DetectAsusAuraUSBMice, AURA_USB_VID, AURA_ROG_KERIS_WIRELESS_2_4_PID, 0, 0xFF01);
|
||||
REGISTER_HID_DETECTOR_IP("ASUS ROG Keris Wireless Bluetooth", DetectAsusAuraUSBMice, AURA_USB_VID, AURA_ROG_KERIS_WIRELESS_BT_PID, 0, 0xFF01);
|
||||
REGISTER_HID_DETECTOR_IP("ASUS TUF Gaming M3", DetectAsusAuraUSBMice, AURA_USB_VID, AURA_TUF_M3_PID, 1, 0xFF01);
|
||||
REGISTER_HID_DETECTOR_IP("ASUS TUF Gaming M5", DetectAsusAuraUSBMice, AURA_USB_VID, AURA_TUF_M5_PID, 2, 0xFF01);
|
||||
|
||||
REGISTER_HID_DETECTOR_IP("ASUS ROG Strix Evolve", DetectAsusAuraUSBStrixEvolve, AURA_USB_VID, AURA_ROG_STRIX_EVOLVE_PID, 1, 0x0008);
|
||||
|
||||
/*-----------------------------------------------------------------*\
|
||||
| MOUSEMATS |
|
||||
\*-----------------------------------------------------------------*/
|
||||
REGISTER_HID_DETECTOR_PU("ASUS ROG Balteus", DetectAsusAuraUSBMousemats, AURA_USB_VID, AURA_ROG_BALTEUS_PID, 0xFF06, 1);
|
||||
REGISTER_HID_DETECTOR_PU("ASUS ROG Balteus Qi", DetectAsusAuraUSBMousemats, AURA_USB_VID, AURA_ROG_BALTEUS_QI_PID, 0xFF06, 1);
|
||||
|
||||
/*-----------------------------------------------------------------*\
|
||||
| MONITORS |
|
||||
\*-----------------------------------------------------------------*/
|
||||
REGISTER_HID_DETECTOR_PU("ASUS ROG Strix XG27AQ", DetectAsusAuraUSBMonitor, AURA_USB_VID, AURA_ROG_STRIX_XG27AQ_PID, 0xFFA0, 1);
|
||||
|
||||
/*-----------------------------------------------------------------*\
|
||||
| OTHER |
|
||||
\*-----------------------------------------------------------------*/
|
||||
REGISTER_HID_DETECTOR ("ASUS ROG AURA Terminal", DetectAsusAuraUSBTerminal, AURA_USB_VID, AURA_TERMINAL_PID);
|
||||
REGISTER_HID_DETECTOR_I ("ASUS ROG Throne", DetectAsusAuraUSBHeadsetStand, AURA_USB_VID, AURA_ROG_THRONE_PID, 0);
|
||||
REGISTER_HID_DETECTOR_I ("ASUS ROG Throne QI", DetectAsusAuraUSBHeadsetStand, AURA_USB_VID, AURA_ROG_THRONE_QI_PID, 0);
|
||||
REGISTER_HID_DETECTOR ("ASUS ROG AURA Terminal", DetectAsusAuraUSBTerminal, AURA_USB_VID, AURA_TERMINAL_PID);
|
||||
REGISTER_HID_DETECTOR_PU ("ASUS ROG Strix LC", DetectAsusAuraUSBROGStrixLC, AURA_USB_VID, ROG_STRIX_LC120_PID, 0x00FF, 1);
|
||||
REGISTER_HID_DETECTOR_I ("ASUS ROG Throne", DetectAsusAuraUSBHeadsetStand, AURA_USB_VID, AURA_ROG_THRONE_PID, 0);
|
||||
REGISTER_HID_DETECTOR_I ("ASUS ROG Throne QI", DetectAsusAuraUSBHeadsetStand, AURA_USB_VID, AURA_ROG_THRONE_QI_PID, 0);
|
||||
REGISTER_HID_DETECTOR_I ("ASUS ROG Throne QI GUNDAM", DetectAsusAuraUSBHeadsetStand, AURA_USB_VID, AURA_ROG_THRONE_QI_GUNDAM_PID, 0);
|
||||
|
||||
@@ -9,17 +9,27 @@
|
||||
|
||||
#include "RGBController_AsusAuraHeadsetStand.h"
|
||||
|
||||
RGBController_AuraHeadsetStand::RGBController_AuraHeadsetStand(AuraHeadsetStandController* aura_ptr)
|
||||
/**------------------------------------------------------------------*\
|
||||
@name Asus Aura Headset Stand
|
||||
@type USB
|
||||
@save :white_check_mark:
|
||||
@direct :white_check_mark:
|
||||
@effects :white_check_mark:
|
||||
@detectors DetectAsusAuraUSBHeadsetStand
|
||||
@comment
|
||||
\*-------------------------------------------------------------------*/
|
||||
|
||||
RGBController_AuraHeadsetStand::RGBController_AuraHeadsetStand(AuraHeadsetStandController* controller_ptr)
|
||||
{
|
||||
aura = aura_ptr;
|
||||
controller = controller_ptr;
|
||||
|
||||
name = "ASUS Aura Headset Stand";
|
||||
vendor = "ASUS";
|
||||
type = DEVICE_TYPE_HEADSET_STAND;
|
||||
description = "ASUS Aura Headset Stand Device";
|
||||
version = aura->GetVersion();
|
||||
location = aura->GetDeviceLocation();
|
||||
serial = aura->GetSerialString();
|
||||
version = controller->GetVersion();
|
||||
location = controller->GetDeviceLocation();
|
||||
serial = controller->GetSerialString();
|
||||
|
||||
mode Direct;
|
||||
Direct.name = "Direct";
|
||||
@@ -99,7 +109,7 @@ RGBController_AuraHeadsetStand::RGBController_AuraHeadsetStand(AuraHeadsetStandC
|
||||
|
||||
RGBController_AuraHeadsetStand::~RGBController_AuraHeadsetStand()
|
||||
{
|
||||
delete aura;
|
||||
delete controller;
|
||||
}
|
||||
|
||||
void RGBController_AuraHeadsetStand::SetupZones()
|
||||
@@ -153,7 +163,7 @@ void RGBController_AuraHeadsetStand::ResizeZone(int /*zone*/, int /*new_size*/)
|
||||
|
||||
void RGBController_AuraHeadsetStand::DeviceUpdateLEDs()
|
||||
{
|
||||
aura->UpdateLeds(std::vector<RGBColor>(colors));
|
||||
controller->UpdateLeds(std::vector<RGBColor>(colors));
|
||||
}
|
||||
|
||||
void RGBController_AuraHeadsetStand::UpdateZoneLEDs(int /*zone*/)
|
||||
@@ -180,7 +190,7 @@ void RGBController_AuraHeadsetStand::DeviceUpdateMode()
|
||||
switch(modes[active_mode].value)
|
||||
{
|
||||
case 0:
|
||||
aura->UpdateLeds(std::vector<RGBColor>(colors));
|
||||
controller->UpdateLeds(std::vector<RGBColor>(colors));
|
||||
break;
|
||||
case 1:
|
||||
case 2:
|
||||
@@ -188,11 +198,11 @@ void RGBController_AuraHeadsetStand::DeviceUpdateMode()
|
||||
red = RGBGetRValue(modes[active_mode].colors[0]);
|
||||
grn = RGBGetGValue(modes[active_mode].colors[0]);
|
||||
blu = RGBGetBValue(modes[active_mode].colors[0]);
|
||||
aura->UpdateDevice(modes[active_mode].value, red, grn, blu, modes[active_mode].speed, modes[active_mode].brightness);
|
||||
controller->UpdateDevice(modes[active_mode].value, red, grn, blu, modes[active_mode].speed, modes[active_mode].brightness);
|
||||
break;
|
||||
case 4:
|
||||
case 5:
|
||||
aura->UpdateDevice(modes[active_mode].value, red, grn, blu, modes[active_mode].speed, modes[active_mode].brightness);
|
||||
controller->UpdateDevice(modes[active_mode].value, red, grn, blu, modes[active_mode].speed, modes[active_mode].brightness);
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -200,5 +210,5 @@ void RGBController_AuraHeadsetStand::DeviceUpdateMode()
|
||||
void RGBController_AuraHeadsetStand::DeviceSaveMode()
|
||||
{
|
||||
DeviceUpdateMode();
|
||||
aura->SaveMode();
|
||||
controller->SaveMode();
|
||||
}
|
||||
|
||||
@@ -24,7 +24,7 @@ enum
|
||||
class RGBController_AuraHeadsetStand : public RGBController
|
||||
{
|
||||
public:
|
||||
RGBController_AuraHeadsetStand(AuraHeadsetStandController* aura_ptr);
|
||||
RGBController_AuraHeadsetStand(AuraHeadsetStandController* controller_ptr);
|
||||
~RGBController_AuraHeadsetStand();
|
||||
|
||||
void SetupZones();
|
||||
@@ -40,5 +40,5 @@ public:
|
||||
void DeviceSaveMode();
|
||||
|
||||
private:
|
||||
AuraHeadsetStandController* aura;
|
||||
AuraHeadsetStandController* controller;
|
||||
};
|
||||
|
||||
@@ -7,6 +7,7 @@
|
||||
| Adam Honse (CalcProgrammer1) 3/19/2020 |
|
||||
\*-----------------------------------------*/
|
||||
|
||||
#include "RGBControllerKeyNames.h"
|
||||
#include "RGBController_AsusAuraKeyboard.h"
|
||||
|
||||
//0xFFFFFFFF indicates an unused entry in matrix
|
||||
@@ -46,199 +47,199 @@ static unsigned int falchion_matrix_map[5][16] =
|
||||
static const std::vector<led_type> default_led_names =
|
||||
{
|
||||
/* Key Label Index */
|
||||
{ "Key: Escape", 0x00 },
|
||||
{ "Key: `", 0x01 },
|
||||
{ "Key: Tab", 0x02 },
|
||||
{ "Key: Caps Lock", 0x03 },
|
||||
{ "Key: Left Shift", 0x04 },
|
||||
{ "Key: Left Control", 0x05 },
|
||||
{ "Key: \\ (ISO)", 0x0C },
|
||||
{ "Key: 1", 0x11 },
|
||||
{ "Key: Q", 0x12 },
|
||||
{ "Key: A", 0x13 },
|
||||
{ "Key: Z", 0x14 },
|
||||
{ "Key: F1", 0x18 },
|
||||
{ "Key: 2", 0x19 },
|
||||
{ "Key: W", 0x1A },
|
||||
{ "Key: S", 0x1B },
|
||||
{ "Key: X", 0x1C },
|
||||
{ "Key: F2", 0x20 },
|
||||
{ "Key: 3", 0x21 },
|
||||
{ "Key: E", 0x22 },
|
||||
{ "Key: D", 0x23 },
|
||||
{ "Key: C", 0x24 },
|
||||
{ "Key: F3", 0x28 },
|
||||
{ "Key: 4", 0x29 },
|
||||
{ "Key: R", 0x2A },
|
||||
{ "Key: F", 0x2B },
|
||||
{ "Key: V", 0x2C },
|
||||
{ "Key: F4", 0x30 },
|
||||
{ "Key: 5", 0x31 },
|
||||
{ "Key: T", 0x32 },
|
||||
{ "Key: G", 0x33 },
|
||||
{ "Key: B", 0x34 },
|
||||
{ "Key: Space", 0x35 },
|
||||
{ "Key: 6", 0x39 },
|
||||
{ "Key: Y", 0x3A },
|
||||
{ "Key: H", 0x3B },
|
||||
{ "Key: N", 0x3C },
|
||||
{ "Key: F5", 0x40 },
|
||||
{ "Key: 7", 0x41 },
|
||||
{ "Key: U", 0x42 },
|
||||
{ "Key: J", 0x43 },
|
||||
{ "Key: M", 0x44 },
|
||||
{ "Key: F6", 0x48 },
|
||||
{ "Key: 8", 0x49 },
|
||||
{ "Key: I", 0x4A },
|
||||
{ "Key: K", 0x4B },
|
||||
{ "Key: ,", 0x4C },
|
||||
{ "Key: Right Alt", 0x4D },
|
||||
{ "Key: F7", 0x50 },
|
||||
{ "Key: 9", 0x51 },
|
||||
{ "Key: O", 0x52 },
|
||||
{ "Key: L", 0x53 },
|
||||
{ "Key: .", 0x54 },
|
||||
{ "Key: F8", 0x58 },
|
||||
{ "Key: 0", 0x59 },
|
||||
{ "Key: P", 0x5A },
|
||||
{ "Key: ;", 0x5B },
|
||||
{ "Key: /", 0x5C },
|
||||
{ "Key: Right Fn", 0x5D },
|
||||
{ "Key: F9", 0x60 },
|
||||
{ "Key: -", 0x61 },
|
||||
{ "Key: [", 0x62 },
|
||||
{ "Key: '", 0x63 },
|
||||
{ "Key: Menu", 0x65 },
|
||||
{ "Key: F10", 0x68 },
|
||||
{ "Key: =", 0x69 },
|
||||
{ "Key: ]", 0x6A },
|
||||
{ "Key: #", 0x6B },
|
||||
{ "Key: F11", 0x70 },
|
||||
{ "Key: F12", 0x78 },
|
||||
{ "Key: Backspace", 0x79 },
|
||||
{ "Key: \\ (ANSI)", 0x7A },
|
||||
{ "Key: Enter", 0x7B },
|
||||
{ "Key: Right Shift", 0x7C },
|
||||
{ "Key: Right Control", 0x7D },
|
||||
{ "Key: Print Screen", 0x80 },
|
||||
{ "Key: Insert", 0x81 },
|
||||
{ "Key: Delete", 0x82 },
|
||||
{ "Key: Left Arrow", 0x85 },
|
||||
{ "Key: Scroll Lock", 0x88 },
|
||||
{ "Key: Home", 0x89 },
|
||||
{ "Key: End", 0x8A },
|
||||
{ "Key: Up Arrow", 0x8C },
|
||||
{ "Key: Down Arrow", 0x8D },
|
||||
{ "Key: Pause/Break", 0x90 },
|
||||
{ "Key: Page Up", 0x91 },
|
||||
{ "Key: Page Down", 0x92 },
|
||||
{ "Key: Right Arrow", 0x95 },
|
||||
{ "Key: Num Lock", 0x99 },
|
||||
{ "Key: Number Pad 7", 0x9A },
|
||||
{ "Key: Number Pad 4", 0x9B },
|
||||
{ "Key: Number Pad 1", 0x9C },
|
||||
{ "Key: Number Pad 0", 0x9D },
|
||||
{ "Key: Number Pad /", 0xA1 },
|
||||
{ "Key: Number Pad 8", 0xA2 },
|
||||
{ "Key: Number Pad 5", 0xA3 },
|
||||
{ "Key: Number Pad 2", 0xA4 },
|
||||
{ "Key: Number Pad *", 0xA9 },
|
||||
{ "Key: Number Pad 9", 0xAA },
|
||||
{ "Key: Number Pad 6", 0xAB },
|
||||
{ "Key: Number Pad 3", 0xAC },
|
||||
{ "Key: Number Pad .", 0xAD },
|
||||
{ "Key: Number Pad -", 0xB1 },
|
||||
{ "Key: Number Pad +", 0xB2 },
|
||||
{ "Key: Number Pad Enter", 0xB4 },
|
||||
{ KEY_EN_ESCAPE, 0x00 },
|
||||
{ KEY_EN_BACK_TICK, 0x01 },
|
||||
{ KEY_EN_TAB, 0x02 },
|
||||
{ KEY_EN_CAPS_LOCK, 0x03 },
|
||||
{ KEY_EN_LEFT_SHIFT, 0x04 },
|
||||
{ KEY_EN_LEFT_CONTROL, 0x05 },
|
||||
{ KEY_EN_ISO_BACK_SLASH, 0x0C },
|
||||
{ KEY_EN_1, 0x11 },
|
||||
{ KEY_EN_Q, 0x12 },
|
||||
{ KEY_EN_A, 0x13 },
|
||||
{ KEY_EN_Z, 0x14 },
|
||||
{ KEY_EN_F1, 0x18 },
|
||||
{ KEY_EN_2, 0x19 },
|
||||
{ KEY_EN_W, 0x1A },
|
||||
{ KEY_EN_S, 0x1B },
|
||||
{ KEY_EN_X, 0x1C },
|
||||
{ KEY_EN_F2, 0x20 },
|
||||
{ KEY_EN_3, 0x21 },
|
||||
{ KEY_EN_E, 0x22 },
|
||||
{ KEY_EN_D, 0x23 },
|
||||
{ KEY_EN_C, 0x24 },
|
||||
{ KEY_EN_F3, 0x28 },
|
||||
{ KEY_EN_4, 0x29 },
|
||||
{ KEY_EN_R, 0x2A },
|
||||
{ KEY_EN_F, 0x2B },
|
||||
{ KEY_EN_V, 0x2C },
|
||||
{ KEY_EN_F4, 0x30 },
|
||||
{ KEY_EN_5, 0x31 },
|
||||
{ KEY_EN_T, 0x32 },
|
||||
{ KEY_EN_G, 0x33 },
|
||||
{ KEY_EN_B, 0x34 },
|
||||
{ KEY_EN_SPACE, 0x35 },
|
||||
{ KEY_EN_6, 0x39 },
|
||||
{ KEY_EN_Y, 0x3A },
|
||||
{ KEY_EN_H, 0x3B },
|
||||
{ KEY_EN_N, 0x3C },
|
||||
{ KEY_EN_F5, 0x40 },
|
||||
{ KEY_EN_7, 0x41 },
|
||||
{ KEY_EN_U, 0x42 },
|
||||
{ KEY_EN_J, 0x43 },
|
||||
{ KEY_EN_M, 0x44 },
|
||||
{ KEY_EN_F6, 0x48 },
|
||||
{ KEY_EN_8, 0x49 },
|
||||
{ KEY_EN_I, 0x4A },
|
||||
{ KEY_EN_K, 0x4B },
|
||||
{ KEY_EN_COMMA, 0x4C },
|
||||
{ KEY_EN_RIGHT_ALT, 0x4D },
|
||||
{ KEY_EN_F7, 0x50 },
|
||||
{ KEY_EN_9, 0x51 },
|
||||
{ KEY_EN_O, 0x52 },
|
||||
{ KEY_EN_L, 0x53 },
|
||||
{ KEY_EN_PERIOD, 0x54 },
|
||||
{ KEY_EN_F8, 0x58 },
|
||||
{ KEY_EN_0, 0x59 },
|
||||
{ KEY_EN_P, 0x5A },
|
||||
{ KEY_EN_SEMICOLON, 0x5B },
|
||||
{ KEY_EN_FORWARD_SLASH, 0x5C },
|
||||
{ KEY_EN_RIGHT_FUNCTION, 0x5D },
|
||||
{ KEY_EN_F9, 0x60 },
|
||||
{ KEY_EN_MINUS, 0x61 },
|
||||
{ KEY_EN_LEFT_BRACKET, 0x62 },
|
||||
{ KEY_EN_QUOTE, 0x63 },
|
||||
{ KEY_EN_MENU, 0x65 },
|
||||
{ KEY_EN_F10, 0x68 },
|
||||
{ KEY_EN_EQUALS, 0x69 },
|
||||
{ KEY_EN_RIGHT_BRACKET, 0x6A },
|
||||
{ KEY_EN_POUND, 0x6B },
|
||||
{ KEY_EN_F11, 0x70 },
|
||||
{ KEY_EN_F12, 0x78 },
|
||||
{ KEY_EN_BACKSPACE, 0x79 },
|
||||
{ KEY_EN_ANSI_BACK_SLASH, 0x7A },
|
||||
{ KEY_EN_ANSI_ENTER, 0x7B },
|
||||
{ KEY_EN_RIGHT_SHIFT, 0x7C },
|
||||
{ KEY_EN_RIGHT_CONTROL, 0x7D },
|
||||
{ KEY_EN_PRINT_SCREEN, 0x80 },
|
||||
{ KEY_EN_INSERT, 0x81 },
|
||||
{ KEY_EN_DELETE, 0x82 },
|
||||
{ KEY_EN_LEFT_ARROW, 0x85 },
|
||||
{ KEY_EN_SCROLL_LOCK, 0x88 },
|
||||
{ KEY_EN_HOME, 0x89 },
|
||||
{ KEY_EN_END, 0x8A },
|
||||
{ KEY_EN_UP_ARROW, 0x8C },
|
||||
{ KEY_EN_DOWN_ARROW, 0x8D },
|
||||
{ KEY_EN_PAUSE_BREAK, 0x90 },
|
||||
{ KEY_EN_PAGE_UP, 0x91 },
|
||||
{ KEY_EN_PAGE_DOWN, 0x92 },
|
||||
{ KEY_EN_RIGHT_ARROW, 0x95 },
|
||||
{ KEY_EN_NUMPAD_LOCK, 0x99 },
|
||||
{ KEY_EN_NUMPAD_7, 0x9A },
|
||||
{ KEY_EN_NUMPAD_4, 0x9B },
|
||||
{ KEY_EN_NUMPAD_1, 0x9C },
|
||||
{ KEY_EN_NUMPAD_0, 0x9D },
|
||||
{ KEY_EN_NUMPAD_DIVIDE, 0xA1 },
|
||||
{ KEY_EN_NUMPAD_8, 0xA2 },
|
||||
{ KEY_EN_NUMPAD_5, 0xA3 },
|
||||
{ KEY_EN_NUMPAD_2, 0xA4 },
|
||||
{ KEY_EN_NUMPAD_TIMES, 0xA9 },
|
||||
{ KEY_EN_NUMPAD_9, 0xAA },
|
||||
{ KEY_EN_NUMPAD_6, 0xAB },
|
||||
{ KEY_EN_NUMPAD_3, 0xAC },
|
||||
{ KEY_EN_NUMPAD_PERIOD, 0xAD },
|
||||
{ KEY_EN_NUMPAD_MINUS, 0xB1 },
|
||||
{ KEY_EN_NUMPAD_PLUS, 0xB2 },
|
||||
{ KEY_EN_NUMPAD_ENTER, 0xB4 },
|
||||
};
|
||||
|
||||
static const std::vector<led_type> default_tkl_led_names =
|
||||
{
|
||||
/* Key Label Index */
|
||||
{ "Key: Escape", 0x00 },
|
||||
{ "Key: `", 0x01 },
|
||||
{ "Key: Tab", 0x02 },
|
||||
{ "Key: Caps Lock", 0x03 },
|
||||
{ "Key: Left Shift", 0x04 },
|
||||
{ "Key: Left Control", 0x05 },
|
||||
{ "Key: \\ (ISO)", 0x0C },
|
||||
{ "Key: 1", 0x11 },
|
||||
{ "Key: Q", 0x12 },
|
||||
{ "Key: A", 0x13 },
|
||||
{ "Key: Z", 0x14 },
|
||||
{ "Key: F1", 0x18 },
|
||||
{ "Key: 2", 0x19 },
|
||||
{ "Key: W", 0x1A },
|
||||
{ "Key: S", 0x1B },
|
||||
{ "Key: X", 0x1C },
|
||||
{ "Key: F2", 0x20 },
|
||||
{ "Key: 3", 0x21 },
|
||||
{ "Key: E", 0x22 },
|
||||
{ "Key: D", 0x23 },
|
||||
{ "Key: C", 0x24 },
|
||||
{ "Key: F3", 0x28 },
|
||||
{ "Key: 4", 0x29 },
|
||||
{ "Key: R", 0x2A },
|
||||
{ "Key: F", 0x2B },
|
||||
{ "Key: V", 0x2C },
|
||||
{ "Key: F4", 0x30 },
|
||||
{ "Key: 5", 0x31 },
|
||||
{ "Key: T", 0x32 },
|
||||
{ "Key: G", 0x33 },
|
||||
{ "Key: B", 0x34 },
|
||||
{ "Key: Space", 0x35 },
|
||||
{ "Key: 6", 0x39 },
|
||||
{ "Key: Y", 0x3A },
|
||||
{ "Key: H", 0x3B },
|
||||
{ "Key: N", 0x3C },
|
||||
{ "Key: F5", 0x40 },
|
||||
{ "Key: 7", 0x41 },
|
||||
{ "Key: U", 0x42 },
|
||||
{ "Key: J", 0x43 },
|
||||
{ "Key: M", 0x44 },
|
||||
{ "Key: F6", 0x48 },
|
||||
{ "Key: 8", 0x49 },
|
||||
{ "Key: I", 0x4A },
|
||||
{ "Key: K", 0x4B },
|
||||
{ "Key: ,", 0x4C },
|
||||
{ "Key: Right Alt", 0x4D },
|
||||
{ "Key: F7", 0x50 },
|
||||
{ "Key: 9", 0x51 },
|
||||
{ "Key: O", 0x52 },
|
||||
{ "Key: L", 0x53 },
|
||||
{ "Key: .", 0x54 },
|
||||
{ "Key: F8", 0x58 },
|
||||
{ "Key: 0", 0x59 },
|
||||
{ "Key: P", 0x5A },
|
||||
{ "Key: ;", 0x5B },
|
||||
{ "Key: /", 0x5C },
|
||||
{ "Key: Right Fn", 0x5D },
|
||||
{ "Key: F9", 0x60 },
|
||||
{ "Key: -", 0x61 },
|
||||
{ "Key: [", 0x62 },
|
||||
{ "Key: '", 0x63 },
|
||||
{ "Key: Menu", 0x65 },
|
||||
{ "Key: F10", 0x68 },
|
||||
{ "Key: =", 0x69 },
|
||||
{ "Key: ]", 0x6A },
|
||||
{ "Key: #", 0x6B },
|
||||
{ "Key: F11", 0x70 },
|
||||
{ "Key: F12", 0x78 },
|
||||
{ "Key: Backspace", 0x79 },
|
||||
{ "Key: \\ (ANSI)", 0x7A },
|
||||
{ "Key: Enter", 0x7B },
|
||||
{ "Key: Right Shift", 0x7C },
|
||||
{ "Key: Right Control", 0x7D },
|
||||
{ "Key: Insert", 0x81 },
|
||||
{ "Key: Delete", 0x82 },
|
||||
{ "Key: Left Arrow", 0x85 },
|
||||
{ "Key: Home", 0x89 },
|
||||
{ "Key: End", 0x8A },
|
||||
{ "Key: Up Arrow", 0x8C },
|
||||
{ "Key: Down Arrow", 0x8D },
|
||||
{ "Key: Page Up", 0x91 },
|
||||
{ "Key: Page Down", 0x92 },
|
||||
{ "Key: Right Arrow", 0x95 },
|
||||
{ KEY_EN_ESCAPE, 0x00 },
|
||||
{ KEY_EN_BACK_TICK, 0x01 },
|
||||
{ KEY_EN_TAB, 0x02 },
|
||||
{ KEY_EN_CAPS_LOCK, 0x03 },
|
||||
{ KEY_EN_LEFT_SHIFT, 0x04 },
|
||||
{ KEY_EN_LEFT_CONTROL, 0x05 },
|
||||
{ KEY_EN_ISO_BACK_SLASH, 0x0C },
|
||||
{ KEY_EN_1, 0x11 },
|
||||
{ KEY_EN_Q, 0x12 },
|
||||
{ KEY_EN_A, 0x13 },
|
||||
{ KEY_EN_Z, 0x14 },
|
||||
{ KEY_EN_F1, 0x18 },
|
||||
{ KEY_EN_2, 0x19 },
|
||||
{ KEY_EN_W, 0x1A },
|
||||
{ KEY_EN_S, 0x1B },
|
||||
{ KEY_EN_X, 0x1C },
|
||||
{ KEY_EN_F2, 0x20 },
|
||||
{ KEY_EN_3, 0x21 },
|
||||
{ KEY_EN_E, 0x22 },
|
||||
{ KEY_EN_D, 0x23 },
|
||||
{ KEY_EN_C, 0x24 },
|
||||
{ KEY_EN_F3, 0x28 },
|
||||
{ KEY_EN_4, 0x29 },
|
||||
{ KEY_EN_R, 0x2A },
|
||||
{ KEY_EN_F, 0x2B },
|
||||
{ KEY_EN_V, 0x2C },
|
||||
{ KEY_EN_F4, 0x30 },
|
||||
{ KEY_EN_5, 0x31 },
|
||||
{ KEY_EN_T, 0x32 },
|
||||
{ KEY_EN_G, 0x33 },
|
||||
{ KEY_EN_B, 0x34 },
|
||||
{ KEY_EN_SPACE, 0x35 },
|
||||
{ KEY_EN_6, 0x39 },
|
||||
{ KEY_EN_Y, 0x3A },
|
||||
{ KEY_EN_H, 0x3B },
|
||||
{ KEY_EN_N, 0x3C },
|
||||
{ KEY_EN_F5, 0x40 },
|
||||
{ KEY_EN_7, 0x41 },
|
||||
{ KEY_EN_U, 0x42 },
|
||||
{ KEY_EN_J, 0x43 },
|
||||
{ KEY_EN_M, 0x44 },
|
||||
{ KEY_EN_F6, 0x48 },
|
||||
{ KEY_EN_8, 0x49 },
|
||||
{ KEY_EN_I, 0x4A },
|
||||
{ KEY_EN_K, 0x4B },
|
||||
{ KEY_EN_COMMA, 0x4C },
|
||||
{ KEY_EN_RIGHT_ALT, 0x4D },
|
||||
{ KEY_EN_F7, 0x50 },
|
||||
{ KEY_EN_9, 0x51 },
|
||||
{ KEY_EN_O, 0x52 },
|
||||
{ KEY_EN_L, 0x53 },
|
||||
{ KEY_EN_PERIOD, 0x54 },
|
||||
{ KEY_EN_F8, 0x58 },
|
||||
{ KEY_EN_0, 0x59 },
|
||||
{ KEY_EN_P, 0x5A },
|
||||
{ KEY_EN_SEMICOLON, 0x5B },
|
||||
{ KEY_EN_FORWARD_SLASH, 0x5C },
|
||||
{ KEY_EN_RIGHT_FUNCTION, 0x5D },
|
||||
{ KEY_EN_F9, 0x60 },
|
||||
{ KEY_EN_MINUS, 0x61 },
|
||||
{ KEY_EN_LEFT_BRACKET, 0x62 },
|
||||
{ KEY_EN_QUOTE, 0x63 },
|
||||
{ KEY_EN_MENU, 0x65 },
|
||||
{ KEY_EN_F10, 0x68 },
|
||||
{ KEY_EN_EQUALS, 0x69 },
|
||||
{ KEY_EN_RIGHT_BRACKET, 0x6A },
|
||||
{ KEY_EN_POUND, 0x6B },
|
||||
{ KEY_EN_F11, 0x70 },
|
||||
{ KEY_EN_F12, 0x78 },
|
||||
{ KEY_EN_BACKSPACE, 0x79 },
|
||||
{ KEY_EN_ANSI_BACK_SLASH, 0x7A },
|
||||
{ KEY_EN_ANSI_ENTER, 0x7B },
|
||||
{ KEY_EN_RIGHT_SHIFT, 0x7C },
|
||||
{ KEY_EN_RIGHT_CONTROL, 0x7D },
|
||||
{ KEY_EN_INSERT, 0x81 },
|
||||
{ KEY_EN_DELETE, 0x82 },
|
||||
{ KEY_EN_LEFT_ARROW, 0x85 },
|
||||
{ KEY_EN_HOME, 0x89 },
|
||||
{ KEY_EN_END, 0x8A },
|
||||
{ KEY_EN_UP_ARROW, 0x8C },
|
||||
{ KEY_EN_DOWN_ARROW, 0x8D },
|
||||
{ KEY_EN_PAGE_UP, 0x91 },
|
||||
{ KEY_EN_PAGE_DOWN, 0x92 },
|
||||
{ KEY_EN_RIGHT_ARROW, 0x95 },
|
||||
{ "Logo 1", 0x80 },
|
||||
{ "Logo 2", 0x90 },
|
||||
{ "Underglow 1", 0x06 },
|
||||
@@ -272,87 +273,97 @@ static const std::vector<led_type> default_tkl_led_names =
|
||||
static const std::vector<led_type> default_65pct_led_names =
|
||||
{
|
||||
/* Key Label Index */
|
||||
{ "Key: Escape", 0x00 },
|
||||
{ "Key: Tab", 0x01 },
|
||||
{ "Key: Caps Lock", 0x02 },
|
||||
{ "Key: Left Shift", 0x03 },
|
||||
{ "Key: Left Control", 0x04 },
|
||||
{ "Key: 1", 0x08 },
|
||||
{ "Key: Q", 0x09 },
|
||||
{ "Key: A", 0x0A },
|
||||
{ "Key: Left Windows", 0x0C },
|
||||
{ "Key: 2", 0x10 },
|
||||
{ "Key: W", 0x11 },
|
||||
{ "Key: S", 0x12 },
|
||||
{ "Key: Z", 0x13 },
|
||||
{ "Key: Left Alt", 0x14 },
|
||||
{ "Key: 3", 0x18 },
|
||||
{ "Key: E", 0x19 },
|
||||
{ "Key: D", 0x1A },
|
||||
{ "Key: X", 0x1B },
|
||||
{ "Key: 4", 0x20 },
|
||||
{ "Key: R", 0x21 },
|
||||
{ "Key: F", 0x22 },
|
||||
{ "Key: C", 0x23 },
|
||||
{ "Key: 5", 0x28 },
|
||||
{ "Key: T", 0x29 },
|
||||
{ "Key: G", 0x2A },
|
||||
{ "Key: V", 0x2B },
|
||||
{ "Key: 6", 0x30 },
|
||||
{ "Key: Y", 0x31 },
|
||||
{ "Key: H", 0x32 },
|
||||
{ "Key: B", 0x33 },
|
||||
{ "Key: Space", 0x34 },
|
||||
{ "Key: 7", 0x38 },
|
||||
{ "Key: U", 0x39 },
|
||||
{ "Key: J", 0x3A },
|
||||
{ "Key: N", 0x3B },
|
||||
{ "Key: 8", 0x40 },
|
||||
{ "Key: I", 0x41 },
|
||||
{ "Key: K", 0x42 },
|
||||
{ "Key: M", 0x43 },
|
||||
{ "Key: 9", 0x48 },
|
||||
{ "Key: O", 0x49 },
|
||||
{ "Key: L", 0x4A },
|
||||
{ "Key: ,", 0x4B },
|
||||
{ "Key: Right Alt", 0x4C },
|
||||
{ "Key: 0", 0x50 },
|
||||
{ "Key: P", 0x51 },
|
||||
{ "Key: ;", 0x52 },
|
||||
{ "Key: .", 0x53 },
|
||||
{ "Key: Right Fn", 0x54 },
|
||||
{ "Key: -", 0x58 },
|
||||
{ "Key: [", 0x59 },
|
||||
{ "Key: '", 0x5A },
|
||||
{ "Key: /", 0x5B },
|
||||
{ "Key: Right Control", 0x5C },
|
||||
{ "Key: =", 0x60 },
|
||||
{ "Key: ]", 0x61 },
|
||||
{ "Key: Right Shift", 0x63 },
|
||||
{ "Key: Left Arrow", 0x64 },
|
||||
{ "Key: Backspace", 0x68 },
|
||||
{ "Key: \\ (ANSI)", 0x69 },
|
||||
{ "Key: Enter", 0x6A },
|
||||
{ "Key: Up Arrow", 0x6B },
|
||||
{ "Key: Down Arrow", 0x6C },
|
||||
{ "Key: Insert", 0x70 },
|
||||
{ "Key: Delete", 0x71 },
|
||||
{ "Key: Page Up", 0x72 },
|
||||
{ "Key: Page Down", 0x73 },
|
||||
{ "Key: Right Arrow", 0x74 },
|
||||
{ KEY_EN_ESCAPE, 0x00 },
|
||||
{ KEY_EN_TAB, 0x01 },
|
||||
{ KEY_EN_CAPS_LOCK, 0x02 },
|
||||
{ KEY_EN_LEFT_SHIFT, 0x03 },
|
||||
{ KEY_EN_LEFT_CONTROL, 0x04 },
|
||||
{ KEY_EN_1, 0x08 },
|
||||
{ KEY_EN_Q, 0x09 },
|
||||
{ KEY_EN_A, 0x0A },
|
||||
{ KEY_EN_LEFT_WINDOWS, 0x0C },
|
||||
{ KEY_EN_2, 0x10 },
|
||||
{ KEY_EN_W, 0x11 },
|
||||
{ KEY_EN_S, 0x12 },
|
||||
{ KEY_EN_Z, 0x13 },
|
||||
{ KEY_EN_LEFT_ALT, 0x14 },
|
||||
{ KEY_EN_3, 0x18 },
|
||||
{ KEY_EN_E, 0x19 },
|
||||
{ KEY_EN_D, 0x1A },
|
||||
{ KEY_EN_X, 0x1B },
|
||||
{ KEY_EN_4, 0x20 },
|
||||
{ KEY_EN_R, 0x21 },
|
||||
{ KEY_EN_F, 0x22 },
|
||||
{ KEY_EN_C, 0x23 },
|
||||
{ KEY_EN_5, 0x28 },
|
||||
{ KEY_EN_T, 0x29 },
|
||||
{ KEY_EN_G, 0x2A },
|
||||
{ KEY_EN_V, 0x2B },
|
||||
{ KEY_EN_6, 0x30 },
|
||||
{ KEY_EN_Y, 0x31 },
|
||||
{ KEY_EN_H, 0x32 },
|
||||
{ KEY_EN_B, 0x33 },
|
||||
{ KEY_EN_SPACE, 0x34 },
|
||||
{ KEY_EN_7, 0x38 },
|
||||
{ KEY_EN_U, 0x39 },
|
||||
{ KEY_EN_J, 0x3A },
|
||||
{ KEY_EN_N, 0x3B },
|
||||
{ KEY_EN_8, 0x40 },
|
||||
{ KEY_EN_I, 0x41 },
|
||||
{ KEY_EN_K, 0x42 },
|
||||
{ KEY_EN_M, 0x43 },
|
||||
{ KEY_EN_9, 0x48 },
|
||||
{ KEY_EN_O, 0x49 },
|
||||
{ KEY_EN_L, 0x4A },
|
||||
{ KEY_EN_COMMA, 0x4B },
|
||||
{ KEY_EN_RIGHT_ALT, 0x4C },
|
||||
{ KEY_EN_0, 0x50 },
|
||||
{ KEY_EN_P, 0x51 },
|
||||
{ KEY_EN_SEMICOLON, 0x52 },
|
||||
{ KEY_EN_PERIOD, 0x53 },
|
||||
{ KEY_EN_RIGHT_FUNCTION, 0x54 },
|
||||
{ KEY_EN_MINUS, 0x58 },
|
||||
{ KEY_EN_LEFT_BRACKET, 0x59 },
|
||||
{ KEY_EN_QUOTE, 0x5A },
|
||||
{ KEY_EN_FORWARD_SLASH, 0x5B },
|
||||
{ KEY_EN_RIGHT_CONTROL, 0x5C },
|
||||
{ KEY_EN_EQUALS, 0x60 },
|
||||
{ KEY_EN_RIGHT_BRACKET, 0x61 },
|
||||
{ KEY_EN_RIGHT_SHIFT, 0x63 },
|
||||
{ KEY_EN_LEFT_ARROW, 0x64 },
|
||||
{ KEY_EN_BACKSPACE, 0x68 },
|
||||
{ KEY_EN_ANSI_BACK_SLASH, 0x69 },
|
||||
{ KEY_EN_ANSI_ENTER, 0x6A },
|
||||
{ KEY_EN_UP_ARROW, 0x6B },
|
||||
{ KEY_EN_DOWN_ARROW, 0x6C },
|
||||
{ KEY_EN_INSERT, 0x70 },
|
||||
{ KEY_EN_DELETE, 0x71 },
|
||||
{ KEY_EN_PAGE_UP, 0x72 },
|
||||
{ KEY_EN_PAGE_DOWN, 0x73 },
|
||||
{ KEY_EN_RIGHT_ARROW, 0x74 },
|
||||
};
|
||||
|
||||
RGBController_AuraKeyboard::RGBController_AuraKeyboard(AuraKeyboardController* aura_ptr, AuraKeyboardMappingLayoutType keyboard_layout)
|
||||
/**------------------------------------------------------------------*\
|
||||
@name Asus Aura Keyboard
|
||||
@type USB
|
||||
@save :x:
|
||||
@direct :white_check_mark:
|
||||
@effects :x:
|
||||
@detectors DetectAsusAuraUSBKeyboards
|
||||
@comment
|
||||
\*-------------------------------------------------------------------*/
|
||||
|
||||
RGBController_AuraKeyboard::RGBController_AuraKeyboard(AuraKeyboardController* controller_ptr, AuraKeyboardMappingLayoutType keyboard_layout)
|
||||
{
|
||||
aura = aura_ptr;
|
||||
controller = controller_ptr;
|
||||
layout = keyboard_layout;
|
||||
|
||||
name = "ASUS Aura Keyboard";
|
||||
vendor = "ASUS";
|
||||
type = DEVICE_TYPE_KEYBOARD;
|
||||
description = "ASUS Aura Keyboard Device";
|
||||
location = aura->GetDeviceLocation();
|
||||
serial = aura->GetSerialString();
|
||||
location = controller->GetDeviceLocation();
|
||||
serial = controller->GetSerialString();
|
||||
|
||||
mode Direct;
|
||||
Direct.name = "Direct";
|
||||
@@ -373,7 +384,8 @@ RGBController_AuraKeyboard::~RGBController_AuraKeyboard()
|
||||
delete zones[zone_idx].matrix_map;
|
||||
}
|
||||
}
|
||||
delete aura;
|
||||
|
||||
delete controller;
|
||||
}
|
||||
|
||||
void RGBController_AuraKeyboard::SetupZones()
|
||||
@@ -394,8 +406,8 @@ void RGBController_AuraKeyboard::SetupZones()
|
||||
led_names = default_led_names;
|
||||
led_zones.push_back({"Keyboard", ZONE_TYPE_MATRIX, 106, new matrix_map_type{6, 22, (unsigned int *)&scope_matrix_map}});
|
||||
|
||||
led_names.insert(led_names.begin() + 7, {"Key: Left Windows", 0x15});
|
||||
led_names.insert(led_names.begin() + 12, {"Key: Left Alt", 0x1D});
|
||||
led_names.insert(led_names.begin() + 7, {KEY_EN_LEFT_WINDOWS, 0x15});
|
||||
led_names.insert(led_names.begin() + 12, {KEY_EN_LEFT_ALT, 0x1D});
|
||||
break;
|
||||
|
||||
case SCOPE_RX_LAYOUT:
|
||||
@@ -403,8 +415,8 @@ void RGBController_AuraKeyboard::SetupZones()
|
||||
led_zones.push_back({"Keyboard", ZONE_TYPE_MATRIX, 106, new matrix_map_type{6, 22, (unsigned int *)&scope_matrix_map}});
|
||||
led_zones.push_back({"Logo", ZONE_TYPE_SINGLE, 1});
|
||||
|
||||
led_names.insert(led_names.begin() + 7, {"Key: Left Windows", 0x15});
|
||||
led_names.insert(led_names.begin() + 12, {"Key: Left Alt", 0x1D});
|
||||
led_names.insert(led_names.begin() + 7, {KEY_EN_LEFT_WINDOWS, 0x15});
|
||||
led_names.insert(led_names.begin() + 12, {KEY_EN_LEFT_ALT, 0x1D});
|
||||
led_names.push_back({ "Logo", 0xB0});
|
||||
break;
|
||||
|
||||
@@ -414,8 +426,8 @@ void RGBController_AuraKeyboard::SetupZones()
|
||||
led_zones.push_back({"Logo", ZONE_TYPE_LINEAR, 2});
|
||||
led_zones.push_back({"Underglow", ZONE_TYPE_LINEAR, 26});
|
||||
|
||||
led_names.insert(led_names.begin() + 7, {"Key: Left Windows", 0x15});
|
||||
led_names.insert(led_names.begin() + 12, {"Key: Left Alt", 0x1D});
|
||||
led_names.insert(led_names.begin() + 7, {KEY_EN_LEFT_WINDOWS, 0x15});
|
||||
led_names.insert(led_names.begin() + 12, {KEY_EN_LEFT_ALT, 0x1D});
|
||||
break;
|
||||
|
||||
case FLARE_LAYOUT:
|
||||
@@ -424,8 +436,8 @@ void RGBController_AuraKeyboard::SetupZones()
|
||||
led_zones.push_back({"Logo", ZONE_TYPE_SINGLE, 1});
|
||||
led_zones.push_back({"Underglow", ZONE_TYPE_SINGLE, 2});
|
||||
|
||||
led_names.insert(led_names.begin() + 7, {"Key: Left Windows", 0x0D});
|
||||
led_names.insert(led_names.begin() + 12, {"Key: Left Alt", 0x15});
|
||||
led_names.insert(led_names.begin() + 7, {KEY_EN_LEFT_WINDOWS, 0x0D});
|
||||
led_names.insert(led_names.begin() + 12, {KEY_EN_LEFT_ALT, 0x15});
|
||||
|
||||
led_names.push_back({ "Logo", 0xB8});
|
||||
led_names.push_back({ "Left Underglow", 0xB9});
|
||||
@@ -501,7 +513,7 @@ void RGBController_AuraKeyboard::DeviceUpdateLEDs()
|
||||
frame_buf[(led_idx * 4) + 3] = RGBGetBValue(colors[led_idx]);
|
||||
}
|
||||
|
||||
aura->SendDirect(leds.size(), frame_buf.data());
|
||||
controller->SendDirect(leds.size(), frame_buf.data());
|
||||
}
|
||||
|
||||
void RGBController_AuraKeyboard::UpdateZoneLEDs(int /*zone*/)
|
||||
|
||||
@@ -37,7 +37,7 @@ typedef struct
|
||||
class RGBController_AuraKeyboard : public RGBController
|
||||
{
|
||||
public:
|
||||
RGBController_AuraKeyboard(AuraKeyboardController* aura_ptr, AuraKeyboardMappingLayoutType keyboard_layout);
|
||||
RGBController_AuraKeyboard(AuraKeyboardController* controller_ptr, AuraKeyboardMappingLayoutType keyboard_layout);
|
||||
~RGBController_AuraKeyboard();
|
||||
|
||||
void SetupZones();
|
||||
@@ -52,6 +52,6 @@ public:
|
||||
void DeviceUpdateMode();
|
||||
|
||||
private:
|
||||
AuraKeyboardController* aura;
|
||||
AuraKeyboardController* controller;
|
||||
AuraKeyboardMappingLayoutType layout;
|
||||
};
|
||||
|
||||
@@ -0,0 +1,128 @@
|
||||
/*-----------------------------------------*\
|
||||
| RGBController_AsusAuraMonitor.cpp |
|
||||
| |
|
||||
| Generic RGB Interface for Asus Aura |
|
||||
| USB controller driver |
|
||||
| |
|
||||
| Mola19 08/03/2022 |
|
||||
\*-----------------------------------------*/
|
||||
|
||||
#include "RGBController_AsusAuraMonitor.h"
|
||||
|
||||
/**------------------------------------------------------------------*\
|
||||
@name Asus Aura Monitor
|
||||
@type USB
|
||||
@save :x:
|
||||
@direct :white_check_mark:
|
||||
@effects :x:
|
||||
@detectors DetectAsusAuraUSBMonitor
|
||||
@comment
|
||||
\*-------------------------------------------------------------------*/
|
||||
|
||||
RGBController_AuraMonitor::RGBController_AuraMonitor(AuraMonitorController* controller_ptr)
|
||||
{
|
||||
controller = controller_ptr;
|
||||
|
||||
name = "ASUS Aura Monitor";
|
||||
vendor = "ASUS";
|
||||
type = DEVICE_TYPE_LEDSTRIP;
|
||||
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;
|
||||
modes.push_back(Direct);
|
||||
|
||||
SetupZones();
|
||||
}
|
||||
|
||||
RGBController_AuraMonitor::~RGBController_AuraMonitor()
|
||||
{
|
||||
delete controller;
|
||||
}
|
||||
|
||||
void RGBController_AuraMonitor::SetupZones()
|
||||
{
|
||||
zone underglow_zone;
|
||||
|
||||
underglow_zone.name = "Backlight";
|
||||
underglow_zone.type = ZONE_TYPE_LINEAR;
|
||||
underglow_zone.leds_min = 3;
|
||||
underglow_zone.leds_max = 3;
|
||||
underglow_zone.leds_count = 3;
|
||||
underglow_zone.matrix_map = NULL;
|
||||
|
||||
zones.push_back(underglow_zone);
|
||||
|
||||
for(unsigned int i = 0; i < 3; i++)
|
||||
{
|
||||
led underglow_led;
|
||||
|
||||
underglow_led.name = "Backlight LED " + std::to_string(i + 1);
|
||||
|
||||
leds.push_back(underglow_led);
|
||||
}
|
||||
|
||||
SetupColors();
|
||||
}
|
||||
|
||||
void RGBController_AuraMonitor::ResizeZone(int /*zone*/, int /*new_size*/)
|
||||
{
|
||||
/*---------------------------------------------------------*\
|
||||
| This device does not support resizing zones |
|
||||
\*---------------------------------------------------------*/
|
||||
}
|
||||
|
||||
void RGBController_AuraMonitor::DeviceUpdateLEDs()
|
||||
{
|
||||
for (int i = 0; i < 3; i++)
|
||||
{
|
||||
unsigned char red = RGBGetRValue(colors[i]);
|
||||
unsigned char green = RGBGetGValue(colors[i]);
|
||||
unsigned char blue = RGBGetBValue(colors[i]);
|
||||
|
||||
controller->UpdateLed(i, red, green, blue);
|
||||
}
|
||||
|
||||
controller->ApplyChanges();
|
||||
}
|
||||
|
||||
void RGBController_AuraMonitor::UpdateZoneLEDs(int /*zone*/)
|
||||
{
|
||||
DeviceUpdateLEDs();
|
||||
}
|
||||
|
||||
void RGBController_AuraMonitor::UpdateSingleLED(int led)
|
||||
{
|
||||
unsigned char red = RGBGetRValue(colors[led]);
|
||||
unsigned char green = RGBGetGValue(colors[led]);
|
||||
unsigned char blue = RGBGetBValue(colors[led]);
|
||||
|
||||
controller->UpdateLed(led, red, green, blue);
|
||||
|
||||
controller->ApplyChanges();
|
||||
}
|
||||
|
||||
void RGBController_AuraMonitor::SetCustomMode()
|
||||
{
|
||||
active_mode = 0;
|
||||
}
|
||||
|
||||
|
||||
void RGBController_AuraMonitor::DeviceUpdateMode()
|
||||
{
|
||||
/*---------------------------------------------------------*\
|
||||
| This device does not support Mode changing |
|
||||
\*---------------------------------------------------------*/
|
||||
}
|
||||
|
||||
void RGBController_AuraMonitor::DeviceSaveMode()
|
||||
{
|
||||
/*---------------------------------------------------------*\
|
||||
| This device does not support Mode saving |
|
||||
\*---------------------------------------------------------*/
|
||||
}
|
||||
@@ -0,0 +1,34 @@
|
||||
/*-----------------------------------------*\
|
||||
| RGBController_AsusAuraMonitor.h |
|
||||
| |
|
||||
| Generic RGB Interface for Asus Aura |
|
||||
| USB controller driver |
|
||||
| |
|
||||
| Mola19 08/03/2022 |
|
||||
\*-----------------------------------------*/
|
||||
|
||||
#pragma once
|
||||
#include "RGBController.h"
|
||||
#include "AsusAuraMonitorController.h"
|
||||
|
||||
class RGBController_AuraMonitor : public RGBController
|
||||
{
|
||||
public:
|
||||
RGBController_AuraMonitor(AuraMonitorController* controller_ptr);
|
||||
~RGBController_AuraMonitor();
|
||||
|
||||
void SetupZones();
|
||||
|
||||
void ResizeZone(int zone, int new_size);
|
||||
|
||||
void DeviceUpdateLEDs();
|
||||
void UpdateZoneLEDs(int zone);
|
||||
void UpdateSingleLED(int led);
|
||||
|
||||
void SetCustomMode();
|
||||
void DeviceUpdateMode();
|
||||
void DeviceSaveMode();
|
||||
|
||||
private:
|
||||
AuraMonitorController* controller;
|
||||
};
|
||||
@@ -16,19 +16,29 @@ static std::string aura_mouse_zone_names[3]
|
||||
"Underglow"
|
||||
};
|
||||
|
||||
RGBController_AuraMouse::RGBController_AuraMouse(AuraMouseController* aura_ptr)
|
||||
{
|
||||
aura = aura_ptr;
|
||||
/**------------------------------------------------------------------*\
|
||||
@name Asus Aura Mouse
|
||||
@type USB
|
||||
@save :white_check_mark:
|
||||
@direct :white_check_mark:
|
||||
@effects :white_check_mark:
|
||||
@detectors DetectAsusAuraUSBMice
|
||||
@comment
|
||||
\*-------------------------------------------------------------------*/
|
||||
|
||||
uint16_t pid = aura->device_pid;
|
||||
RGBController_AuraMouse::RGBController_AuraMouse(AuraMouseController* controller_ptr)
|
||||
{
|
||||
controller = controller_ptr;
|
||||
|
||||
uint16_t pid = controller->device_pid;
|
||||
|
||||
name = "ASUS Aura Mouse";
|
||||
vendor = "ASUS";
|
||||
type = DEVICE_TYPE_MOUSE;
|
||||
description = "ASUS Aura Mouse Device";
|
||||
version = aura->GetVersion(aura_mouse_devices[pid].wireless, aura_mouse_devices[pid].version_protocol);
|
||||
location = aura->GetDeviceLocation();
|
||||
serial = aura->GetSerialString();
|
||||
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;
|
||||
|
||||
@@ -152,13 +162,12 @@ RGBController_AuraMouse::RGBController_AuraMouse(AuraMouseController* aura_ptr)
|
||||
|
||||
RGBController_AuraMouse::~RGBController_AuraMouse()
|
||||
{
|
||||
delete aura;
|
||||
delete controller;
|
||||
}
|
||||
|
||||
void RGBController_AuraMouse::SetupZones()
|
||||
{
|
||||
|
||||
uint16_t pid = aura->device_pid;
|
||||
uint16_t pid = controller->device_pid;
|
||||
|
||||
for(std::vector<uint8_t>::iterator zone_it = aura_mouse_devices[pid].mouse_zones.begin(); zone_it != aura_mouse_devices[pid].mouse_zones.end(); zone_it++)
|
||||
{
|
||||
@@ -208,7 +217,7 @@ void RGBController_AuraMouse::UpdateSingleLED(int led)
|
||||
uint8_t grn = RGBGetGValue(colors[led]);
|
||||
uint8_t blu = RGBGetBValue(colors[led]);
|
||||
|
||||
aura->SendUpdate(leds[led].value, modes[active_mode].value, red, grn, blu, 0, false, 0, modes[active_mode].brightness);
|
||||
controller->SendUpdate(leds[led].value, modes[active_mode].value, red, grn, blu, 0, false, 0, modes[active_mode].brightness);
|
||||
}
|
||||
|
||||
void RGBController_AuraMouse::SetCustomMode()
|
||||
@@ -235,12 +244,12 @@ void RGBController_AuraMouse::DeviceUpdateMode()
|
||||
blu = RGBGetBValue(modes[active_mode].colors[0]);
|
||||
}
|
||||
|
||||
aura->SendUpdate(AURA_MOUSE_ZONE_ALL, modes[active_mode].value, red, grn, blu, modes[active_mode].direction, modes[active_mode].color_mode == MODE_COLORS_RANDOM, modes[active_mode].speed, modes[active_mode].brightness);
|
||||
controller->SendUpdate(AURA_MOUSE_ZONE_ALL, modes[active_mode].value, red, grn, blu, modes[active_mode].direction, modes[active_mode].color_mode == MODE_COLORS_RANDOM, modes[active_mode].speed, modes[active_mode].brightness);
|
||||
}
|
||||
}
|
||||
|
||||
void RGBController_AuraMouse::DeviceSaveMode()
|
||||
{
|
||||
DeviceUpdateMode();
|
||||
aura->SaveMode();
|
||||
controller->SaveMode();
|
||||
}
|
||||
|
||||
@@ -12,15 +12,15 @@
|
||||
#include "AsusAuraMouseController.h"
|
||||
|
||||
enum {
|
||||
AURA_MOUSE_BRIGHTNESS_MIN = 0,
|
||||
AURA_MOUSE_BRIGHTNESS_MAX = 4,
|
||||
AURA_MOUSE_BRIGHTNESS_DEFAULT = 4
|
||||
AURA_MOUSE_BRIGHTNESS_MIN = 0,
|
||||
AURA_MOUSE_BRIGHTNESS_MAX = 4,
|
||||
AURA_MOUSE_BRIGHTNESS_DEFAULT = 4
|
||||
};
|
||||
|
||||
class RGBController_AuraMouse : public RGBController
|
||||
{
|
||||
public:
|
||||
RGBController_AuraMouse(AuraMouseController* aura_ptr);
|
||||
RGBController_AuraMouse(AuraMouseController* controller_ptr);
|
||||
~RGBController_AuraMouse();
|
||||
|
||||
void SetupZones();
|
||||
@@ -36,5 +36,5 @@ public:
|
||||
void DeviceSaveMode();
|
||||
|
||||
private:
|
||||
AuraMouseController* aura;
|
||||
AuraMouseController* controller;
|
||||
};
|
||||
|
||||
@@ -0,0 +1,302 @@
|
||||
/*-----------------------------------------*\
|
||||
| RGBController_AsusAuraMousemat.cpp |
|
||||
| |
|
||||
| Generic RGB Interface for Asus Aura |
|
||||
| USB controller driver |
|
||||
| |
|
||||
| Adam Honse (CalcProgrammer1) 1/10/2022 |
|
||||
\*-----------------------------------------*/
|
||||
|
||||
#include "RGBController_AsusAuraMousemat.h"
|
||||
|
||||
/**------------------------------------------------------------------*\
|
||||
@name Asus Aura Mousemat
|
||||
@type USB
|
||||
@save :white_check_mark:
|
||||
@direct :white_check_mark:
|
||||
@effects :white_check_mark:
|
||||
@detectors DetectAsusAuraUSBMousemats
|
||||
@comment
|
||||
\*-------------------------------------------------------------------*/
|
||||
|
||||
RGBController_AuraMousemat::RGBController_AuraMousemat(AuraMousematController* controller_ptr)
|
||||
{
|
||||
controller = controller_ptr;
|
||||
|
||||
name = "ASUS Aura Mousemat";
|
||||
vendor = "ASUS";
|
||||
type = DEVICE_TYPE_MOUSEMAT;
|
||||
description = "ASUS Aura Mousemat Device";
|
||||
version = controller->GetVersion();
|
||||
location = controller->GetDeviceLocation();
|
||||
serial = controller->GetSerialString();
|
||||
|
||||
mode Direct;
|
||||
Direct.name = "Direct";
|
||||
Direct.value = AURA_MOUSEMAT_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_MOUSEMAT_MODE_STATIC;
|
||||
Static.flags = MODE_FLAG_HAS_MODE_SPECIFIC_COLOR | MODE_FLAG_HAS_BRIGHTNESS | MODE_FLAG_MANUAL_SAVE;
|
||||
Static.color_mode = MODE_COLORS_MODE_SPECIFIC;
|
||||
Static.brightness_min = AURA_MOUSEMAT_BRIGHTNESS_MIN;
|
||||
Static.brightness_max = AURA_MOUSEMAT_BRIGHTNESS_MAX;
|
||||
Static.brightness = AURA_MOUSEMAT_BRIGHTNESS_DEFAULT;
|
||||
Static.colors_min = 1;
|
||||
Static.colors_max = 1;
|
||||
Static.colors.resize(1);
|
||||
modes.push_back(Static);
|
||||
|
||||
mode Breathing;
|
||||
Breathing.name = "Breathing";
|
||||
Breathing.value = AURA_MOUSEMAT_MODE_BREATHING;
|
||||
Breathing.flags = MODE_FLAG_HAS_SPEED | MODE_FLAG_HAS_MODE_SPECIFIC_COLOR | MODE_FLAG_HAS_RANDOM_COLOR | MODE_FLAG_HAS_BRIGHTNESS | MODE_FLAG_MANUAL_SAVE;
|
||||
Breathing.color_mode = MODE_COLORS_MODE_SPECIFIC | MODE_COLORS_RANDOM;
|
||||
Breathing.speed_min = AURA_MOUSEMAT_SPEED_MIN;
|
||||
Breathing.speed_max = AURA_MOUSEMAT_SPEED_MAX;
|
||||
Breathing.speed = AURA_MOUSEMAT_SPEED_DEFAULT_BREATHING;
|
||||
Breathing.brightness_min = AURA_MOUSEMAT_BRIGHTNESS_MIN;
|
||||
Breathing.brightness_max = AURA_MOUSEMAT_BRIGHTNESS_MAX;
|
||||
Breathing.brightness = AURA_MOUSEMAT_BRIGHTNESS_DEFAULT;
|
||||
Breathing.colors_min = 1;
|
||||
Breathing.colors_max = 2;
|
||||
Breathing.colors.resize(1);
|
||||
modes.push_back(Breathing);
|
||||
|
||||
mode ColorCycle;
|
||||
ColorCycle.name = "Color Cycle";
|
||||
ColorCycle.value = AURA_MOUSEMAT_MODE_COLOR_CYCLE;
|
||||
ColorCycle.flags = MODE_FLAG_HAS_SPEED | MODE_FLAG_HAS_BRIGHTNESS | MODE_FLAG_MANUAL_SAVE;
|
||||
ColorCycle.color_mode = MODE_COLORS_NONE;
|
||||
ColorCycle.speed_min = AURA_MOUSEMAT_SPEED_MIN;
|
||||
ColorCycle.speed_max = AURA_MOUSEMAT_SPEED_MAX;
|
||||
ColorCycle.speed = AURA_MOUSEMAT_SPEED_DEFAULT_COLOR_CYCLE;
|
||||
ColorCycle.brightness_min = AURA_MOUSEMAT_BRIGHTNESS_MIN;
|
||||
ColorCycle.brightness_max = AURA_MOUSEMAT_BRIGHTNESS_MAX;
|
||||
ColorCycle.brightness = AURA_MOUSEMAT_BRIGHTNESS_DEFAULT;
|
||||
modes.push_back(ColorCycle);
|
||||
|
||||
mode Wave;
|
||||
Wave.name = "Wave";
|
||||
Wave.value = AURA_MOUSEMAT_MODE_WAVE;
|
||||
Wave.flags = MODE_FLAG_HAS_SPEED | MODE_FLAG_HAS_MODE_SPECIFIC_COLOR | MODE_FLAG_HAS_BRIGHTNESS | MODE_FLAG_HAS_DIRECTION_LR | MODE_FLAG_MANUAL_SAVE;
|
||||
Wave.color_mode = MODE_COLORS_MODE_SPECIFIC;
|
||||
Wave.speed_min = AURA_MOUSEMAT_SPEED_MIN;
|
||||
Wave.speed_max = AURA_MOUSEMAT_SPEED_MAX;
|
||||
Wave.speed = AURA_MOUSEMAT_SPEED_DEFAULT_WAVE;
|
||||
Wave.brightness_min = AURA_MOUSEMAT_BRIGHTNESS_MIN;
|
||||
Wave.brightness_max = AURA_MOUSEMAT_BRIGHTNESS_MAX;
|
||||
Wave.brightness = AURA_MOUSEMAT_BRIGHTNESS_DEFAULT;
|
||||
Wave.direction = MODE_DIRECTION_LEFT;
|
||||
Wave.colors_min = 7;
|
||||
Wave.colors_max = 7;
|
||||
Wave.colors.resize(7);
|
||||
modes.push_back(Wave);
|
||||
|
||||
mode WavePlane;
|
||||
WavePlane.name = "Wave Plane";
|
||||
WavePlane.value = AURA_MOUSEMAT_MODE_WAVE_PLANE;
|
||||
WavePlane.flags = MODE_FLAG_HAS_SPEED | MODE_FLAG_HAS_BRIGHTNESS | MODE_FLAG_HAS_DIRECTION_LR | MODE_FLAG_HAS_DIRECTION_UD | MODE_FLAG_MANUAL_SAVE;
|
||||
WavePlane.color_mode = MODE_COLORS_NONE;
|
||||
WavePlane.speed_min = AURA_MOUSEMAT_SPEED_MIN;
|
||||
WavePlane.speed_max = AURA_MOUSEMAT_SPEED_MAX;
|
||||
WavePlane.speed = AURA_MOUSEMAT_SPEED_DEFAULT_WAVE_PLANE;
|
||||
WavePlane.brightness_min = AURA_MOUSEMAT_BRIGHTNESS_MIN;
|
||||
WavePlane.brightness_max = AURA_MOUSEMAT_BRIGHTNESS_MAX;
|
||||
WavePlane.brightness = AURA_MOUSEMAT_BRIGHTNESS_DEFAULT;
|
||||
WavePlane.direction = MODE_DIRECTION_LEFT;
|
||||
modes.push_back(WavePlane);
|
||||
|
||||
mode Comet;
|
||||
Comet.name = "Comet";
|
||||
Comet.value = AURA_MOUSEMAT_MODE_COMET;
|
||||
Comet.flags = MODE_FLAG_HAS_SPEED | MODE_FLAG_HAS_MODE_SPECIFIC_COLOR | MODE_FLAG_HAS_BRIGHTNESS | MODE_FLAG_HAS_DIRECTION_LR | MODE_FLAG_HAS_DIRECTION_HV | MODE_FLAG_MANUAL_SAVE;
|
||||
Comet.color_mode = MODE_COLORS_MODE_SPECIFIC;
|
||||
Comet.speed_min = AURA_MOUSEMAT_SPEED_MIN;
|
||||
Comet.speed_max = AURA_MOUSEMAT_SPEED_MAX;
|
||||
Comet.speed = AURA_MOUSEMAT_SPEED_DEFAULT_COMET;
|
||||
Comet.brightness_min = AURA_MOUSEMAT_BRIGHTNESS_MIN;
|
||||
Comet.brightness_max = AURA_MOUSEMAT_BRIGHTNESS_MAX;
|
||||
Comet.brightness = AURA_MOUSEMAT_BRIGHTNESS_DEFAULT;
|
||||
Comet.direction = MODE_DIRECTION_LEFT;
|
||||
Comet.colors_min = 1;
|
||||
Comet.colors_max = 1;
|
||||
Comet.colors.resize(1);
|
||||
modes.push_back(Comet);
|
||||
|
||||
mode GlowingYoyo;
|
||||
GlowingYoyo.name = "Glowing Yoyo";
|
||||
GlowingYoyo.value = AURA_MOUSEMAT_MODE_GLOWING_YOYO;
|
||||
GlowingYoyo.flags = MODE_FLAG_HAS_SPEED | MODE_FLAG_HAS_BRIGHTNESS | MODE_FLAG_HAS_DIRECTION_LR | MODE_FLAG_MANUAL_SAVE;
|
||||
GlowingYoyo.color_mode = MODE_COLORS_NONE;
|
||||
GlowingYoyo.speed_min = AURA_MOUSEMAT_SPEED_MIN;
|
||||
GlowingYoyo.speed_max = AURA_MOUSEMAT_SPEED_MAX;
|
||||
GlowingYoyo.speed = AURA_MOUSEMAT_SPEED_DEFAULT_GLOWING_YOYO;
|
||||
GlowingYoyo.brightness_min = AURA_MOUSEMAT_BRIGHTNESS_MIN;
|
||||
GlowingYoyo.brightness_max = AURA_MOUSEMAT_BRIGHTNESS_MAX;
|
||||
GlowingYoyo.brightness = AURA_MOUSEMAT_BRIGHTNESS_DEFAULT;
|
||||
GlowingYoyo.direction = MODE_DIRECTION_LEFT;
|
||||
modes.push_back(GlowingYoyo);
|
||||
|
||||
mode Cross;
|
||||
Cross.name = "Cross";
|
||||
Cross.value = AURA_MOUSEMAT_MODE_CROSS;
|
||||
Cross.flags = MODE_FLAG_HAS_SPEED | MODE_FLAG_HAS_MODE_SPECIFIC_COLOR | MODE_FLAG_HAS_BRIGHTNESS | MODE_FLAG_MANUAL_SAVE;
|
||||
Cross.color_mode = MODE_COLORS_MODE_SPECIFIC;
|
||||
Cross.speed_min = AURA_MOUSEMAT_SPEED_MIN;
|
||||
Cross.speed_max = AURA_MOUSEMAT_SPEED_MAX;
|
||||
Cross.speed = AURA_MOUSEMAT_SPEED_DEFAULT_CROSS;
|
||||
Cross.brightness_min = AURA_MOUSEMAT_BRIGHTNESS_MIN;
|
||||
Cross.brightness_max = AURA_MOUSEMAT_BRIGHTNESS_MAX;
|
||||
Cross.brightness = AURA_MOUSEMAT_BRIGHTNESS_DEFAULT;
|
||||
Cross.colors_min = 2;
|
||||
Cross.colors_max = 2;
|
||||
Cross.colors.resize(2);
|
||||
modes.push_back(Cross);
|
||||
|
||||
mode StarryNight;
|
||||
StarryNight.name = "Starry Night";
|
||||
StarryNight.value = AURA_MOUSEMAT_MODE_STARRY_NIGHT;
|
||||
StarryNight.flags = MODE_FLAG_HAS_SPEED | MODE_FLAG_HAS_MODE_SPECIFIC_COLOR | MODE_FLAG_HAS_RANDOM_COLOR | MODE_FLAG_HAS_BRIGHTNESS | MODE_FLAG_MANUAL_SAVE;
|
||||
StarryNight.color_mode = MODE_COLORS_MODE_SPECIFIC | MODE_COLORS_RANDOM;
|
||||
StarryNight.speed_min = AURA_MOUSEMAT_SPEED_MIN;
|
||||
StarryNight.speed_max = AURA_MOUSEMAT_SPEED_MAX;
|
||||
StarryNight.speed = AURA_MOUSEMAT_SPEED_DEFAULT_STARRY_NIGHT;
|
||||
StarryNight.brightness_min = AURA_MOUSEMAT_BRIGHTNESS_MIN;
|
||||
StarryNight.brightness_max = AURA_MOUSEMAT_BRIGHTNESS_MAX;
|
||||
StarryNight.brightness = AURA_MOUSEMAT_BRIGHTNESS_DEFAULT;
|
||||
StarryNight.colors_min = 2;
|
||||
StarryNight.colors_max = 2;
|
||||
StarryNight.colors.resize(2);
|
||||
modes.push_back(StarryNight);
|
||||
|
||||
SetupZones();
|
||||
}
|
||||
|
||||
RGBController_AuraMousemat::~RGBController_AuraMousemat()
|
||||
{
|
||||
delete controller;
|
||||
}
|
||||
|
||||
void RGBController_AuraMousemat::SetupZones()
|
||||
{
|
||||
zone mousemat_zone;
|
||||
|
||||
mousemat_zone.name = "Mousemat";
|
||||
mousemat_zone.type = ZONE_TYPE_LINEAR;
|
||||
mousemat_zone.leds_min = 15;
|
||||
mousemat_zone.leds_max = 15;
|
||||
mousemat_zone.leds_count = 15;
|
||||
mousemat_zone.matrix_map = NULL;
|
||||
|
||||
zones.push_back(mousemat_zone);
|
||||
|
||||
for(unsigned int i = 0; i < 15; i++)
|
||||
{
|
||||
led mousemat_led;
|
||||
|
||||
mousemat_led.name = "Mousemat LED " + std::to_string(i);
|
||||
|
||||
leds.push_back(mousemat_led);
|
||||
}
|
||||
|
||||
SetupColors();
|
||||
}
|
||||
|
||||
void RGBController_AuraMousemat::ResizeZone(int /*zone*/, int /*new_size*/)
|
||||
{
|
||||
/*---------------------------------------------------------*\
|
||||
| This device does not support resizing zones |
|
||||
\*---------------------------------------------------------*/
|
||||
}
|
||||
|
||||
void RGBController_AuraMousemat::DeviceUpdateLEDs()
|
||||
{
|
||||
controller->UpdateLeds(std::vector<RGBColor>(colors));
|
||||
}
|
||||
|
||||
void RGBController_AuraMousemat::UpdateZoneLEDs(int /*zone*/)
|
||||
{
|
||||
DeviceUpdateLEDs();
|
||||
}
|
||||
|
||||
void RGBController_AuraMousemat::UpdateSingleLED(int /*led*/)
|
||||
{
|
||||
DeviceUpdateLEDs();
|
||||
}
|
||||
|
||||
void RGBController_AuraMousemat::SetCustomMode()
|
||||
{
|
||||
active_mode = 0;
|
||||
}
|
||||
|
||||
void RGBController_AuraMousemat::DeviceUpdateMode()
|
||||
{
|
||||
if(modes[active_mode].value == AURA_MOUSEMAT_MODE_DIRECT)
|
||||
{
|
||||
DeviceUpdateLEDs();
|
||||
}
|
||||
else
|
||||
{
|
||||
int pattern = 0;
|
||||
|
||||
switch(modes[active_mode].value)
|
||||
{
|
||||
case AURA_MOUSEMAT_MODE_BREATHING:
|
||||
if(modes[active_mode].color_mode == MODE_COLORS_RANDOM)
|
||||
{
|
||||
pattern = 2;
|
||||
}
|
||||
else
|
||||
{
|
||||
pattern = modes[active_mode].colors.size() - 1;
|
||||
}
|
||||
break;
|
||||
case AURA_MOUSEMAT_MODE_WAVE:
|
||||
pattern = modes[active_mode].colors.size() * 16 + modes[active_mode].direction;
|
||||
break;
|
||||
case AURA_MOUSEMAT_MODE_WAVE_PLANE:
|
||||
switch(modes[active_mode].direction)
|
||||
{
|
||||
case MODE_DIRECTION_LEFT:
|
||||
pattern = 2;
|
||||
break;
|
||||
case MODE_DIRECTION_RIGHT:
|
||||
pattern = 3;
|
||||
break;
|
||||
case MODE_DIRECTION_UP:
|
||||
pattern = 0;
|
||||
break;
|
||||
case MODE_DIRECTION_DOWN:
|
||||
pattern = 1;
|
||||
break;
|
||||
}
|
||||
break;
|
||||
case AURA_MOUSEMAT_MODE_COMET:
|
||||
pattern = modes[active_mode].direction;
|
||||
if(pattern == MODE_DIRECTION_HORIZONTAL || pattern == MODE_DIRECTION_VERTICAL) pattern = 2;
|
||||
break;
|
||||
case AURA_MOUSEMAT_MODE_GLOWING_YOYO:
|
||||
pattern = modes[active_mode].direction;
|
||||
break;
|
||||
case AURA_MOUSEMAT_MODE_STARRY_NIGHT:
|
||||
pattern = 16 + (modes[active_mode].color_mode == MODE_COLORS_RANDOM);
|
||||
break;
|
||||
default:
|
||||
pattern = 255;
|
||||
break;
|
||||
}
|
||||
|
||||
controller->UpdateDevice(modes[active_mode].value, std::vector<RGBColor>(modes[active_mode].colors), modes[active_mode].speed, modes[active_mode].brightness, pattern);
|
||||
}
|
||||
}
|
||||
|
||||
void RGBController_AuraMousemat::DeviceSaveMode()
|
||||
{
|
||||
DeviceUpdateMode();
|
||||
controller->SaveMode();
|
||||
}
|
||||
@@ -0,0 +1,52 @@
|
||||
/*-----------------------------------------*\
|
||||
| RGBController_AsusAuraMousemat.h |
|
||||
| |
|
||||
| Generic RGB Interface for Asus Aura |
|
||||
| USB controller driver |
|
||||
| |
|
||||
| Mola19 06/04/2021 |
|
||||
\*-----------------------------------------*/
|
||||
|
||||
#pragma once
|
||||
#include "RGBController.h"
|
||||
#include "AsusAuraMousematController.h"
|
||||
|
||||
enum
|
||||
{
|
||||
AURA_MOUSEMAT_BRIGHTNESS_MIN = 0,
|
||||
AURA_MOUSEMAT_BRIGHTNESS_MAX = 4,
|
||||
AURA_MOUSEMAT_BRIGHTNESS_DEFAULT = 4,
|
||||
AURA_MOUSEMAT_SPEED_MIN = 127,
|
||||
AURA_MOUSEMAT_SPEED_MAX = 0,
|
||||
AURA_MOUSEMAT_SPEED_DEFAULT_STATIC = 0,
|
||||
AURA_MOUSEMAT_SPEED_DEFAULT_BREATHING = 1,
|
||||
AURA_MOUSEMAT_SPEED_DEFAULT_COLOR_CYCLE = 1,
|
||||
AURA_MOUSEMAT_SPEED_DEFAULT_WAVE = 14,
|
||||
AURA_MOUSEMAT_SPEED_DEFAULT_WAVE_PLANE = 2,
|
||||
AURA_MOUSEMAT_SPEED_DEFAULT_COMET = 2,
|
||||
AURA_MOUSEMAT_SPEED_DEFAULT_GLOWING_YOYO = 4,
|
||||
AURA_MOUSEMAT_SPEED_DEFAULT_CROSS = 12,
|
||||
AURA_MOUSEMAT_SPEED_DEFAULT_STARRY_NIGHT = 2,
|
||||
};
|
||||
|
||||
class RGBController_AuraMousemat : public RGBController
|
||||
{
|
||||
public:
|
||||
RGBController_AuraMousemat(AuraMousematController* controller_ptr);
|
||||
~RGBController_AuraMousemat();
|
||||
|
||||
void SetupZones();
|
||||
|
||||
void ResizeZone(int zone, int new_size);
|
||||
|
||||
void DeviceUpdateLEDs();
|
||||
void UpdateZoneLEDs(int zone);
|
||||
void UpdateSingleLED(int led);
|
||||
|
||||
void SetCustomMode();
|
||||
void DeviceUpdateMode();
|
||||
void DeviceSaveMode();
|
||||
|
||||
private:
|
||||
AuraMousematController* controller;
|
||||
};
|
||||
@@ -9,6 +9,16 @@
|
||||
|
||||
#include "RGBController_AsusAuraStrixEvolve.h"
|
||||
|
||||
/**------------------------------------------------------------------*\
|
||||
@name Asus Aura Strix Evolve
|
||||
@type USB
|
||||
@save :white_check_mark:
|
||||
@direct :white_check_mark:
|
||||
@effects :white_check_mark:
|
||||
@detectors DetectAsusAuraUSBStrixEvolve
|
||||
@comment
|
||||
\*-------------------------------------------------------------------*/
|
||||
|
||||
RGBController_AuraStrixEvolve::RGBController_AuraStrixEvolve(AuraStrixEvolveController* controller_ptr)
|
||||
{
|
||||
controller = controller_ptr;
|
||||
|
||||
@@ -11,17 +11,27 @@
|
||||
#include <vector>
|
||||
#include <cmath>
|
||||
|
||||
RGBController_AuraTUFKeyboard::RGBController_AuraTUFKeyboard(AuraTUFKeyboardController* aura_ptr)
|
||||
/**------------------------------------------------------------------*\
|
||||
@name Asus Aura TUF Keyboard
|
||||
@type USB
|
||||
@save :white_check_mark:
|
||||
@direct :white_check_mark:
|
||||
@effects :white_check_mark:
|
||||
@detectors DetectAsusAuraTUFUSBKeyboard
|
||||
@comment
|
||||
\*-------------------------------------------------------------------*/
|
||||
|
||||
RGBController_AuraTUFKeyboard::RGBController_AuraTUFKeyboard(AuraTUFKeyboardController* controller_ptr)
|
||||
{
|
||||
aura = aura_ptr;
|
||||
controller = controller_ptr;
|
||||
|
||||
name = "ASUS Aura Keyboard";
|
||||
vendor = "ASUS";
|
||||
type = DEVICE_TYPE_KEYBOARD;
|
||||
description = "ASUS Aura Keyboard Device";
|
||||
version = aura->GetVersion();
|
||||
location = aura->GetDeviceLocation();
|
||||
serial = aura->GetSerialString();
|
||||
version = controller->GetVersion();
|
||||
location = controller->GetDeviceLocation();
|
||||
serial = controller->GetSerialString();
|
||||
|
||||
mode Direct;
|
||||
Direct.name = "Direct";
|
||||
@@ -191,12 +201,12 @@ RGBController_AuraTUFKeyboard::RGBController_AuraTUFKeyboard(AuraTUFKeyboardCont
|
||||
|
||||
RGBController_AuraTUFKeyboard::~RGBController_AuraTUFKeyboard()
|
||||
{
|
||||
delete aura;
|
||||
delete controller;
|
||||
}
|
||||
|
||||
void RGBController_AuraTUFKeyboard::SetupZones()
|
||||
{
|
||||
int layout = aura->GetLayout();
|
||||
int layout = controller->GetLayout();
|
||||
|
||||
if(AsusTUFK7Layouts.find(layout % 100) == AsusTUFK7Layouts.end())
|
||||
{
|
||||
@@ -248,7 +258,7 @@ void RGBController_AuraTUFKeyboard::DeviceUpdateLEDs()
|
||||
|
||||
void RGBController_AuraTUFKeyboard::UpdateZoneLEDs(int /*zone*/)
|
||||
{
|
||||
aura->UpdateLeds(colors);
|
||||
controller->UpdateLeds(colors);
|
||||
}
|
||||
|
||||
void RGBController_AuraTUFKeyboard::UpdateSingleLED(int led)
|
||||
@@ -256,7 +266,8 @@ void RGBController_AuraTUFKeyboard::UpdateSingleLED(int led)
|
||||
unsigned char red = RGBGetRValue(colors[led]);
|
||||
unsigned char green = RGBGetGValue(colors[led]);
|
||||
unsigned char blue = RGBGetBValue(colors[led]);
|
||||
aura->UpdateSingleLed(led, red, green, blue);
|
||||
|
||||
controller->UpdateSingleLed(led, red, green, blue);
|
||||
}
|
||||
|
||||
void RGBController_AuraTUFKeyboard::SetCustomMode()
|
||||
@@ -271,7 +282,7 @@ void RGBController_AuraTUFKeyboard::DeviceUpdateMode()
|
||||
|
||||
if(modes[active_mode].value == AURA_KEYBOARD_MODE_DIRECT)
|
||||
{
|
||||
aura->UpdateLeds(colors);
|
||||
controller->UpdateLeds(colors);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -319,14 +330,14 @@ void RGBController_AuraTUFKeyboard::DeviceUpdateMode()
|
||||
|
||||
mode_colors = modes[active_mode].color_mode == MODE_COLORS_PER_LED ? std::vector<RGBColor>(colors) : std::vector<RGBColor>(modes[active_mode].colors);
|
||||
|
||||
aura->UpdateDevice(modes[active_mode].value, mode_colors, direction, color_mode, (15 - modes[active_mode].speed), modes[active_mode].brightness * 25);
|
||||
controller->UpdateDevice(modes[active_mode].value, mode_colors, direction, color_mode, (15 - modes[active_mode].speed), modes[active_mode].brightness * 25);
|
||||
}
|
||||
}
|
||||
|
||||
void RGBController_AuraTUFKeyboard::DeviceSaveMode()
|
||||
{
|
||||
aura->ClearResponses();
|
||||
controller->ClearResponses();
|
||||
DeviceUpdateMode();
|
||||
aura->AwaitResponse();
|
||||
aura->SaveMode();
|
||||
controller->AwaitResponse();
|
||||
controller->SaveMode();
|
||||
}
|
||||
|
||||
@@ -13,18 +13,18 @@
|
||||
|
||||
enum
|
||||
{
|
||||
AURA_KEYBOARD_SPEED_MIN = 0,
|
||||
AURA_KEYBOARD_SPEED_MAX = 15,
|
||||
AURA_KEYBOARD_SPEED_DEFAULT = 8,
|
||||
AURA_KEYBOARD_BRIGHTNESS_MIN = 0,
|
||||
AURA_KEYBOARD_BRIGHTNESS_MAX = 4,
|
||||
AURA_KEYBOARD_BRIGHTNESS_DEFAULT = 4
|
||||
AURA_KEYBOARD_SPEED_MIN = 0,
|
||||
AURA_KEYBOARD_SPEED_MAX = 15,
|
||||
AURA_KEYBOARD_SPEED_DEFAULT = 8,
|
||||
AURA_KEYBOARD_BRIGHTNESS_MIN = 0,
|
||||
AURA_KEYBOARD_BRIGHTNESS_MAX = 4,
|
||||
AURA_KEYBOARD_BRIGHTNESS_DEFAULT = 4
|
||||
};
|
||||
|
||||
class RGBController_AuraTUFKeyboard : public RGBController
|
||||
{
|
||||
public:
|
||||
RGBController_AuraTUFKeyboard(AuraTUFKeyboardController* aura_ptr);
|
||||
RGBController_AuraTUFKeyboard(AuraTUFKeyboardController* controller_ptr);
|
||||
~RGBController_AuraTUFKeyboard();
|
||||
|
||||
void SetupZones();
|
||||
@@ -40,5 +40,5 @@ public:
|
||||
void DeviceSaveMode();
|
||||
|
||||
private:
|
||||
AuraTUFKeyboardController* aura;
|
||||
AuraTUFKeyboardController* controller;
|
||||
};
|
||||
|
||||
@@ -1,264 +1,277 @@
|
||||
/*-----------------------------------------*\
|
||||
| RGBController_AsusAuraUSB.cpp |
|
||||
| |
|
||||
| Generic RGB Interface for Asus Aura |
|
||||
| USB controller driver |
|
||||
| |
|
||||
| Adam Honse (CalcProgrammer1) 1/18/2020 |
|
||||
\*-----------------------------------------*/
|
||||
|
||||
#include "RGBController_AsusAuraUSB.h"
|
||||
|
||||
RGBController_AuraUSB::RGBController_AuraUSB(AuraUSBController* aura_ptr) :
|
||||
initializedMode(false)
|
||||
{
|
||||
aura = aura_ptr;
|
||||
|
||||
name = "ASUS Aura USB";
|
||||
vendor = "ASUS";
|
||||
version = aura->GetDeviceName();
|
||||
type = DEVICE_TYPE_MOTHERBOARD;
|
||||
description = "ASUS Aura USB Device";
|
||||
location = aura->GetDeviceLocation();
|
||||
serial = aura->GetSerialString();
|
||||
|
||||
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;
|
||||
modes.push_back(Direct);
|
||||
|
||||
mode Off;
|
||||
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.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.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.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;
|
||||
modes.push_back(SpectrumCycle);
|
||||
|
||||
mode Rainbow;
|
||||
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.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.colors.resize(1);
|
||||
modes.push_back(Chase);
|
||||
|
||||
SetupZones();
|
||||
}
|
||||
|
||||
RGBController_AuraUSB::~RGBController_AuraUSB()
|
||||
{
|
||||
delete aura;
|
||||
}
|
||||
|
||||
void RGBController_AuraUSB::SetupZones()
|
||||
{
|
||||
/*-------------------------------------------------*\
|
||||
| Only set LED count on the first run |
|
||||
\*-------------------------------------------------*/
|
||||
bool first_run = false;
|
||||
|
||||
if(zones.size() == 0)
|
||||
{
|
||||
first_run = true;
|
||||
}
|
||||
|
||||
/*-------------------------------------------------*\
|
||||
| Clear any existing color/LED configuration |
|
||||
\*-------------------------------------------------*/
|
||||
leds.clear();
|
||||
colors.clear();
|
||||
zones.resize(aura->GetChannelCount());
|
||||
|
||||
/*-------------------------------------------------*\
|
||||
| Set zones and leds |
|
||||
\*-------------------------------------------------*/
|
||||
int addressableCounter = 1;
|
||||
for (unsigned int channel_idx = 0; channel_idx < zones.size(); channel_idx++)
|
||||
{
|
||||
AuraDeviceInfo device_info = aura->GetAuraDevices()[channel_idx];
|
||||
|
||||
zones[channel_idx].type = ZONE_TYPE_LINEAR;
|
||||
|
||||
if(device_info.device_type == AuraDeviceType::FIXED)
|
||||
{
|
||||
zones[channel_idx].name = "Aura Mainboard";
|
||||
zones[channel_idx].leds_min = device_info.num_leds;
|
||||
zones[channel_idx].leds_max = device_info.num_leds;
|
||||
zones[channel_idx].leds_count = device_info.num_leds;
|
||||
}
|
||||
else
|
||||
{
|
||||
zones[channel_idx].name = "Aura Addressable ";
|
||||
zones[channel_idx].name.append(std::to_string(addressableCounter));
|
||||
zones[channel_idx].leds_min = 0;
|
||||
zones[channel_idx].leds_max = AURA_ADDRESSABLE_MAX_LEDS;
|
||||
|
||||
addressableCounter++;
|
||||
|
||||
if(first_run)
|
||||
{
|
||||
zones[channel_idx].leds_count = 0;
|
||||
}
|
||||
}
|
||||
|
||||
unsigned int num_mainboard_leds = device_info.num_leds - device_info.num_headers;
|
||||
for (unsigned int led_ch_idx = 0; led_ch_idx < zones[channel_idx].leds_count; led_ch_idx++)
|
||||
{
|
||||
unsigned led_idx = led_ch_idx + 1;
|
||||
led new_led;
|
||||
|
||||
new_led.name = zones[channel_idx].name;
|
||||
if(device_info.device_type == AuraDeviceType::FIXED && led_ch_idx >= num_mainboard_leds)
|
||||
{
|
||||
new_led.name.append(", RGB Header ");
|
||||
led_idx -= num_mainboard_leds;
|
||||
}
|
||||
else
|
||||
{
|
||||
new_led.name.append(", LED ");
|
||||
}
|
||||
new_led.name.append(std::to_string(led_idx));
|
||||
|
||||
new_led.value = channel_idx;
|
||||
|
||||
leds.push_back(new_led);
|
||||
}
|
||||
|
||||
zones[channel_idx].matrix_map = NULL;
|
||||
}
|
||||
|
||||
SetupColors();
|
||||
}
|
||||
|
||||
void RGBController_AuraUSB::ResizeZone(int zone, int new_size)
|
||||
{
|
||||
if((size_t) zone >= zones.size())
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if(((unsigned int)new_size >= zones[zone].leds_min) && ((unsigned int)new_size <= zones[zone].leds_max))
|
||||
{
|
||||
zones[zone].leds_count = new_size;
|
||||
|
||||
SetupZones();
|
||||
}
|
||||
}
|
||||
|
||||
void RGBController_AuraUSB::DeviceUpdateLEDs()
|
||||
{
|
||||
if(!initializedMode)
|
||||
{
|
||||
DeviceUpdateMode();
|
||||
}
|
||||
for(std::size_t zone_idx = 0; zone_idx < zones.size(); zone_idx++)
|
||||
{
|
||||
aura->SetChannelLEDs(zone_idx, zones[zone_idx].colors, zones[zone_idx].leds_count);
|
||||
}
|
||||
}
|
||||
|
||||
void RGBController_AuraUSB::UpdateZoneLEDs(int zone)
|
||||
{
|
||||
if(!initializedMode)
|
||||
{
|
||||
DeviceUpdateMode();
|
||||
}
|
||||
aura->SetChannelLEDs(zone, zones[zone].colors, zones[zone].leds_count);
|
||||
}
|
||||
|
||||
void RGBController_AuraUSB::UpdateSingleLED(int led)
|
||||
{
|
||||
if(!initializedMode)
|
||||
{
|
||||
DeviceUpdateMode();
|
||||
}
|
||||
unsigned int channel = leds[led].value;
|
||||
|
||||
aura->SetChannelLEDs(channel, zones[channel].colors, zones[channel].leds_count);
|
||||
}
|
||||
|
||||
void RGBController_AuraUSB::SetCustomMode()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
void RGBController_AuraUSB::DeviceUpdateMode()
|
||||
{
|
||||
initializedMode = true;
|
||||
unsigned char red = 0;
|
||||
unsigned char grn = 0;
|
||||
unsigned char blu = 0;
|
||||
|
||||
if(modes[active_mode].color_mode == MODE_COLORS_MODE_SPECIFIC)
|
||||
{
|
||||
red = RGBGetRValue(modes[active_mode].colors[0]);
|
||||
grn = RGBGetGValue(modes[active_mode].colors[0]);
|
||||
blu = RGBGetBValue(modes[active_mode].colors[0]);
|
||||
}
|
||||
|
||||
for(unsigned int zone_idx = 0; zone_idx < zones.size(); zone_idx++)
|
||||
{
|
||||
if(zones[zone_idx].leds_count > 0)
|
||||
{
|
||||
aura->SetMode(zone_idx, modes[active_mode].value, red, grn, blu);
|
||||
}
|
||||
}
|
||||
}
|
||||
/*-----------------------------------------*\
|
||||
| RGBController_AsusAuraUSB.cpp |
|
||||
| |
|
||||
| Generic RGB Interface for Asus Aura |
|
||||
| USB controller driver |
|
||||
| |
|
||||
| Adam Honse (CalcProgrammer1) 1/18/2020 |
|
||||
\*-----------------------------------------*/
|
||||
|
||||
#include "RGBController_AsusAuraUSB.h"
|
||||
|
||||
/**------------------------------------------------------------------*\
|
||||
@name Asus Aura USB
|
||||
@type USB
|
||||
@save :x:
|
||||
@direct :white_check_mark:
|
||||
@effects :white_check_mark:
|
||||
@detectors DetectAsusAuraUSBTerminal,DetectAsusAuraUSBAddressable,DetectAsusAuraUSBMotherboards
|
||||
@comment The Asus AUra USB controller applies to most AMD and
|
||||
Intel mainboards from the x470 and z390 chipsets onwards.
|
||||
\*-------------------------------------------------------------------*/
|
||||
|
||||
RGBController_AuraUSB::RGBController_AuraUSB(AuraUSBController* controller_ptr) :
|
||||
initializedMode(false)
|
||||
{
|
||||
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();
|
||||
|
||||
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;
|
||||
modes.push_back(Direct);
|
||||
|
||||
mode Off;
|
||||
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.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.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.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;
|
||||
modes.push_back(SpectrumCycle);
|
||||
|
||||
mode Rainbow;
|
||||
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.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.colors.resize(1);
|
||||
modes.push_back(Chase);
|
||||
|
||||
SetupZones();
|
||||
}
|
||||
|
||||
RGBController_AuraUSB::~RGBController_AuraUSB()
|
||||
{
|
||||
delete controller;
|
||||
}
|
||||
|
||||
void RGBController_AuraUSB::SetupZones()
|
||||
{
|
||||
/*-------------------------------------------------*\
|
||||
| Only set LED count on the first run |
|
||||
\*-------------------------------------------------*/
|
||||
bool first_run = false;
|
||||
|
||||
if(zones.size() == 0)
|
||||
{
|
||||
first_run = true;
|
||||
}
|
||||
|
||||
/*-------------------------------------------------*\
|
||||
| Clear any existing color/LED configuration |
|
||||
\*-------------------------------------------------*/
|
||||
leds.clear();
|
||||
colors.clear();
|
||||
zones.resize(controller->GetChannelCount());
|
||||
|
||||
/*-------------------------------------------------*\
|
||||
| Set zones and leds |
|
||||
\*-------------------------------------------------*/
|
||||
int addressableCounter = 1;
|
||||
for (unsigned int channel_idx = 0; channel_idx < zones.size(); channel_idx++)
|
||||
{
|
||||
AuraDeviceInfo device_info = controller->GetAuraDevices()[channel_idx];
|
||||
|
||||
zones[channel_idx].type = ZONE_TYPE_LINEAR;
|
||||
|
||||
if(device_info.device_type == AuraDeviceType::FIXED)
|
||||
{
|
||||
zones[channel_idx].name = "Aura Mainboard";
|
||||
zones[channel_idx].leds_min = device_info.num_leds;
|
||||
zones[channel_idx].leds_max = device_info.num_leds;
|
||||
zones[channel_idx].leds_count = device_info.num_leds;
|
||||
}
|
||||
else
|
||||
{
|
||||
zones[channel_idx].name = "Aura Addressable ";
|
||||
zones[channel_idx].name.append(std::to_string(addressableCounter));
|
||||
zones[channel_idx].leds_min = 0;
|
||||
zones[channel_idx].leds_max = AURA_ADDRESSABLE_MAX_LEDS;
|
||||
|
||||
addressableCounter++;
|
||||
|
||||
if(first_run)
|
||||
{
|
||||
zones[channel_idx].leds_count = 0;
|
||||
}
|
||||
}
|
||||
|
||||
unsigned int num_mainboard_leds = device_info.num_leds - device_info.num_headers;
|
||||
for (unsigned int led_ch_idx = 0; led_ch_idx < zones[channel_idx].leds_count; led_ch_idx++)
|
||||
{
|
||||
unsigned led_idx = led_ch_idx + 1;
|
||||
led new_led;
|
||||
|
||||
new_led.name = zones[channel_idx].name;
|
||||
if(device_info.device_type == AuraDeviceType::FIXED && led_ch_idx >= num_mainboard_leds)
|
||||
{
|
||||
new_led.name.append(", RGB Header ");
|
||||
led_idx -= num_mainboard_leds;
|
||||
}
|
||||
else
|
||||
{
|
||||
new_led.name.append(", LED ");
|
||||
}
|
||||
new_led.name.append(std::to_string(led_idx));
|
||||
|
||||
new_led.value = channel_idx;
|
||||
|
||||
leds.push_back(new_led);
|
||||
}
|
||||
|
||||
zones[channel_idx].matrix_map = NULL;
|
||||
}
|
||||
|
||||
SetupColors();
|
||||
}
|
||||
|
||||
void RGBController_AuraUSB::ResizeZone(int zone, int new_size)
|
||||
{
|
||||
if((size_t) zone >= zones.size())
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if(((unsigned int)new_size >= zones[zone].leds_min) && ((unsigned int)new_size <= zones[zone].leds_max))
|
||||
{
|
||||
zones[zone].leds_count = new_size;
|
||||
|
||||
SetupZones();
|
||||
}
|
||||
}
|
||||
|
||||
void RGBController_AuraUSB::DeviceUpdateLEDs()
|
||||
{
|
||||
if(!initializedMode)
|
||||
{
|
||||
DeviceUpdateMode();
|
||||
}
|
||||
for(std::size_t zone_idx = 0; zone_idx < zones.size(); zone_idx++)
|
||||
{
|
||||
controller->SetChannelLEDs(zone_idx, zones[zone_idx].colors, zones[zone_idx].leds_count);
|
||||
}
|
||||
}
|
||||
|
||||
void RGBController_AuraUSB::UpdateZoneLEDs(int zone)
|
||||
{
|
||||
if(!initializedMode)
|
||||
{
|
||||
DeviceUpdateMode();
|
||||
}
|
||||
|
||||
controller->SetChannelLEDs(zone, zones[zone].colors, zones[zone].leds_count);
|
||||
}
|
||||
|
||||
void RGBController_AuraUSB::UpdateSingleLED(int led)
|
||||
{
|
||||
if(!initializedMode)
|
||||
{
|
||||
DeviceUpdateMode();
|
||||
}
|
||||
|
||||
unsigned int channel = leds[led].value;
|
||||
|
||||
controller->SetChannelLEDs(channel, zones[channel].colors, zones[channel].leds_count);
|
||||
}
|
||||
|
||||
void RGBController_AuraUSB::SetCustomMode()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
void RGBController_AuraUSB::DeviceUpdateMode()
|
||||
{
|
||||
initializedMode = true;
|
||||
unsigned char red = 0;
|
||||
unsigned char grn = 0;
|
||||
unsigned char blu = 0;
|
||||
|
||||
if(modes[active_mode].color_mode == MODE_COLORS_MODE_SPECIFIC)
|
||||
{
|
||||
red = RGBGetRValue(modes[active_mode].colors[0]);
|
||||
grn = RGBGetGValue(modes[active_mode].colors[0]);
|
||||
blu = RGBGetBValue(modes[active_mode].colors[0]);
|
||||
}
|
||||
|
||||
for(unsigned int zone_idx = 0; zone_idx < zones.size(); zone_idx++)
|
||||
{
|
||||
if(zones[zone_idx].leds_count > 0)
|
||||
{
|
||||
controller->SetMode(zone_idx, modes[active_mode].value, red, grn, blu);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,38 +1,38 @@
|
||||
/*-----------------------------------------*\
|
||||
| RGBController_AsusAuraUSB.h |
|
||||
| |
|
||||
| Generic RGB Interface for Asus Aura |
|
||||
| USB controller driver |
|
||||
| |
|
||||
| Adam Honse (CalcProgrammer1) 1/18/2020 |
|
||||
\*-----------------------------------------*/
|
||||
|
||||
#pragma once
|
||||
#include "RGBController.h"
|
||||
#include "AsusAuraUSBController.h"
|
||||
|
||||
#define AURA_ADDRESSABLE_MAX_LEDS 120
|
||||
|
||||
class RGBController_AuraUSB : public RGBController
|
||||
{
|
||||
public:
|
||||
RGBController_AuraUSB(AuraUSBController* aura_ptr);
|
||||
~RGBController_AuraUSB();
|
||||
|
||||
void SetupZones();
|
||||
|
||||
void ResizeZone(int zone, int new_size);
|
||||
|
||||
void DeviceUpdateLEDs();
|
||||
void UpdateZoneLEDs(int zone);
|
||||
void UpdateSingleLED(int led);
|
||||
|
||||
void SetCustomMode();
|
||||
void DeviceUpdateMode();
|
||||
|
||||
private:
|
||||
AuraUSBController* aura;
|
||||
std::vector<unsigned int> leds_channel;
|
||||
std::vector<unsigned int> zones_channel;
|
||||
bool initializedMode;
|
||||
};
|
||||
/*-----------------------------------------*\
|
||||
| RGBController_AsusAuraUSB.h |
|
||||
| |
|
||||
| Generic RGB Interface for Asus Aura |
|
||||
| USB controller driver |
|
||||
| |
|
||||
| Adam Honse (CalcProgrammer1) 1/18/2020 |
|
||||
\*-----------------------------------------*/
|
||||
|
||||
#pragma once
|
||||
#include "RGBController.h"
|
||||
#include "AsusAuraUSBController.h"
|
||||
|
||||
#define AURA_ADDRESSABLE_MAX_LEDS 120
|
||||
|
||||
class RGBController_AuraUSB : public RGBController
|
||||
{
|
||||
public:
|
||||
RGBController_AuraUSB(AuraUSBController* controller_ptr);
|
||||
~RGBController_AuraUSB();
|
||||
|
||||
void SetupZones();
|
||||
|
||||
void ResizeZone(int zone, int new_size);
|
||||
|
||||
void DeviceUpdateLEDs();
|
||||
void UpdateZoneLEDs(int zone);
|
||||
void UpdateSingleLED(int led);
|
||||
|
||||
void SetCustomMode();
|
||||
void DeviceUpdateMode();
|
||||
|
||||
private:
|
||||
AuraUSBController* controller;
|
||||
std::vector<unsigned int> leds_channel;
|
||||
std::vector<unsigned int> zones_channel;
|
||||
bool initializedMode;
|
||||
};
|
||||
|
||||
@@ -0,0 +1,231 @@
|
||||
/*-------------------------------------------------------------------*\
|
||||
| RGBController_ROGStrixLC_Controller.cpp |
|
||||
| |
|
||||
| Driver for the ASUS Aura Liquid Cooler (LC) series |
|
||||
| of lighting controllers |
|
||||
| |
|
||||
| Chris M (Dr_No) 17 Jan 2022 |
|
||||
| |
|
||||
\*-------------------------------------------------------------------*/
|
||||
|
||||
#include "RGBControllerKeyNames.h"
|
||||
#include "RGBController_ROGStrixLC_Controller.h"
|
||||
|
||||
/**------------------------------------------------------------------*\
|
||||
@name Asus ROG Strix Liquid Cooler
|
||||
@type USB
|
||||
@save :x:
|
||||
@direct :white_check_mark:
|
||||
@effects :white_check_mark:
|
||||
@detectors DetectAsusAuraUSBROGStrixLC
|
||||
@comment
|
||||
\*-------------------------------------------------------------------*/
|
||||
|
||||
RGBController_ROGStrixLC_Controller::RGBController_ROGStrixLC_Controller(ROGStrixLC_Controller *controller_ptr)
|
||||
{
|
||||
controller = controller_ptr;
|
||||
uint8_t speed = ROGSTRIXLC_CONTROLLER_SPEED_NORMAL;
|
||||
|
||||
name = "ROG Strix LC";
|
||||
vendor = "ASUS";
|
||||
type = DEVICE_TYPE_COOLER;
|
||||
description = "ASUS Liquid Cooler including 120mm, 140mm, 240mm, 280mm and 360mm radiators.";
|
||||
version = KEY_EN_UNUSED;
|
||||
serial = KEY_EN_UNUSED;
|
||||
location = controller->GetLocation();
|
||||
|
||||
mode Direct;
|
||||
Direct.name = "Direct";
|
||||
Direct.value = ROGSTRIXLC_CONTROLLER_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 = ROGSTRIXLC_CONTROLLER_MODE_STATIC;
|
||||
Static.flags = MODE_FLAG_HAS_MODE_SPECIFIC_COLOR;
|
||||
Static.colors_min = 1;
|
||||
Static.colors_max = 1;
|
||||
Static.colors.resize(Static.colors_max);
|
||||
Static.color_mode = MODE_COLORS_MODE_SPECIFIC;
|
||||
modes.push_back(Static);
|
||||
|
||||
mode Breathing;
|
||||
Breathing.name = "Breathing";
|
||||
Breathing.value = ROGSTRIXLC_CONTROLLER_MODE_BREATHING;
|
||||
Breathing.flags = MODE_FLAG_HAS_SPEED | MODE_FLAG_HAS_MODE_SPECIFIC_COLOR;
|
||||
Breathing.colors_min = 1;
|
||||
Breathing.colors_max = 1;
|
||||
Breathing.colors.resize(Breathing.colors_max);
|
||||
Breathing.brightness_min = ROGSTRIXLC_CONTROLLER_BRIGHTNESS_MIN;
|
||||
Breathing.brightness_max = ROGSTRIXLC_CONTROLLER_BRIGHTNESS_MAX;
|
||||
Breathing.brightness = ROGSTRIXLC_CONTROLLER_BRIGHTNESS_MAX;
|
||||
Breathing.speed_min = ROGSTRIXLC_CONTROLLER_SPEED_SLOWEST;
|
||||
Breathing.speed_max = ROGSTRIXLC_CONTROLLER_SPEED_FASTEST;
|
||||
Breathing.color_mode = MODE_COLORS_MODE_SPECIFIC;
|
||||
Breathing.speed = speed;
|
||||
modes.push_back(Breathing);
|
||||
|
||||
mode Flashing;
|
||||
Flashing.name = "Flashing";
|
||||
Flashing.value = ROGSTRIXLC_CONTROLLER_MODE_FLASHING;
|
||||
Flashing.flags = MODE_FLAG_HAS_SPEED | MODE_FLAG_HAS_MODE_SPECIFIC_COLOR;
|
||||
Flashing.colors_min = 1;
|
||||
Flashing.colors_max = 1;
|
||||
Flashing.colors.resize(Flashing.colors_max);
|
||||
Flashing.brightness_min = ROGSTRIXLC_CONTROLLER_BRIGHTNESS_MIN;
|
||||
Flashing.brightness_max = ROGSTRIXLC_CONTROLLER_BRIGHTNESS_MAX;
|
||||
Flashing.brightness = ROGSTRIXLC_CONTROLLER_BRIGHTNESS_MAX;
|
||||
Flashing.speed_min = ROGSTRIXLC_CONTROLLER_SPEED_SLOWEST;
|
||||
Flashing.speed_max = ROGSTRIXLC_CONTROLLER_SPEED_FASTEST;
|
||||
Flashing.color_mode = MODE_COLORS_MODE_SPECIFIC;
|
||||
Flashing.speed = speed;
|
||||
modes.push_back(Flashing);
|
||||
|
||||
mode Spectrum;
|
||||
Spectrum.name = "Spectrum";
|
||||
Spectrum.value = ROGSTRIXLC_CONTROLLER_MODE_SPECTRUM;
|
||||
Spectrum.flags = MODE_FLAG_HAS_SPEED;
|
||||
Spectrum.brightness_min = ROGSTRIXLC_CONTROLLER_BRIGHTNESS_MIN;
|
||||
Spectrum.brightness_max = ROGSTRIXLC_CONTROLLER_BRIGHTNESS_MAX;
|
||||
Spectrum.brightness = ROGSTRIXLC_CONTROLLER_BRIGHTNESS_MAX;
|
||||
Spectrum.speed_min = ROGSTRIXLC_CONTROLLER_SPEED_SLOWEST;
|
||||
Spectrum.speed_max = ROGSTRIXLC_CONTROLLER_SPEED_FASTEST;
|
||||
Spectrum.color_mode = MODE_COLORS_NONE;
|
||||
Spectrum.speed = speed;
|
||||
modes.push_back(Spectrum);
|
||||
|
||||
mode Rainbow;
|
||||
Rainbow.name = "Rainbow";
|
||||
Rainbow.value = ROGSTRIXLC_CONTROLLER_MODE_RAINBOW;
|
||||
Rainbow.flags = MODE_FLAG_HAS_SPEED | MODE_FLAG_HAS_DIRECTION_LR;
|
||||
Rainbow.brightness_min = ROGSTRIXLC_CONTROLLER_BRIGHTNESS_MIN;
|
||||
Rainbow.brightness_max = ROGSTRIXLC_CONTROLLER_BRIGHTNESS_MAX;
|
||||
Rainbow.brightness = ROGSTRIXLC_CONTROLLER_BRIGHTNESS_MAX;
|
||||
Rainbow.speed_min = ROGSTRIXLC_CONTROLLER_SPEED_SLOWEST;
|
||||
Rainbow.speed_max = ROGSTRIXLC_CONTROLLER_SPEED_FASTEST;
|
||||
Rainbow.color_mode = MODE_COLORS_NONE;
|
||||
Rainbow.speed = speed;
|
||||
modes.push_back(Rainbow);
|
||||
|
||||
mode FlashAndDash;
|
||||
FlashAndDash.name = "Flash and Dash";
|
||||
FlashAndDash.value = ROGSTRIXLC_CONTROLLER_MODE_FLASHANDDASH;
|
||||
FlashAndDash.flags = MODE_FLAG_HAS_SPEED | MODE_FLAG_HAS_DIRECTION_LR;
|
||||
FlashAndDash.brightness_min = ROGSTRIXLC_CONTROLLER_BRIGHTNESS_MIN;
|
||||
FlashAndDash.brightness_max = ROGSTRIXLC_CONTROLLER_BRIGHTNESS_MAX;
|
||||
FlashAndDash.brightness = ROGSTRIXLC_CONTROLLER_BRIGHTNESS_MAX;
|
||||
FlashAndDash.speed_min = ROGSTRIXLC_CONTROLLER_SPEED_SLOWEST;
|
||||
FlashAndDash.speed_max = ROGSTRIXLC_CONTROLLER_SPEED_FASTEST;
|
||||
FlashAndDash.color_mode = MODE_COLORS_NONE;
|
||||
FlashAndDash.speed = speed;
|
||||
modes.push_back(FlashAndDash);
|
||||
|
||||
SetupZones();
|
||||
}
|
||||
|
||||
RGBController_ROGStrixLC_Controller::~RGBController_ROGStrixLC_Controller()
|
||||
{
|
||||
delete controller;
|
||||
}
|
||||
|
||||
void RGBController_ROGStrixLC_Controller::SetupZones()
|
||||
{
|
||||
/*-------------------------------------------------*\
|
||||
| Set up zones |
|
||||
\*-------------------------------------------------*/
|
||||
LOG_DEBUG("[%s] - Get channel count: %i", name.c_str(), controller->GetChannelCount());
|
||||
|
||||
zones.resize(controller->GetChannelCount());
|
||||
|
||||
LOG_DEBUG("[%s] - Creating Zones and LEDs", name.c_str());
|
||||
for(std::size_t zone_idx = 0; zone_idx < zones.size(); zone_idx++)
|
||||
{
|
||||
AuraDeviceInfo device_info = controller->GetAuraDevices()[zone_idx];
|
||||
LOG_INFO("[%s] %s Zone %i - Header Count %i LED Count %i FX %02X Direct %02X", name.c_str(),
|
||||
((device_info.device_type == AuraDeviceType::FIXED) ? "Fixed" : "Addressable"),
|
||||
zone_idx, device_info.num_headers, device_info.num_leds, device_info.effect_channel, device_info.direct_channel);
|
||||
|
||||
zones[zone_idx].name = name + " Zone ";
|
||||
zones[zone_idx].name.append(std::to_string(zone_idx));
|
||||
zones[zone_idx].type = ZONE_TYPE_LINEAR;
|
||||
zones[zone_idx].leds_min = device_info.num_leds;
|
||||
zones[zone_idx].leds_max = device_info.num_leds;
|
||||
zones[zone_idx].leds_count = device_info.num_leds;
|
||||
|
||||
for(unsigned int lp_idx = 0; lp_idx < zones[zone_idx].leds_count; lp_idx++)
|
||||
{
|
||||
led new_led;
|
||||
|
||||
new_led.name = zones[zone_idx].name;
|
||||
new_led.name.append(" LED " + std::to_string(lp_idx));
|
||||
new_led.value = lp_idx;
|
||||
|
||||
leds.push_back(new_led);
|
||||
}
|
||||
}
|
||||
|
||||
LOG_DEBUG("[%s] - Device zones and LEDs set", name.c_str());
|
||||
SetupColors();
|
||||
}
|
||||
|
||||
void RGBController_ROGStrixLC_Controller::ResizeZone(int zone, int new_size)
|
||||
{
|
||||
/*---------------------------------------------------------*\
|
||||
| This device does not support resizing zones |
|
||||
\*---------------------------------------------------------*/
|
||||
}
|
||||
|
||||
void RGBController_ROGStrixLC_Controller::DeviceUpdateLEDs()
|
||||
{
|
||||
for(std::size_t zone_idx = 0; zone_idx < zones.size(); zone_idx++)
|
||||
{
|
||||
UpdateZoneLEDs(zone_idx);
|
||||
}
|
||||
}
|
||||
|
||||
void RGBController_ROGStrixLC_Controller::UpdateZoneLEDs(int zone)
|
||||
{
|
||||
controller->SetLedsDirect( zones[zone].colors, zones[zone].leds_count );
|
||||
}
|
||||
|
||||
void RGBController_ROGStrixLC_Controller::UpdateSingleLED(int led)
|
||||
{
|
||||
UpdateZoneLEDs(GetLED_Zone(led));
|
||||
}
|
||||
|
||||
void RGBController_ROGStrixLC_Controller::SetCustomMode()
|
||||
{
|
||||
for(std::size_t mode_idx = 0; mode_idx < modes.size() ; mode_idx++)
|
||||
{
|
||||
if (modes[mode_idx].value == ROGSTRIXLC_CONTROLLER_MODE_DIRECT)
|
||||
{
|
||||
active_mode = mode_idx;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void RGBController_ROGStrixLC_Controller::DeviceUpdateMode()
|
||||
{
|
||||
RGBColor colour = (modes[active_mode].color_mode == MODE_COLORS_MODE_SPECIFIC) ? modes[active_mode].colors[0] : 0;
|
||||
|
||||
controller->SetMode( modes[active_mode].value, modes[active_mode].speed, modes[active_mode].direction, colour );
|
||||
}
|
||||
|
||||
int RGBController_ROGStrixLC_Controller::GetLED_Zone(int led_idx)
|
||||
{
|
||||
for(size_t zone_idx = 0; zone_idx < zones.size(); zone_idx++)
|
||||
{
|
||||
int zone_start = zones[zone_idx].start_idx;
|
||||
int zone_end = zone_start + zones[zone_idx].leds_count - 1;
|
||||
|
||||
if( zone_start <= led_idx && zone_end >= led_idx)
|
||||
{
|
||||
return(zone_idx);
|
||||
}
|
||||
}
|
||||
|
||||
return -1;
|
||||
}
|
||||
@@ -0,0 +1,37 @@
|
||||
/*-------------------------------------------------------------------*\
|
||||
| RGBController_ROGStrixLC_Controller.h |
|
||||
| |
|
||||
| Driver for the ASUS Aura Liquid Cooler (LC) series |
|
||||
| of lighting controllers |
|
||||
| |
|
||||
| Chris M (Dr_No) 17 Jan 2022 |
|
||||
| |
|
||||
\*-------------------------------------------------------------------*/
|
||||
|
||||
#pragma once
|
||||
#include "LogManager.h"
|
||||
#include "RGBController.h"
|
||||
#include "ROGStrixLC_Controller.h"
|
||||
#include <vector>
|
||||
|
||||
class RGBController_ROGStrixLC_Controller : public RGBController
|
||||
{
|
||||
public:
|
||||
RGBController_ROGStrixLC_Controller(ROGStrixLC_Controller* controller_ptr);
|
||||
~RGBController_ROGStrixLC_Controller();
|
||||
|
||||
void SetupZones();
|
||||
void ResizeZone(int zone, int new_size);
|
||||
|
||||
void DeviceUpdateLEDs();
|
||||
void UpdateZoneLEDs(int zone);
|
||||
void UpdateSingleLED(int led);
|
||||
|
||||
void SetCustomMode();
|
||||
void DeviceUpdateMode();
|
||||
private:
|
||||
int GetDeviceMode();
|
||||
int GetLED_Zone(int led_idx);
|
||||
|
||||
ROGStrixLC_Controller* controller;
|
||||
};
|
||||
@@ -0,0 +1,130 @@
|
||||
/*-------------------------------------------------------------------*\
|
||||
| ROGStrixLC_Controller.cpp |
|
||||
| |
|
||||
| Driver for the ASUS Aura Liquid Cooler (LC) series |
|
||||
| of lighting controllers |
|
||||
| |
|
||||
| Chris M (Dr_No) 17 Jan 2022 |
|
||||
| |
|
||||
\*-------------------------------------------------------------------*/
|
||||
|
||||
#include "ROGStrixLC_Controller.h"
|
||||
|
||||
ROGStrixLC_Controller::ROGStrixLC_Controller(hid_device* dev_handle, const char* path) : AuraUSBController(dev_handle, path)
|
||||
{
|
||||
const int szTemp = HID_MAX_STR;
|
||||
wchar_t tmpName[szTemp];
|
||||
|
||||
/*-----------------------------------------------------*\
|
||||
| Add addressable devices |
|
||||
| Manually adding device info for now |
|
||||
| TODO: Implement config table accurately |
|
||||
| LC120 - 1F FF 05 05 04 00 00 00 |
|
||||
\*-----------------------------------------------------*/
|
||||
device_info.push_back({0x00, 0x00, 4, 0, AuraDeviceType::FIXED});
|
||||
}
|
||||
|
||||
ROGStrixLC_Controller::~ROGStrixLC_Controller()
|
||||
{
|
||||
hid_close(dev);
|
||||
}
|
||||
|
||||
std::string ROGStrixLC_Controller::GetLocation()
|
||||
{
|
||||
return("HID: " + location);
|
||||
}
|
||||
|
||||
void ROGStrixLC_Controller::SetMode(unsigned char channel, unsigned char mode, unsigned char red, unsigned char grn, unsigned char blu)
|
||||
{
|
||||
/*---------------------------------------------------------*\
|
||||
| This interface is not used in this controller however is |
|
||||
| required by the abstract class |
|
||||
\*---------------------------------------------------------*/
|
||||
}
|
||||
|
||||
void ROGStrixLC_Controller::SetMode(unsigned char mode, unsigned char speed, unsigned char direction, RGBColor colour)
|
||||
{
|
||||
bool needs_update = !( (current_mode == mode) && (ToRGBColor(current_red, current_green, current_blue) == colour) && (current_speed == speed) && (current_direction == direction));
|
||||
|
||||
if (needs_update)
|
||||
{
|
||||
current_mode = mode;
|
||||
current_speed = speed;
|
||||
current_direction = direction;
|
||||
current_red = RGBGetRValue(colour);
|
||||
current_green = RGBGetGValue(colour);
|
||||
current_blue = RGBGetBValue(colour);
|
||||
SendUpdate();
|
||||
}
|
||||
}
|
||||
|
||||
void ROGStrixLC_Controller::SetChannelLEDs(unsigned char channel, RGBColor * colors, unsigned int num_colors)
|
||||
{
|
||||
/*---------------------------------------------------------*\
|
||||
| This interface is not used in this controller however is |
|
||||
| required by the abstract class |
|
||||
\*---------------------------------------------------------*/
|
||||
}
|
||||
|
||||
void ROGStrixLC_Controller::SetLedsDirect(RGBColor * led_colours, uint8_t led_count)
|
||||
{
|
||||
uint8_t buffer[write_packet_size] = { 0xEC, 0x40, 0x00, 0xFF, led_count };
|
||||
|
||||
/*---------------------------------------------------------*\
|
||||
| Set the colour bytes in the packet |
|
||||
\*---------------------------------------------------------*/
|
||||
for(uint8_t index = 0; index < led_count; index++)
|
||||
{
|
||||
uint8_t offset = (index * 3) + ROGSTRIXLC_GREEN_BYTE;
|
||||
|
||||
buffer[offset + 0] = RGBGetRValue(led_colours[index]);
|
||||
buffer[offset + 1] = RGBGetGValue(led_colours[index]);
|
||||
buffer[offset + 2] = RGBGetBValue(led_colours[index]);
|
||||
}
|
||||
|
||||
/*---------------------------------------------------------*\
|
||||
| These 3 bytes might be timing bytes |
|
||||
\*---------------------------------------------------------*/
|
||||
uint8_t offset = led_count * 3 + ROGSTRIXLC_GREEN_BYTE;
|
||||
buffer[offset + 0] = 0x77;
|
||||
buffer[offset + 1] = 0x10;
|
||||
buffer[offset + 2] = 0xF3;
|
||||
|
||||
hid_write(dev, buffer, write_packet_size);
|
||||
}
|
||||
|
||||
void ROGStrixLC_Controller::GetStatus()
|
||||
{
|
||||
uint8_t buffer[write_packet_size] = { 0xEC, 0x01, 0x02 };
|
||||
|
||||
hid_write(dev, buffer, write_packet_size);
|
||||
hid_read_timeout(dev, buffer, read_packet_size, ROGSTRIXLC_CONTROLLER_TIMEOUT);
|
||||
|
||||
current_red = buffer[ROGSTRIXLC_RED_BYTE - 1];
|
||||
current_green = buffer[ROGSTRIXLC_GREEN_BYTE - 1];
|
||||
current_blue = buffer[ROGSTRIXLC_BLUE_BYTE - 1];
|
||||
}
|
||||
|
||||
void ROGStrixLC_Controller::SendUpdate()
|
||||
{
|
||||
uint8_t buffer[write_packet_size];
|
||||
|
||||
/*-----------------------------------------------------*\
|
||||
| Zero out buffer |
|
||||
\*-----------------------------------------------------*/
|
||||
memset(buffer, 0x00, write_packet_size);
|
||||
|
||||
buffer[ROGSTRIXLC_REPORTID_BYTE] = rogstrixlc_reportid;
|
||||
buffer[ROGSTRIXLC_COMMAND_BYTE] = rogstrixlc_modefx;
|
||||
buffer[ROGSTRIXLC_ZONE_BYTE] = 0;
|
||||
buffer[ROGSTRIXLC_MODE_BYTE] = current_mode;
|
||||
buffer[ROGSTRIXLC_RED_BYTE] = current_red;
|
||||
buffer[ROGSTRIXLC_GREEN_BYTE] = current_green;
|
||||
buffer[ROGSTRIXLC_BLUE_BYTE] = current_blue;
|
||||
|
||||
buffer[ROGSTRIXLC_DIRECTION_BYTE] = current_direction;
|
||||
buffer[ROGSTRIXLC_SPEED_BYTE] = current_speed;
|
||||
|
||||
hid_write(dev, buffer, write_packet_size);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,92 @@
|
||||
/*-------------------------------------------------------------------*\
|
||||
| ROGStrixLC_Controller.h |
|
||||
| |
|
||||
| Driver for the ASUS Aura Liquid Cooler (LC) series |
|
||||
| of lighting controllers |
|
||||
| |
|
||||
| Chris M (Dr_No) 17 Jan 2022 |
|
||||
| |
|
||||
\*-------------------------------------------------------------------*/
|
||||
|
||||
#include <string>
|
||||
#include <hidapi/hidapi.h>
|
||||
#include "RGBController.h"
|
||||
#include "AsusAuraUSBController.h"
|
||||
|
||||
#pragma once
|
||||
|
||||
#define ROGSTRIXLC_CONTROLLER_TIMEOUT 250
|
||||
#define HID_MAX_STR 255
|
||||
|
||||
#define ROGSTRIXLC_CONTROLLER_BRIGHTNESS_MIN 0
|
||||
#define ROGSTRIXLC_CONTROLLER_BRIGHTNESS_MAX 255
|
||||
|
||||
enum
|
||||
{
|
||||
ROGSTRIXLC_CONTROLLER_MODE_DIRECT = 0xFF, //Direct Led Control - Independently set LEDs in zone
|
||||
ROGSTRIXLC_CONTROLLER_MODE_STATIC = 0x01, //Static Mode - Set entire zone to a single color.
|
||||
ROGSTRIXLC_CONTROLLER_MODE_BREATHING = 0x02, //Breathing Mode - Fades between fully off and fully on.
|
||||
ROGSTRIXLC_CONTROLLER_MODE_FLASHING = 0x03, //Flashing Mode - Abruptly changing between fully off and fully on.
|
||||
ROGSTRIXLC_CONTROLLER_MODE_SPECTRUM = 0x04, //Spectrum Cycle Mode - Cycles through the color spectrum on all lights on the device
|
||||
ROGSTRIXLC_CONTROLLER_MODE_RAINBOW = 0x05, //Rainbow Wave Mode - Cycle thru the color spectrum as a wave across all LEDs
|
||||
ROGSTRIXLC_CONTROLLER_MODE_FLASHANDDASH = 0x0A, //Flash n Dash - Flash twice and then flash in direction
|
||||
};
|
||||
|
||||
enum AsusAuraStrixLC_PacketMap
|
||||
{
|
||||
ROGSTRIXLC_REPORTID_BYTE = 0,
|
||||
ROGSTRIXLC_COMMAND_BYTE = 1,
|
||||
ROGSTRIXLC_ZONE_BYTE = 2,
|
||||
ROGSTRIXLC_MODE_BYTE = 3,
|
||||
ROGSTRIXLC_RED_BYTE = 4,
|
||||
ROGSTRIXLC_GREEN_BYTE = 5,
|
||||
ROGSTRIXLC_BLUE_BYTE = 6,
|
||||
ROGSTRIXLC_DIRECTION_BYTE = 7,
|
||||
ROGSTRIXLC_SPEED_BYTE = 8,
|
||||
};
|
||||
|
||||
enum
|
||||
{
|
||||
ROGSTRIXLC_CONTROLLER_SPEED_SLOWEST = 0x04, // Slowest speed
|
||||
ROGSTRIXLC_CONTROLLER_SPEED_SLOW = 0x03, // Slower speed
|
||||
ROGSTRIXLC_CONTROLLER_SPEED_NORMAL = 0x02, // Normal speed
|
||||
ROGSTRIXLC_CONTROLLER_SPEED_FAST = 0x01, // Fast speed
|
||||
ROGSTRIXLC_CONTROLLER_SPEED_FASTEST = 0x00, // Fastest speed
|
||||
};
|
||||
|
||||
class ROGStrixLC_Controller : public AuraUSBController
|
||||
{
|
||||
public:
|
||||
ROGStrixLC_Controller(hid_device* dev_handle, const char* path);
|
||||
~ROGStrixLC_Controller();
|
||||
|
||||
std::string GetLocation();
|
||||
|
||||
void SetChannelLEDs(unsigned char channel, RGBColor *colors, unsigned int num_colors);
|
||||
void SetLedsDirect(RGBColor * led_colours, uint8_t led_count);
|
||||
|
||||
void SetMode(unsigned char channel, unsigned char mode, unsigned char red, unsigned char grn, unsigned char blu);
|
||||
void SetMode(unsigned char mode, unsigned char speed, unsigned char direction, RGBColor colour);
|
||||
private:
|
||||
static const uint8_t read_packet_size = 64;
|
||||
static const uint8_t write_packet_size = read_packet_size + 1;
|
||||
static const uint8_t rogstrixlc_modefx = 0x3B;
|
||||
static const uint8_t rogstrixlc_direct = 0x40;
|
||||
static const uint8_t rogstrixlc_reportid = 0xEC;
|
||||
|
||||
std::string location;
|
||||
|
||||
uint8_t zone_index;
|
||||
uint8_t current_mode;
|
||||
uint8_t current_speed;
|
||||
|
||||
uint8_t current_red;
|
||||
uint8_t current_green;
|
||||
uint8_t current_blue;
|
||||
uint8_t current_direction;
|
||||
|
||||
void GetStatus();
|
||||
void SendUpdate();
|
||||
void SendEffect(unsigned char channel, unsigned char mode, unsigned char red, unsigned char grn, unsigned char blu);
|
||||
void SendDirectApply(unsigned char channel);
|
||||
};
|
||||
@@ -10,6 +10,16 @@
|
||||
|
||||
using namespace std::chrono_literals;
|
||||
|
||||
/**------------------------------------------------------------------*\
|
||||
@name Asus TUF Laptop
|
||||
@type WMI
|
||||
@save :x:
|
||||
@direct :white_check_mark:
|
||||
@effects :white_check_mark:
|
||||
@detectors DetectAsusTUFLaptopWMIControllers
|
||||
@comment
|
||||
\*-------------------------------------------------------------------*/
|
||||
|
||||
RGBController_AsusTUFLaptopWMI::RGBController_AsusTUFLaptopWMI()
|
||||
{
|
||||
name = "ASUS TUF Keyboard";
|
||||
|
||||
@@ -8,6 +8,16 @@
|
||||
|
||||
#include "RGBController_BlinkyTape.h"
|
||||
|
||||
/**------------------------------------------------------------------*\
|
||||
@name Blinky Tape
|
||||
@type Serial
|
||||
@save :x:
|
||||
@direct :white_check_mark:
|
||||
@effects :x:
|
||||
@detectors DetectBlinkyTapeControllers
|
||||
@comment
|
||||
\*-------------------------------------------------------------------*/
|
||||
|
||||
RGBController_BlinkyTape::RGBController_BlinkyTape(BlinkyTapeController* controller_ptr)
|
||||
{
|
||||
controller = controller_ptr;
|
||||
|
||||
@@ -0,0 +1,331 @@
|
||||
/*-------------------------------------------------------------------*\
|
||||
| CMMMController.cpp |
|
||||
| |
|
||||
| Driver for Coolermaster MasterMouse |
|
||||
| |
|
||||
| Chris M (Dr_No) 14th Feb 2021 - MM711 Base |
|
||||
| Dracrius 12th Mar 2022 |
|
||||
| |
|
||||
\*-------------------------------------------------------------------*/
|
||||
|
||||
#include "CMMMController.h"
|
||||
#include <cstring>
|
||||
|
||||
CMMMController::CMMMController(hid_device* dev_handle, char *_path, uint16_t pid) : product_id(pid)
|
||||
{
|
||||
const int szTemp = HID_MAX_STR;
|
||||
wchar_t tmpName[szTemp];
|
||||
|
||||
dev = dev_handle;
|
||||
location = _path;
|
||||
current_speed = CM_MM_SPEED_3;
|
||||
|
||||
hid_get_manufacturer_string(dev, tmpName, szTemp);
|
||||
std::wstring wName = std::wstring(tmpName);
|
||||
vendor = std::string(wName.begin(), wName.end());
|
||||
|
||||
hid_get_indexed_string(dev, 2, tmpName, szTemp);
|
||||
wName = std::wstring(tmpName);
|
||||
serial = std::string(wName.begin(), wName.end());
|
||||
|
||||
if(product_id == CM_MM530_PID || product_id == CM_MM531_PID)
|
||||
{
|
||||
command_code = CM_MM5XX_COMMAND;
|
||||
if(pid == CM_MM530_PID)
|
||||
{
|
||||
buttons_bytes[0] = CM_MM_MODE_BYTE;
|
||||
buttons_bytes[1] = CM_MM_SPEED_BYTE;
|
||||
buttons_bytes[2] = CM_MM_NFI_1;
|
||||
wheel_bytes[0] = CM_MM_RED_BYTE;
|
||||
wheel_bytes[1] = CM_MM_GREEN_BYTE;
|
||||
wheel_bytes[2] = CM_MM_BLUE_BYTE;
|
||||
}
|
||||
else if(product_id == CM_MM531_PID) //Still Need Captures for Proper Mapping From a MM531 User
|
||||
{
|
||||
buttons_bytes[0] = CM_MM_MODE_BYTE;
|
||||
buttons_bytes[1] = CM_MM_SPEED_BYTE;
|
||||
buttons_bytes[2] = CM_MM_NFI_1;
|
||||
wheel_bytes[0] = CM_MM_RED_BYTE;
|
||||
wheel_bytes[1] = CM_MM_GREEN_BYTE;
|
||||
wheel_bytes[2] = CM_MM_BLUE_BYTE;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
command_code = CM_MM7XX_COMMAND;
|
||||
|
||||
buttons_bytes[0] = CM_MM_RED_BYTE;
|
||||
buttons_bytes[1] = CM_MM_GREEN_BYTE;
|
||||
buttons_bytes[2] = CM_MM_BLUE_BYTE;
|
||||
wheel_bytes[0] = CM_MM_MODE_BYTE;
|
||||
wheel_bytes[1] = CM_MM_SPEED_BYTE;
|
||||
wheel_bytes[2] = CM_MM_NFI_1;
|
||||
}
|
||||
|
||||
logo_bytes[0] = CM_MM_NFI_2;
|
||||
logo_bytes[1] = CM_MM_NFI_3;
|
||||
logo_bytes[2] = CM_MM_BRIGHTNESS_BYTE;
|
||||
|
||||
SendInitPacket();
|
||||
GetColourStatus();
|
||||
GetCustomStatus();
|
||||
GetModeStatus();
|
||||
}
|
||||
|
||||
CMMMController::~CMMMController()
|
||||
{
|
||||
hid_close(dev);
|
||||
}
|
||||
|
||||
void CMMMController::GetColourStatus()
|
||||
{
|
||||
uint8_t buffer[CM_MM_PACKET_SIZE] = { 0x00, 0x52, command_code };
|
||||
|
||||
hid_write(dev, buffer, CM_MM_PACKET_SIZE);
|
||||
hid_read_timeout(dev, buffer, CM_MM_PACKET_SIZE, CM_MM_INTERRUPT_TIMEOUT);
|
||||
|
||||
current_brightness = buffer[CM_MM_BRIGHTNESS_BYTE - 1];
|
||||
current_red = buffer[CM_MM_RED_BYTE - 1];
|
||||
current_green = buffer[CM_MM_GREEN_BYTE - 1];
|
||||
current_blue = buffer[CM_MM_BLUE_BYTE - 1];
|
||||
}
|
||||
|
||||
void CMMMController::GetCustomStatus()
|
||||
{
|
||||
uint8_t buffer[CM_MM_PACKET_SIZE] = { 0x00, 0x52, 0xA8 };
|
||||
int read_size = CM_MM_PACKET_SIZE - 1;
|
||||
int result = 0;
|
||||
|
||||
hid_write(dev, buffer, CM_MM_PACKET_SIZE);
|
||||
do
|
||||
{
|
||||
result = hid_read_timeout(dev, buffer, read_size, CM_MM_INTERRUPT_TIMEOUT);
|
||||
}while(buffer[1] != 0xA8 && result == read_size);
|
||||
|
||||
if(result == read_size)
|
||||
{
|
||||
buttons_colour = ToRGBColor(buffer[4], buffer[5], buffer[6]);
|
||||
logo_colour = ToRGBColor(buffer[7], buffer[8], buffer[9]);
|
||||
wheel_colour = ToRGBColor(buffer[10], buffer[11], buffer[12]);
|
||||
}
|
||||
}
|
||||
|
||||
void CMMMController::GetModeStatus()
|
||||
{
|
||||
uint8_t buffer[CM_MM_PACKET_SIZE] = { 0x00, 0x52, 0x28 };
|
||||
int buffer_size = (sizeof(buffer) / sizeof(buffer[0]));
|
||||
|
||||
hid_write(dev, buffer, buffer_size);
|
||||
hid_read_timeout(dev, buffer, buffer_size, CM_MM_INTERRUPT_TIMEOUT);
|
||||
|
||||
current_mode = buffer[CM_MM_MODE_BYTE - 1];
|
||||
}
|
||||
|
||||
std::string CMMMController::GetDeviceVendor()
|
||||
{
|
||||
return vendor;
|
||||
}
|
||||
|
||||
std::string CMMMController::GetSerial()
|
||||
{
|
||||
return serial;
|
||||
}
|
||||
|
||||
std::string CMMMController::GetLocation()
|
||||
{
|
||||
return("HID: " + location);
|
||||
}
|
||||
|
||||
uint16_t CMMMController::GetProductID()
|
||||
{
|
||||
return product_id;
|
||||
}
|
||||
|
||||
unsigned char CMMMController::GetMode()
|
||||
{
|
||||
return current_mode;
|
||||
}
|
||||
|
||||
unsigned char CMMMController::GetLedRed()
|
||||
{
|
||||
return current_red;
|
||||
}
|
||||
|
||||
unsigned char CMMMController::GetLedGreen()
|
||||
{
|
||||
return current_green;
|
||||
}
|
||||
|
||||
unsigned char CMMMController::GetLedBlue()
|
||||
{
|
||||
return current_blue;
|
||||
}
|
||||
|
||||
unsigned char CMMMController::GetLedSpeed()
|
||||
{
|
||||
return current_speed;
|
||||
}
|
||||
|
||||
RGBColor CMMMController::GetWheelColour()
|
||||
{
|
||||
return wheel_colour;
|
||||
}
|
||||
|
||||
RGBColor CMMMController::GetButtonsColour()
|
||||
{
|
||||
return buttons_colour;
|
||||
}
|
||||
|
||||
RGBColor CMMMController::GetLogoColour()
|
||||
{
|
||||
return logo_colour;
|
||||
}
|
||||
|
||||
void CMMMController::SetLedsDirect(RGBColor wheel_colour, RGBColor buttons_colour, RGBColor logo_colour)
|
||||
{
|
||||
unsigned char buffer[CM_MM_PACKET_SIZE] = { 0x00, 0x51, 0xA8, 0x00, 0x00 };
|
||||
|
||||
buffer[buttons_bytes[0]] = RGBGetRValue(buttons_colour);
|
||||
buffer[buttons_bytes[1]] = RGBGetGValue(buttons_colour);
|
||||
buffer[buttons_bytes[2]] = RGBGetBValue(buttons_colour);
|
||||
buffer[logo_bytes[0]] = RGBGetRValue(logo_colour);
|
||||
buffer[logo_bytes[1]] = RGBGetGValue(logo_colour);
|
||||
buffer[logo_bytes[2]] = RGBGetBValue(logo_colour);
|
||||
buffer[wheel_bytes[0]] = RGBGetRValue(wheel_colour);
|
||||
buffer[wheel_bytes[1]] = RGBGetGValue(wheel_colour);
|
||||
buffer[wheel_bytes[2]] = RGBGetBValue(wheel_colour);
|
||||
|
||||
hid_write(dev, buffer, CM_MM_PACKET_SIZE);
|
||||
hid_read_timeout(dev, buffer, CM_MM_PACKET_SIZE, CM_MM_INTERRUPT_TIMEOUT);
|
||||
}
|
||||
|
||||
void CMMMController::SendUpdate(uint8_t mode, uint8_t speed, RGBColor colour, uint8_t brightness)
|
||||
{
|
||||
if (mode == CM_MM_MODE_CUSTOM || mode == CM_MM_MODE_MULTILAYER)
|
||||
{
|
||||
SendUsingZonesPacket(mode);
|
||||
}
|
||||
else
|
||||
{
|
||||
SendInitPacket();
|
||||
SendApplyPacket(mode);
|
||||
}
|
||||
|
||||
uint8_t nfi_1 = 0x20;
|
||||
|
||||
if (mode == CM_MM_MODE_STATIC || mode == CM_MM_MODE_SPECTRUM_CYCLE)
|
||||
{
|
||||
nfi_1 = 0x00;
|
||||
}
|
||||
|
||||
if (mode != CM_MM_MODE_OFF)
|
||||
{
|
||||
unsigned char buffer[CM_MM_PACKET_SIZE] = { 0x00, 0x51, command_code, 0x00, 0x00 };
|
||||
|
||||
buffer[CM_MM_MODE_BYTE] = mode;
|
||||
buffer[CM_MM_SPEED_BYTE] = speed;
|
||||
buffer[CM_MM_NFI_1] = nfi_1;
|
||||
buffer[CM_MM_NFI_2] = 0xFF;
|
||||
buffer[CM_MM_NFI_3] = 0xFF;
|
||||
buffer[CM_MM_BRIGHTNESS_BYTE] = brightness;
|
||||
buffer[CM_MM_RED_BYTE] = RGBGetRValue(colour);
|
||||
buffer[CM_MM_GREEN_BYTE] = RGBGetGValue(colour);
|
||||
buffer[CM_MM_BLUE_BYTE] = RGBGetBValue(colour);
|
||||
buffer[CM_MM_SKY_RED_BYTE] = 0x00;
|
||||
buffer[CM_MM_SKY_GREEN_BYTE] = 0x00;
|
||||
buffer[CM_MM_SKY_BLUE_BYTE] = 0x00;
|
||||
|
||||
for (int i = 17; i < CM_MM_PACKET_SIZE; i++)
|
||||
{
|
||||
buffer[i] = 0xFF;
|
||||
}
|
||||
|
||||
hid_write(dev, buffer, CM_MM_PACKET_SIZE);
|
||||
hid_read_timeout(dev, buffer, CM_MM_PACKET_SIZE, CM_MM_INTERRUPT_TIMEOUT);
|
||||
|
||||
}
|
||||
|
||||
if (mode == CM_MM_MODE_CUSTOM || mode == CM_MM_MODE_MULTILAYER)
|
||||
{
|
||||
SendApplyPacket(mode); //Post Apply for Zoned Modes
|
||||
}
|
||||
}
|
||||
|
||||
void CMMMController::SendUpdate(uint8_t mode, uint8_t speed, RGBColor mode_one, RGBColor mode_two, uint8_t brightness)
|
||||
{
|
||||
SendApplyPacket(mode);
|
||||
|
||||
unsigned char buffer[CM_MM_PACKET_SIZE] = { 0x00, 0x51, command_code, 0x00, 0x00 };
|
||||
|
||||
buffer[CM_MM_MODE_BYTE] = mode;
|
||||
buffer[CM_MM_SPEED_BYTE] = speed;
|
||||
buffer[CM_MM_NFI_1] = 0x00;
|
||||
buffer[CM_MM_NFI_2] = 0x21;
|
||||
buffer[CM_MM_NFI_3] = 0xFF;
|
||||
buffer[CM_MM_BRIGHTNESS_BYTE] = brightness;
|
||||
buffer[CM_MM_RED_BYTE] = RGBGetRValue(mode_one);
|
||||
buffer[CM_MM_GREEN_BYTE] = RGBGetGValue(mode_one);
|
||||
buffer[CM_MM_BLUE_BYTE] = RGBGetBValue(mode_one);
|
||||
buffer[CM_MM_SKY_RED_BYTE] = RGBGetRValue(mode_two);
|
||||
buffer[CM_MM_SKY_GREEN_BYTE] = RGBGetGValue(mode_two);
|
||||
buffer[CM_MM_SKY_BLUE_BYTE] = RGBGetBValue(mode_two);
|
||||
|
||||
for (int i = 17; i < CM_MM_PACKET_SIZE; i++)
|
||||
{
|
||||
buffer[i] = 0xFF;
|
||||
}
|
||||
|
||||
hid_write(dev, buffer, CM_MM_PACKET_SIZE);
|
||||
hid_read_timeout(dev, buffer, CM_MM_PACKET_SIZE, CM_MM_INTERRUPT_TIMEOUT);
|
||||
}
|
||||
|
||||
void CMMMController::SendInitPacket()
|
||||
{
|
||||
unsigned char buffer[CM_MM_PACKET_SIZE] = { 0x00, 0x41, 0x80 };
|
||||
|
||||
hid_write(dev, buffer, CM_MM_PACKET_SIZE);
|
||||
hid_read_timeout(dev, buffer, CM_MM_PACKET_SIZE, CM_MM_INTERRUPT_TIMEOUT);
|
||||
}
|
||||
|
||||
void CMMMController::SendUsingZonesPacket(uint8_t mode)
|
||||
{
|
||||
unsigned char buffer[CM_MM_PACKET_SIZE] = { 0x00, 0x51, 0x30, 0x00, 0x00 };
|
||||
|
||||
if (mode == CM_MM_MODE_MULTILAYER)
|
||||
{
|
||||
buffer[CM_MM_MODE_BYTE] = 0x01;
|
||||
}
|
||||
|
||||
hid_write(dev, buffer, CM_MM_PACKET_SIZE);
|
||||
hid_read_timeout(dev, buffer, CM_MM_PACKET_SIZE, CM_MM_INTERRUPT_TIMEOUT);
|
||||
}
|
||||
|
||||
void CMMMController::SendApplyPacket(uint8_t mode)
|
||||
{
|
||||
unsigned char buffer[CM_MM_PACKET_SIZE] = { 0x00, 0x51, 0x28, 0x00, 0x00 };
|
||||
|
||||
buffer[CM_MM_MODE_BYTE] = mode;
|
||||
|
||||
hid_write(dev, buffer, CM_MM_PACKET_SIZE);
|
||||
hid_read_timeout(dev, buffer, CM_MM_PACKET_SIZE, CM_MM_INTERRUPT_TIMEOUT);
|
||||
}
|
||||
|
||||
void CMMMController::SendMultilayerPacket(uint8_t zones[3])
|
||||
{
|
||||
unsigned char buffer[CM_MM_PACKET_SIZE] = { 0x00, 0x51, 0xA0, 0x01, 0x00, 0x00, 0x01, 0x00, 0x00 };
|
||||
|
||||
buffer[CM_MM_NFI_3] = zones[0];
|
||||
buffer[CM_MM_BRIGHTNESS_BYTE] = zones[1];
|
||||
buffer[CM_MM_RED_BYTE] = zones[2];
|
||||
|
||||
hid_write(dev, buffer, CM_MM_PACKET_SIZE);
|
||||
hid_read_timeout(dev, buffer, CM_MM_PACKET_SIZE, CM_MM_INTERRUPT_TIMEOUT);
|
||||
}
|
||||
|
||||
void CMMMController::SendSavePacket()
|
||||
{
|
||||
unsigned char buffer[CM_MM_PACKET_SIZE] = { 0x00, 0x50, 0x55 };
|
||||
|
||||
hid_write(dev, buffer, CM_MM_PACKET_SIZE);
|
||||
hid_read_timeout(dev, buffer, CM_MM_PACKET_SIZE, CM_MM_INTERRUPT_TIMEOUT);
|
||||
}
|
||||
@@ -0,0 +1,147 @@
|
||||
/*-------------------------------------------------------------------*\
|
||||
| CMMMController.h |
|
||||
| |
|
||||
| Driver for Coolermaster MasterMouse |
|
||||
| |
|
||||
| Chris M (Dr_No) 14th Feb 2021 - MM711 Base |
|
||||
| Dracrius 12th Mar 2022 |
|
||||
| |
|
||||
\*-------------------------------------------------------------------*/
|
||||
|
||||
#include <string>
|
||||
#include <array>
|
||||
#include <hidapi/hidapi.h>
|
||||
#include "RGBController.h"
|
||||
|
||||
#pragma once
|
||||
|
||||
#define CM_MM_PACKET_SIZE 65
|
||||
#define CM_MM_COLOUR_MODE_DATA_SIZE (sizeof(colour_mode_data[0]) / sizeof(colour_mode_data[0][0]))
|
||||
#define CM_MM_HEADER_DATA_SIZE (sizeof(argb_header_data) / sizeof(argb_headers) )
|
||||
#define CM_MM_INTERRUPT_TIMEOUT 250
|
||||
#define CM_MM_DEVICE_NAME_SIZE (sizeof(device_name) / sizeof(device_name[ 0 ]))
|
||||
#define HID_MAX_STR 255
|
||||
|
||||
enum
|
||||
{
|
||||
CM_MM530_PID = 0x0065,
|
||||
CM_MM531_PID = 0x0097,
|
||||
CM_MM711_PID = 0x0101,
|
||||
CM_MM720_PID = 0x0141,
|
||||
};
|
||||
|
||||
enum
|
||||
{
|
||||
CM_MM_REPORT_BYTE = 1,
|
||||
CM_MM_COMMAND_BYTE = 2,
|
||||
CM_MM_FUNCTION_BYTE = 3,
|
||||
CM_MM_ZONE_BYTE = 4,
|
||||
CM_MM_MODE_BYTE = 5,
|
||||
CM_MM_SPEED_BYTE = 6,
|
||||
CM_MM_NFI_1 = 7,
|
||||
CM_MM_NFI_2 = 8,
|
||||
CM_MM_NFI_3 = 9,
|
||||
CM_MM_BRIGHTNESS_BYTE = 10,
|
||||
CM_MM_RED_BYTE = 11,
|
||||
CM_MM_GREEN_BYTE = 12,
|
||||
CM_MM_BLUE_BYTE = 13,
|
||||
CM_MM_SKY_RED_BYTE = 14,
|
||||
CM_MM_SKY_GREEN_BYTE = 15,
|
||||
CM_MM_SKY_BLUE_BYTE = 16
|
||||
};
|
||||
|
||||
enum
|
||||
{
|
||||
CM_MM5XX_COMMAND = 0x2C,
|
||||
CM_MM7XX_COMMAND = 0x2B
|
||||
};
|
||||
|
||||
enum
|
||||
{
|
||||
CM_MM_CUSTOM_APPLY = 0x30, //Also Used for Multilayer Mode
|
||||
CM_MM_APPLY = 0x28 //Sent Before Update, Unless using a Zoned Mode then UsingZones Before and Apply After
|
||||
};
|
||||
|
||||
enum
|
||||
{
|
||||
CM_MM_MODE_STATIC = 0, //Static Mode
|
||||
CM_MM_MODE_BREATHING = 1, //Breathing Mode
|
||||
CM_MM_MODE_SPECTRUM_CYCLE = 2, //Spectrum Cycle Mode
|
||||
CM_MM_MODE_STARS = 3, //Stars Mode
|
||||
CM_MM_MODE_INDICATOR = 4, //Indicator Mode
|
||||
CM_MM_MODE_CUSTOM = 176, //Custom LED Control
|
||||
CM_MM_MODE_MULTILAYER = 224, //Multilayer Mode, i.e. Effect per Zone.
|
||||
CM_MM_MODE_OFF = 254 //Turn Off
|
||||
};
|
||||
|
||||
enum
|
||||
{
|
||||
CM_MM_SPEED_1 = 0x3C, // Slowest speed
|
||||
CM_MM_SPEED_2 = 0x37,
|
||||
CM_MM_SPEED_3 = 0x31, // Normal speed
|
||||
CM_MM_SPEED_4 = 0x2C,
|
||||
CM_MM_SPEED_5 = 0x26 // Fastest speed
|
||||
};
|
||||
|
||||
class CMMMController
|
||||
{
|
||||
public:
|
||||
CMMMController(hid_device* dev_handle, char *_path, uint16_t pid);
|
||||
~CMMMController();
|
||||
|
||||
std::string GetDeviceVendor();
|
||||
std::string GetSerial();
|
||||
std::string GetLocation();
|
||||
|
||||
uint16_t GetProductID();
|
||||
|
||||
uint8_t GetZoneIndex();
|
||||
uint8_t GetMode();
|
||||
uint8_t GetLedRed();
|
||||
uint8_t GetLedGreen();
|
||||
uint8_t GetLedBlue();
|
||||
uint8_t GetLedSpeed();
|
||||
RGBColor GetWheelColour();
|
||||
RGBColor GetButtonsColour();
|
||||
RGBColor GetLogoColour();
|
||||
|
||||
void SendUpdate(uint8_t mode, uint8_t speed, RGBColor colour, uint8_t brightness);
|
||||
void SendUpdate(uint8_t mode, uint8_t speed, RGBColor mode_one, RGBColor mode_two, uint8_t brightness);
|
||||
void SetLedsDirect(RGBColor wheel_colour, RGBColor buttons_colour, RGBColor logo_colour);
|
||||
void SendSavePacket();
|
||||
private:
|
||||
std::string name;
|
||||
std::string vendor;
|
||||
std::string serial;
|
||||
std::string location;
|
||||
hid_device* dev;
|
||||
|
||||
uint16_t product_id;
|
||||
|
||||
uint8_t command_code;
|
||||
|
||||
uint8_t current_mode;
|
||||
uint8_t current_speed;
|
||||
|
||||
uint8_t current_brightness;
|
||||
uint8_t current_red;
|
||||
uint8_t current_green;
|
||||
uint8_t current_blue;
|
||||
|
||||
uint8_t buttons_bytes[3];
|
||||
uint8_t logo_bytes[3];
|
||||
uint8_t wheel_bytes[3];
|
||||
|
||||
RGBColor buttons_colour;
|
||||
RGBColor logo_colour;
|
||||
RGBColor wheel_colour;
|
||||
|
||||
|
||||
void GetColourStatus();
|
||||
void GetCustomStatus();
|
||||
void GetModeStatus();
|
||||
void SendInitPacket();
|
||||
void SendUsingZonesPacket(uint8_t mode);
|
||||
void SendApplyPacket(uint8_t mode);
|
||||
void SendMultilayerPacket(uint8_t zones[3]);
|
||||
};
|
||||
@@ -7,6 +7,7 @@
|
||||
#include "CMR6000Controller.h"
|
||||
#include "CMMKController.h"
|
||||
#include "RGBController.h"
|
||||
#include "RGBController_CMMMController.h"
|
||||
#include "RGBController_CMMM711Controller.h"
|
||||
#include "RGBController_CMMP750Controller.h"
|
||||
#include "RGBController_CMARGBController.h"
|
||||
@@ -18,6 +19,8 @@
|
||||
|
||||
#define COOLERMASTER_VID 0x2516
|
||||
|
||||
#define COOLERMASTER_MM530_PID 0x0065
|
||||
#define COOLERMASTER_MM531_PID 0x0097
|
||||
#define COOLERMASTER_MM711_PID 0x0101
|
||||
#define COOLERMASTER_MM720_PID 0x0141
|
||||
#define COOLERMASTER_MP750_XL_PID 0x0109
|
||||
@@ -27,12 +30,12 @@
|
||||
#define COOLERMASTER_SMALL_ARGB_PID 0x1000
|
||||
#define COOLERMASTER_RGB_PID 0x004F
|
||||
#define COOLERMASTER_RADEON_6000_PID 0x014D
|
||||
#define COOLERMASTER_MASTERKEYS_PRO_L_PID CMMK_USB_MASTERKEYS_PRO_L
|
||||
#define COOLERMASTER_MASTERKEYS_PRO_L_WHITE_PID CMMK_USB_MASTERKEYS_PRO_L_WHITE
|
||||
#define COOLERMASTER_MASTERKEYS_PRO_S_PID CMMK_USB_MASTERKEYS_PRO_S
|
||||
#define COOLERMASTER_MASTERKEYS_MK750_PID CMMK_USB_MASTERKEYS_MK750
|
||||
#define COOLERMASTER_MASTERKEYS_SK630_PID CMMK_USB_MASTERKEYS_SK630
|
||||
#define COOLERMASTER_MASTERKEYS_SK650_PID CMMK_USB_MASTERKEYS_SK650
|
||||
#define COOLERMASTER_MASTERKEYS_PRO_L_PID 0x003B
|
||||
#define COOLERMASTER_MASTERKEYS_PRO_L_WHITE_PID 0x0047
|
||||
#define COOLERMASTER_MASTERKEYS_PRO_S_PID 0x003C
|
||||
#define COOLERMASTER_MASTERKEYS_MK750_PID 0x0067
|
||||
#define COOLERMASTER_MASTERKEYS_SK630_PID 0x0089
|
||||
#define COOLERMASTER_MASTERKEYS_SK650_PID 0x008D
|
||||
|
||||
/******************************************************************************************\
|
||||
* *
|
||||
@@ -45,6 +48,7 @@
|
||||
void DetectCoolerMasterARGB(hid_device_info* info, const std::string&)
|
||||
{
|
||||
hid_device* dev = hid_open_path(info->path);
|
||||
|
||||
if(dev)
|
||||
{
|
||||
/*-------------------------------------------------*\
|
||||
@@ -55,7 +59,7 @@ void DetectCoolerMasterARGB(hid_device_info* info, const std::string&)
|
||||
|
||||
for(std::size_t i = 0; i < CM_ARGB_HEADER_DATA_SIZE; i++)
|
||||
{
|
||||
CMARGBController* controller = new CMARGBController(dev, info->path, i, cm_mutex);
|
||||
CMARGBController* controller = new CMARGBController(dev, info->path, i, cm_mutex);
|
||||
RGBController_CMARGBController* rgb_controller = new RGBController_CMARGBController(controller);
|
||||
// Constructor sets the name
|
||||
ResourceManager::get()->RegisterRGBController(rgb_controller);
|
||||
@@ -66,9 +70,10 @@ void DetectCoolerMasterARGB(hid_device_info* info, const std::string&)
|
||||
void DetectCoolerMasterGPU(hid_device_info* info, const std::string&)
|
||||
{
|
||||
hid_device* dev = hid_open_path(info->path);
|
||||
|
||||
if(dev)
|
||||
{
|
||||
CMR6000Controller* controller = new CMR6000Controller(dev, info->path);
|
||||
CMR6000Controller* controller = new CMR6000Controller(dev, info->path);
|
||||
RGBController_CMR6000Controller* rgb_controller = new RGBController_CMR6000Controller(controller);
|
||||
// Constructor sets the name
|
||||
ResourceManager::get()->RegisterRGBController(rgb_controller);
|
||||
@@ -77,35 +82,48 @@ void DetectCoolerMasterGPU(hid_device_info* info, const std::string&)
|
||||
|
||||
void DetectCoolerMasterKeyboards(hid_device_info* info, const std::string&)
|
||||
{
|
||||
|
||||
hid_device* dev = hid_open_path(info->path);
|
||||
|
||||
if(dev)
|
||||
{
|
||||
CMMKController* controller = new CMMKController(dev, info);
|
||||
CMMKController* controller = new CMMKController(dev, info);
|
||||
RGBController_CMMKController* rgb_controller = new RGBController_CMMKController(controller);
|
||||
// Constructor sets the name
|
||||
ResourceManager::get()->RegisterRGBController(rgb_controller);
|
||||
}
|
||||
}
|
||||
|
||||
void DetectCoolerMasterMouse(hid_device_info* info, const std::string&)
|
||||
void DetectCoolerMasterMouse(hid_device_info* info, const std::string& name)
|
||||
{
|
||||
hid_device* dev = hid_open_path(info->path);
|
||||
|
||||
if(dev)
|
||||
{
|
||||
CMMM711Controller* controller = new CMMM711Controller(dev, info->path);
|
||||
RGBController_CMMM711Controller* rgb_controller = new RGBController_CMMM711Controller(controller);
|
||||
// Constructor sets the name
|
||||
ResourceManager::get()->RegisterRGBController(rgb_controller);
|
||||
if(info->product_id == COOLERMASTER_MM530_PID || info->product_id == COOLERMASTER_MM531_PID)
|
||||
{
|
||||
CMMMController* controller = new CMMMController(dev, info->path, info->product_id);
|
||||
RGBController_CMMMController* rgb_controller = new RGBController_CMMMController(controller);
|
||||
rgb_controller->name = name;
|
||||
ResourceManager::get()->RegisterRGBController(rgb_controller);
|
||||
}
|
||||
else if(info->product_id == COOLERMASTER_MM711_PID)
|
||||
{
|
||||
CMMM711Controller* controller = new CMMM711Controller(dev, info->path);
|
||||
RGBController_CMMM711Controller* rgb_controller = new RGBController_CMMM711Controller(controller);
|
||||
// Constructor sets the name
|
||||
ResourceManager::get()->RegisterRGBController(rgb_controller);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
void DetectCoolerMasterMousemats(hid_device_info* info, const std::string&)
|
||||
{
|
||||
hid_device* dev = hid_open_path(info->path);
|
||||
|
||||
if(dev)
|
||||
{
|
||||
CMMP750Controller* controller = new CMMP750Controller(dev, info->path);
|
||||
CMMP750Controller* controller = new CMMP750Controller(dev, info->path);
|
||||
RGBController_CMMP750Controller* rgb_controller = new RGBController_CMMP750Controller(controller);
|
||||
// Constructor sets the name
|
||||
ResourceManager::get()->RegisterRGBController(rgb_controller);
|
||||
@@ -115,9 +133,10 @@ void DetectCoolerMasterMousemats(hid_device_info* info, const std::string&)
|
||||
void DetectCoolerMasterRGB(hid_device_info* info, const std::string&)
|
||||
{
|
||||
hid_device* dev = hid_open_path(info->path);
|
||||
|
||||
if(dev)
|
||||
{
|
||||
CMRGBController* controller = new CMRGBController(dev, info->path);
|
||||
CMRGBController* controller = new CMRGBController(dev, info->path);
|
||||
RGBController_CMRGBController* rgb_controller = new RGBController_CMRGBController(controller);
|
||||
// Constructor sets the name
|
||||
ResourceManager::get()->RegisterRGBController(rgb_controller);
|
||||
@@ -127,15 +146,18 @@ void DetectCoolerMasterRGB(hid_device_info* info, const std::string&)
|
||||
void DetectCoolerMasterSmallARGB(hid_device_info* info, const std::string&)
|
||||
{
|
||||
hid_device* dev = hid_open_path(info->path);
|
||||
|
||||
if(dev)
|
||||
{
|
||||
CMSmallARGBController* controller = new CMSmallARGBController(dev, info->path, 0);
|
||||
CMSmallARGBController* controller = new CMSmallARGBController(dev, info->path, 0);
|
||||
RGBController_CMSmallARGBController* rgb_controller = new RGBController_CMSmallARGBController(controller);
|
||||
// Constructor sets the name
|
||||
ResourceManager::get()->RegisterRGBController(rgb_controller);
|
||||
}
|
||||
}
|
||||
|
||||
REGISTER_HID_DETECTOR_IPU("Cooler Master MM530", DetectCoolerMasterMouse, COOLERMASTER_VID, COOLERMASTER_MM530_PID, 1, 0xFF00, 1);
|
||||
//REGISTER_HID_DETECTOR_IPU("Cooler Master MM531", DetectCoolerMasterMouse, COOLERMASTER_VID, COOLERMASTER_MM531_PID, 1, 0xFF00, 1);
|
||||
REGISTER_HID_DETECTOR_IPU("Cooler Master MM711", DetectCoolerMasterMouse, COOLERMASTER_VID, COOLERMASTER_MM711_PID, 1, 0xFF00, 1);
|
||||
REGISTER_HID_DETECTOR_IPU("Cooler Master MM720", DetectCoolerMasterMouse, COOLERMASTER_VID, COOLERMASTER_MM720_PID, 1, 0xFF00, 1);
|
||||
REGISTER_HID_DETECTOR_PU ("Cooler Master MP750 XL", DetectCoolerMasterMousemats, COOLERMASTER_VID, COOLERMASTER_MP750_XL_PID, 0xFF00, 1);
|
||||
@@ -147,7 +169,7 @@ REGISTER_HID_DETECTOR_IPU("Cooler Master MasterKeys Pro S", DetectCooler
|
||||
REGISTER_HID_DETECTOR_IPU("Cooler Master MK570", DetectCoolerMasterKeyboards, COOLERMASTER_VID, COOLERMASTER_MASTERKEYS_MK750_PID, 1, 0xFF00, 1);
|
||||
REGISTER_HID_DETECTOR_IPU("Cooler Master SK630", DetectCoolerMasterKeyboards, COOLERMASTER_VID, COOLERMASTER_MASTERKEYS_SK630_PID, 1, 0xFF00, 1);
|
||||
REGISTER_HID_DETECTOR_IPU("Cooler Master SK650", DetectCoolerMasterKeyboards, COOLERMASTER_VID, COOLERMASTER_MASTERKEYS_SK650_PID, 1, 0xFF00, 1);
|
||||
REGISTER_HID_DETECTOR_IPU("Cooler Master ARGB", DetectCoolerMasterARGB, COOLERMASTER_VID, COOLERMASTER_ARGB_PID, 0, 0xFF00, 1);
|
||||
REGISTER_HID_DETECTOR_IPU("Cooler Master Small ARGB", DetectCoolerMasterSmallARGB, COOLERMASTER_VID, COOLERMASTER_SMALL_ARGB_PID, 0, 0xFF00, 1);
|
||||
REGISTER_HID_DETECTOR_IPU("Cooler Master RGB", DetectCoolerMasterRGB, COOLERMASTER_VID, COOLERMASTER_RGB_PID, 0, 0xFF00, 1);
|
||||
REGISTER_HID_DETECTOR_IPU("Cooler Master ARGB", DetectCoolerMasterARGB, COOLERMASTER_VID, COOLERMASTER_ARGB_PID, 0, 0xFF00, 1);
|
||||
REGISTER_HID_DETECTOR_IPU("Cooler Master Small ARGB", DetectCoolerMasterSmallARGB, COOLERMASTER_VID, COOLERMASTER_SMALL_ARGB_PID, 0, 0xFF00, 1);
|
||||
REGISTER_HID_DETECTOR_IPU("Cooler Master RGB", DetectCoolerMasterRGB, COOLERMASTER_VID, COOLERMASTER_RGB_PID, 1, 0xFF00, 1);
|
||||
REGISTER_HID_DETECTOR_I ("Cooler Master Radeon 6000 GPU", DetectCoolerMasterGPU, COOLERMASTER_VID, COOLERMASTER_RADEON_6000_PID, 1 );
|
||||
|
||||
@@ -9,20 +9,32 @@
|
||||
|
||||
#include "RGBController_CMARGBController.h"
|
||||
|
||||
RGBController_CMARGBController::RGBController_CMARGBController(CMARGBController *cmargb_ptr)
|
||||
{
|
||||
cmargb = cmargb_ptr;
|
||||
unsigned char speed = cmargb->GetLedSpeed();
|
||||
/**------------------------------------------------------------------*\
|
||||
@name Coolermaster ARGB
|
||||
@type USB
|
||||
@save :warning:
|
||||
@direct :white_check_mark:
|
||||
@effects :white_check_mark:
|
||||
@detectors DetectCoolerMasterARGB
|
||||
@comment The Coolermaster ARGB device supports `Direct` mode from
|
||||
firmware 0028 onwards. Check the serial number for the date
|
||||
"A202105291658" or newer.
|
||||
\*-------------------------------------------------------------------*/
|
||||
|
||||
name = argb_header_data[cmargb->GetZoneIndex()].name;
|
||||
RGBController_CMARGBController::RGBController_CMARGBController(CMARGBController* controller_ptr)
|
||||
{
|
||||
controller = controller_ptr;
|
||||
unsigned char speed = controller->GetLedSpeed();
|
||||
|
||||
name = argb_header_data[controller->GetZoneIndex()].name;
|
||||
vendor = "Cooler Master";
|
||||
type = DEVICE_TYPE_LEDSTRIP;
|
||||
description = cmargb->GetDeviceName();
|
||||
description = controller->GetDeviceName();
|
||||
version = "3.0 for FW0028";
|
||||
serial = cmargb->GetSerial();
|
||||
location = cmargb->GetLocation();
|
||||
serial = controller->GetSerial();
|
||||
location = controller->GetLocation();
|
||||
|
||||
if(argb_header_data[cmargb->GetZoneIndex()].digital)
|
||||
if(argb_header_data[controller->GetZoneIndex()].digital)
|
||||
{
|
||||
mode Off;
|
||||
Off.name = "Turn Off";
|
||||
@@ -256,7 +268,7 @@ RGBController_CMARGBController::RGBController_CMARGBController(CMARGBController
|
||||
Init_Controller();
|
||||
SetupZones();
|
||||
|
||||
int temp_mode = cmargb->GetMode();
|
||||
int temp_mode = controller->GetMode();
|
||||
for(std::size_t mode_idx = 0; mode_idx < modes.size() ; mode_idx++)
|
||||
{
|
||||
if (temp_mode == modes[mode_idx].value)
|
||||
@@ -267,23 +279,23 @@ RGBController_CMARGBController::RGBController_CMARGBController(CMARGBController
|
||||
}
|
||||
if (modes[active_mode].flags & MODE_FLAG_HAS_MODE_SPECIFIC_COLOR)
|
||||
{
|
||||
modes[active_mode].colors[0] = ToRGBColor(cmargb->GetLedRed(), cmargb->GetLedGreen(), cmargb->GetLedBlue());
|
||||
modes[active_mode].color_mode = (cmargb->GetRandomColours()) ? MODE_COLORS_RANDOM : MODE_COLORS_MODE_SPECIFIC;
|
||||
modes[active_mode].colors[0] = ToRGBColor(controller->GetLedRed(), controller->GetLedGreen(), controller->GetLedBlue());
|
||||
modes[active_mode].color_mode = (controller->GetRandomColours()) ? MODE_COLORS_RANDOM : MODE_COLORS_MODE_SPECIFIC;
|
||||
}
|
||||
if (modes[active_mode].flags & MODE_FLAG_HAS_SPEED)
|
||||
{
|
||||
modes[active_mode].speed = cmargb->GetLedSpeed();
|
||||
modes[active_mode].speed = controller->GetLedSpeed();
|
||||
}
|
||||
}
|
||||
|
||||
RGBController_CMARGBController::~RGBController_CMARGBController()
|
||||
{
|
||||
delete cmargb;
|
||||
delete controller;
|
||||
}
|
||||
|
||||
void RGBController_CMARGBController::Init_Controller()
|
||||
{
|
||||
int zone_idx = cmargb->GetZoneIndex();
|
||||
int zone_idx = controller->GetZoneIndex();
|
||||
int zone_led_count = argb_header_data[zone_idx].count;
|
||||
|
||||
/*-------------------------------------------------*\
|
||||
@@ -319,7 +331,7 @@ void RGBController_CMARGBController::SetupZones()
|
||||
|
||||
if (!boolSingleLED)
|
||||
{
|
||||
cmargb->SetLedCount( std::stoi(zones[zone_idx].name), zones[zone_idx].leds_count);
|
||||
controller->SetLedCount( std::stoi(zones[zone_idx].name), zones[zone_idx].leds_count);
|
||||
}
|
||||
|
||||
for(unsigned int lp_idx = 0; lp_idx < zones[zone_idx].leds_count; lp_idx++)
|
||||
@@ -377,7 +389,7 @@ void RGBController_CMARGBController::DeviceUpdateLEDs()
|
||||
|
||||
void RGBController_CMARGBController::UpdateZoneLEDs(int zone)
|
||||
{
|
||||
cmargb->SetLedsDirect( zones[zone].colors, zones[zone].leds_count );
|
||||
controller->SetLedsDirect( zones[zone].colors, zones[zone].leds_count );
|
||||
}
|
||||
|
||||
void RGBController_CMARGBController::UpdateSingleLED(int led)
|
||||
@@ -399,10 +411,10 @@ void RGBController_CMARGBController::SetCustomMode()
|
||||
|
||||
void RGBController_CMARGBController::DeviceUpdateMode()
|
||||
{
|
||||
bool random_colours = (modes[active_mode].color_mode == MODE_COLORS_RANDOM);
|
||||
bool random_colours = (modes[active_mode].color_mode == MODE_COLORS_RANDOM);
|
||||
RGBColor colour = (modes[active_mode].color_mode == MODE_COLORS_MODE_SPECIFIC) ? modes[active_mode].colors[0] : 0;
|
||||
|
||||
cmargb->SetMode( modes[active_mode].value, modes[active_mode].speed, modes[active_mode].brightness, colour, random_colours );
|
||||
controller->SetMode( modes[active_mode].value, modes[active_mode].speed, modes[active_mode].brightness, colour, random_colours );
|
||||
}
|
||||
|
||||
int RGBController_CMARGBController::GetLED_Zone(int led_idx)
|
||||
|
||||
@@ -1,40 +1,40 @@
|
||||
/*-------------------------------------------------------------------*\
|
||||
| RGBController_CMARGBController.h |
|
||||
| |
|
||||
| Driver for Coolermaster ARGB Controller |
|
||||
| |
|
||||
| Chris M (Dr_No) 14th Oct 2020 |
|
||||
| |
|
||||
\*-------------------------------------------------------------------*/
|
||||
|
||||
#pragma once
|
||||
#include "RGBController.h"
|
||||
#include "CMARGBcontroller.h"
|
||||
#include <vector>
|
||||
|
||||
#define first_zone(zn) ((zones.size() > 1) ? 1 : 0)
|
||||
#define last_zone(zn) ((zones.size() > 1) ? 4 : 1)
|
||||
|
||||
class RGBController_CMARGBController : public RGBController
|
||||
{
|
||||
public:
|
||||
RGBController_CMARGBController(CMARGBController* cmargb_ptr);
|
||||
~RGBController_CMARGBController();
|
||||
|
||||
void SetupZones();
|
||||
void ResizeZone(int zone, int new_size);
|
||||
|
||||
void DeviceUpdateLEDs();
|
||||
void UpdateZoneLEDs(int zone);
|
||||
void UpdateSingleLED(int led);
|
||||
|
||||
void SetCustomMode();
|
||||
void DeviceUpdateMode();
|
||||
|
||||
private:
|
||||
void Init_Controller();
|
||||
int GetDeviceMode();
|
||||
int GetLED_Zone(int led_idx);
|
||||
|
||||
CMARGBController* cmargb;
|
||||
};
|
||||
/*-------------------------------------------------------------------*\
|
||||
| RGBController_CMARGBController.h |
|
||||
| |
|
||||
| Driver for Coolermaster ARGB Controller |
|
||||
| |
|
||||
| Chris M (Dr_No) 14th Oct 2020 |
|
||||
| |
|
||||
\*-------------------------------------------------------------------*/
|
||||
|
||||
#pragma once
|
||||
#include "RGBController.h"
|
||||
#include "CMARGBcontroller.h"
|
||||
#include <vector>
|
||||
|
||||
#define first_zone(zn) ((zones.size() > 1) ? 1 : 0)
|
||||
#define last_zone(zn) ((zones.size() > 1) ? 4 : 1)
|
||||
|
||||
class RGBController_CMARGBController : public RGBController
|
||||
{
|
||||
public:
|
||||
RGBController_CMARGBController(CMARGBController* controller_ptr);
|
||||
~RGBController_CMARGBController();
|
||||
|
||||
void SetupZones();
|
||||
void ResizeZone(int zone, int new_size);
|
||||
|
||||
void DeviceUpdateLEDs();
|
||||
void UpdateZoneLEDs(int zone);
|
||||
void UpdateSingleLED(int led);
|
||||
|
||||
void SetCustomMode();
|
||||
void DeviceUpdateMode();
|
||||
|
||||
private:
|
||||
void Init_Controller();
|
||||
int GetDeviceMode();
|
||||
int GetLED_Zone(int led_idx);
|
||||
|
||||
CMARGBController* controller;
|
||||
};
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
| Driver for Coolermaster MasterKeys keyboards |
|
||||
| |
|
||||
| Lukas N (chmod222) 28th Jun 2020 |
|
||||
| Tam D (too.manyhobbies) 25th Apr 2021 |
|
||||
| Tam D (too.manyhobbies) 25th Apr 2021 |
|
||||
| |
|
||||
\*-------------------------------------------------------------------*/
|
||||
|
||||
@@ -20,17 +20,27 @@ using namespace std::chrono_literals;
|
||||
#define CMMK_MODE_FIRMWARE 0xFF
|
||||
#define CMMK_MODE_MANUAL 0x7F
|
||||
|
||||
RGBController_CMMKController::RGBController_CMMKController(CMMKController* cmmk_ctrl)
|
||||
{
|
||||
cmmk = cmmk_ctrl;
|
||||
/**------------------------------------------------------------------*\
|
||||
@name Coolermaster Masterkeys Keyboards
|
||||
@type USB
|
||||
@save :warning:
|
||||
@direct :white_check_mark:
|
||||
@effects :white_check_mark:
|
||||
@detectors DetectCoolerMasterKeyboards
|
||||
@comment
|
||||
\*-------------------------------------------------------------------*/
|
||||
|
||||
name = cmmk->GetDeviceName();
|
||||
vendor = cmmk->GetDeviceVendor();
|
||||
RGBController_CMMKController::RGBController_CMMKController(CMMKController* controller_ptr)
|
||||
{
|
||||
controller = controller_ptr;
|
||||
|
||||
name = controller->GetDeviceName();
|
||||
vendor = controller->GetDeviceVendor();
|
||||
type = DEVICE_TYPE_KEYBOARD;
|
||||
description = "Cooler Master MasterKeys Device";
|
||||
version = cmmk->GetFirmwareVersion();
|
||||
version = controller->GetFirmwareVersion();
|
||||
serial = "";
|
||||
location = cmmk->GetLocation();
|
||||
location = controller->GetLocation();
|
||||
|
||||
mode Direct;
|
||||
Direct.name = "Direct";
|
||||
@@ -173,7 +183,7 @@ RGBController_CMMKController::RGBController_CMMKController(CMMKController* cmmk_
|
||||
|
||||
RGBController_CMMKController::~RGBController_CMMKController()
|
||||
{
|
||||
delete cmmk;
|
||||
delete controller;
|
||||
}
|
||||
|
||||
void RGBController_CMMKController::SetupMatrixMap()
|
||||
@@ -199,14 +209,14 @@ void RGBController_CMMKController::SetupMatrixMap()
|
||||
|
||||
void RGBController_CMMKController::SetupZones()
|
||||
{
|
||||
uint8_t row_count = cmmk->GetRowCount();
|
||||
uint8_t column_count = cmmk->GetColumnCount();
|
||||
uint8_t row_count = controller->GetRowCount();
|
||||
uint8_t column_count = controller->GetColumnCount();
|
||||
|
||||
for(int y = 0; y < row_count; y++)
|
||||
{
|
||||
for(int x = 0; x < column_count; x++)
|
||||
{
|
||||
if(!cmmk->PositionValid(y, x))
|
||||
if(!controller->PositionValid(y, x))
|
||||
{
|
||||
continue;
|
||||
}
|
||||
@@ -308,7 +318,7 @@ void RGBController_CMMKController::DeviceUpdateLEDs()
|
||||
|
||||
if(force_update.load() || dirty.load())
|
||||
{
|
||||
cmmk->SetAll(current_matrix);
|
||||
controller->SetAll(current_matrix);
|
||||
|
||||
force_update.store(false);
|
||||
}
|
||||
@@ -322,7 +332,7 @@ void RGBController_CMMKController::UpdateZoneLEDs(int zone_idx)
|
||||
|
||||
if(force_update.load() || dirty.load())
|
||||
{
|
||||
cmmk->SetAll(current_matrix);
|
||||
controller->SetAll(current_matrix);
|
||||
|
||||
force_update.store(false);
|
||||
}
|
||||
@@ -337,7 +347,7 @@ void RGBController_CMMKController::UpdateSingleLED(int led_idx)
|
||||
|
||||
current_matrix.data[y][x] = map_to_cmmk_rgb(colors[led_idx]);
|
||||
|
||||
cmmk->SetSingle(y, x, map_to_cmmk_rgb(colors[led_idx]));
|
||||
controller->SetSingle(y, x, map_to_cmmk_rgb(colors[led_idx]));
|
||||
dirty.store(false);
|
||||
}
|
||||
|
||||
@@ -353,11 +363,11 @@ void RGBController_CMMKController::DeviceUpdateMode()
|
||||
switch(modes[active_mode].value)
|
||||
{
|
||||
case CMMK_MODE_FIRMWARE:
|
||||
cmmk->SetFirmwareControl();
|
||||
controller->SetFirmwareControl();
|
||||
break;
|
||||
|
||||
case CMMK_MODE_MANUAL:
|
||||
cmmk->SetManualControl();
|
||||
controller->SetManualControl();
|
||||
break;
|
||||
|
||||
case CMMK_EFFECT_FULLY_LIT:
|
||||
@@ -366,7 +376,7 @@ void RGBController_CMMKController::DeviceUpdateMode()
|
||||
|
||||
fully_lit_effect.color = map_to_cmmk_rgb(modes[active_mode].colors[0]);
|
||||
|
||||
cmmk->SetMode(fully_lit_effect);
|
||||
controller->SetMode(fully_lit_effect);
|
||||
}
|
||||
break;
|
||||
|
||||
@@ -377,7 +387,7 @@ void RGBController_CMMKController::DeviceUpdateMode()
|
||||
breathe_effect.speed = (uint8_t)modes[active_mode].speed;
|
||||
breathe_effect.color = map_to_cmmk_rgb(modes[active_mode].colors[0]);
|
||||
|
||||
cmmk->SetMode(breathe_effect);
|
||||
controller->SetMode(breathe_effect);
|
||||
}
|
||||
break;
|
||||
|
||||
@@ -387,7 +397,7 @@ void RGBController_CMMKController::DeviceUpdateMode()
|
||||
|
||||
cycle_effect.speed = (uint8_t)modes[active_mode].speed;
|
||||
|
||||
cmmk->SetMode(cycle_effect);
|
||||
controller->SetMode(cycle_effect);
|
||||
}
|
||||
break;
|
||||
|
||||
@@ -399,7 +409,7 @@ void RGBController_CMMKController::DeviceUpdateMode()
|
||||
single_effect.active = map_to_cmmk_rgb(modes[active_mode].colors[0]);
|
||||
single_effect.rest = map_to_cmmk_rgb(modes[active_mode].colors[1]);
|
||||
|
||||
cmmk->SetMode(single_effect);
|
||||
controller->SetMode(single_effect);
|
||||
}
|
||||
break;
|
||||
|
||||
@@ -411,7 +421,7 @@ void RGBController_CMMKController::DeviceUpdateMode()
|
||||
wave_effect.direction = map_to_cmmk_dir(modes[active_mode].direction);
|
||||
wave_effect.start = map_to_cmmk_rgb(modes[active_mode].colors[0]);
|
||||
|
||||
cmmk->SetMode(wave_effect);
|
||||
controller->SetMode(wave_effect);
|
||||
}
|
||||
break;
|
||||
|
||||
@@ -432,7 +442,7 @@ void RGBController_CMMKController::DeviceUpdateMode()
|
||||
ripple_effect.ripple_type = CMMK_RIPPLE_GIVEN_COLOR;
|
||||
}
|
||||
|
||||
cmmk->SetMode(ripple_effect);
|
||||
controller->SetMode(ripple_effect);
|
||||
}
|
||||
break;
|
||||
|
||||
@@ -444,7 +454,7 @@ void RGBController_CMMKController::DeviceUpdateMode()
|
||||
cross_effect.active = map_to_cmmk_rgb(modes[active_mode].colors[0]);
|
||||
cross_effect.rest = map_to_cmmk_rgb(modes[active_mode].colors[1]);
|
||||
|
||||
cmmk->SetMode(cross_effect);
|
||||
controller->SetMode(cross_effect);
|
||||
}
|
||||
break;
|
||||
|
||||
@@ -457,7 +467,7 @@ void RGBController_CMMKController::DeviceUpdateMode()
|
||||
raindrops_effect.active = map_to_cmmk_rgb(modes[active_mode].colors[0]);
|
||||
raindrops_effect.rest = map_to_cmmk_rgb(modes[active_mode].colors[1]);
|
||||
|
||||
cmmk->SetMode(raindrops_effect);
|
||||
controller->SetMode(raindrops_effect);
|
||||
}
|
||||
break;
|
||||
|
||||
@@ -470,7 +480,7 @@ void RGBController_CMMKController::DeviceUpdateMode()
|
||||
stars_effect.active = map_to_cmmk_rgb(modes[active_mode].colors[0]);
|
||||
stars_effect.rest = map_to_cmmk_rgb(modes[active_mode].colors[1]);
|
||||
|
||||
cmmk->SetMode(stars_effect);
|
||||
controller->SetMode(stars_effect);
|
||||
}
|
||||
break;
|
||||
|
||||
@@ -480,7 +490,7 @@ void RGBController_CMMKController::DeviceUpdateMode()
|
||||
|
||||
snake_effect.speed = (uint8_t)modes[active_mode].speed;
|
||||
|
||||
cmmk->SetMode(snake_effect);
|
||||
controller->SetMode(snake_effect);
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -1,42 +1,42 @@
|
||||
/*-------------------------------------------------------------------*\
|
||||
| RGBController_CMMKController.h |
|
||||
| |
|
||||
| Driver for Coolermaster MasterKeys keyboards |
|
||||
| |
|
||||
| Lukas N (chmod222) 28th Jun 2020 |
|
||||
| Tam D (too.manyhobbies) 25th Apr 2021 |
|
||||
| |
|
||||
\*-------------------------------------------------------------------*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "RGBController.h"
|
||||
#include "CMMKController.h"
|
||||
|
||||
class RGBController_CMMKController : public RGBController
|
||||
{
|
||||
public:
|
||||
RGBController_CMMKController(CMMKController* cmmk_ptr);
|
||||
~RGBController_CMMKController();
|
||||
|
||||
void SetupZones();
|
||||
void ResizeZone(int zone, int new_size);
|
||||
|
||||
void DeviceUpdateLEDs();
|
||||
void UpdateZoneLEDs(int zone);
|
||||
void UpdateSingleLED(int led);
|
||||
|
||||
void SetCustomMode();
|
||||
void DeviceUpdateMode();
|
||||
|
||||
private:
|
||||
void SetupMatrixMap();
|
||||
|
||||
CMMKController* cmmk;
|
||||
|
||||
int matrix_map[CMMK_ROWS_MAX][CMMK_COLS_MAX];
|
||||
struct cmmk_color_matrix current_matrix;
|
||||
|
||||
std::atomic<bool> dirty;
|
||||
std::atomic<bool> force_update;
|
||||
};
|
||||
/*-------------------------------------------------------------------*\
|
||||
| RGBController_CMMKController.h |
|
||||
| |
|
||||
| Driver for Coolermaster MasterKeys keyboards |
|
||||
| |
|
||||
| Lukas N (chmod222) 28th Jun 2020 |
|
||||
| Tam D (too.manyhobbies) 25th Apr 2021 |
|
||||
| |
|
||||
\*-------------------------------------------------------------------*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "RGBController.h"
|
||||
#include "CMMKController.h"
|
||||
|
||||
class RGBController_CMMKController : public RGBController
|
||||
{
|
||||
public:
|
||||
RGBController_CMMKController(CMMKController* controller_ptr);
|
||||
~RGBController_CMMKController();
|
||||
|
||||
void SetupZones();
|
||||
void ResizeZone(int zone, int new_size);
|
||||
|
||||
void DeviceUpdateLEDs();
|
||||
void UpdateZoneLEDs(int zone);
|
||||
void UpdateSingleLED(int led);
|
||||
|
||||
void SetCustomMode();
|
||||
void DeviceUpdateMode();
|
||||
|
||||
private:
|
||||
void SetupMatrixMap();
|
||||
|
||||
CMMKController* controller;
|
||||
|
||||
int matrix_map[CMMK_ROWS_MAX][CMMK_COLS_MAX];
|
||||
struct cmmk_color_matrix current_matrix;
|
||||
|
||||
std::atomic<bool> dirty;
|
||||
std::atomic<bool> force_update;
|
||||
};
|
||||
|
||||
@@ -11,18 +11,27 @@
|
||||
|
||||
#include "RGBController_CMMM711Controller.h"
|
||||
|
||||
RGBController_CMMM711Controller::RGBController_CMMM711Controller(CMMM711Controller *cmmm711_ptr)
|
||||
{
|
||||
cmmm711 = cmmm711_ptr;
|
||||
uint8_t speed = cmmm711->GetLedSpeed();
|
||||
/**------------------------------------------------------------------*\
|
||||
@name Coolermaster Master Mouse
|
||||
@type USB
|
||||
@save :warning:
|
||||
@direct :white_check_mark:
|
||||
@effects :white_check_mark:
|
||||
@detectors DetectCoolerMasterMouse
|
||||
@comment
|
||||
\*-------------------------------------------------------------------*/
|
||||
|
||||
name = cmmm711->GetDeviceName();
|
||||
RGBController_CMMM711Controller::RGBController_CMMM711Controller(CMMM711Controller* controller_ptr)
|
||||
{
|
||||
controller = controller_ptr;
|
||||
uint8_t speed = controller->GetLedSpeed();
|
||||
|
||||
name = controller->GetDeviceName();
|
||||
vendor = "Cooler Master";
|
||||
type = DEVICE_TYPE_MOUSE;
|
||||
description = cmmm711->GetDeviceName();
|
||||
version = "1.0";
|
||||
serial = cmmm711->GetSerial();
|
||||
location = cmmm711->GetLocation();
|
||||
description = controller->GetDeviceName();
|
||||
serial = controller->GetSerial();
|
||||
location = controller->GetLocation();
|
||||
|
||||
mode Custom;
|
||||
Custom.name = "Direct";
|
||||
@@ -96,26 +105,29 @@ RGBController_CMMM711Controller::RGBController_CMMM711Controller(CMMM711Controll
|
||||
Init_Controller(); //Only processed on first run
|
||||
SetupZones();
|
||||
|
||||
uint8_t temp_mode = cmmm711->GetMode();
|
||||
uint8_t temp_mode = controller->GetMode();
|
||||
|
||||
for(std::size_t mode_index = 0; mode_index < modes.size(); mode_index++)
|
||||
{
|
||||
if (modes[mode_index].value == temp_mode)
|
||||
{
|
||||
active_mode = mode_index;
|
||||
active_mode = mode_index;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (modes[active_mode].color_mode == MODE_COLORS_MODE_SPECIFIC)
|
||||
{
|
||||
modes[active_mode].colors[0] = ToRGBColor(cmmm711->GetLedRed(),cmmm711->GetLedGreen(),cmmm711->GetLedBlue());
|
||||
modes[active_mode].colors[0] = ToRGBColor(controller->GetLedRed(),controller->GetLedGreen(),controller->GetLedBlue());
|
||||
}
|
||||
colors[0] = cmmm711->GetWheelColour();
|
||||
colors[1] = cmmm711->GetLogoColour();
|
||||
|
||||
colors[0] = controller->GetWheelColour();
|
||||
colors[1] = controller->GetLogoColour();
|
||||
}
|
||||
|
||||
RGBController_CMMM711Controller::~RGBController_CMMM711Controller()
|
||||
{
|
||||
delete cmmm711;
|
||||
delete controller;
|
||||
}
|
||||
|
||||
void RGBController_CMMM711Controller::Init_Controller()
|
||||
@@ -157,7 +169,7 @@ void RGBController_CMMM711Controller::DeviceUpdateLEDs()
|
||||
RGBColor wheel = applyBrightness(colors[0], modes[active_mode].brightness);
|
||||
RGBColor logo = applyBrightness(colors[1], modes[active_mode].brightness);
|
||||
|
||||
cmmm711->SetLedsDirect( wheel, logo);
|
||||
controller->SetLedsDirect( wheel, logo);
|
||||
}
|
||||
|
||||
void RGBController_CMMM711Controller::UpdateZoneLEDs(int /*zone*/)
|
||||
@@ -193,12 +205,12 @@ void RGBController_CMMM711Controller::DeviceUpdateMode()
|
||||
colour = modes[active_mode].colors[0];
|
||||
}
|
||||
|
||||
cmmm711->SendUpdate(modes[active_mode].value, modes[active_mode].speed, colour, modes[active_mode].brightness);
|
||||
controller->SendUpdate(modes[active_mode].value, modes[active_mode].speed, colour, modes[active_mode].brightness);
|
||||
}
|
||||
}
|
||||
|
||||
void RGBController_CMMM711Controller::DeviceSaveMode()
|
||||
{
|
||||
DeviceUpdateMode();
|
||||
cmmm711->SendSavePacket();
|
||||
controller->SendSavePacket();
|
||||
}
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
class RGBController_CMMM711Controller : public RGBController
|
||||
{
|
||||
public:
|
||||
RGBController_CMMM711Controller(CMMM711Controller* cmargb_ptr);
|
||||
RGBController_CMMM711Controller(CMMM711Controller* controller_ptr);
|
||||
~RGBController_CMMM711Controller();
|
||||
|
||||
void SetupZones();
|
||||
@@ -36,5 +36,5 @@ private:
|
||||
void Init_Controller();
|
||||
int GetDeviceMode();
|
||||
|
||||
CMMM711Controller* cmmm711;
|
||||
CMMM711Controller* controller;
|
||||
};
|
||||
|
||||
@@ -0,0 +1,295 @@
|
||||
/*-------------------------------------------------------------------*\
|
||||
| RGBController_CMMMController.cpp |
|
||||
| |
|
||||
| Driver for Cooler Master MasterMouse Controller |
|
||||
| |
|
||||
| Chris M (Dr_No) 14th Feb 2021 - MM711 Base |
|
||||
| Dracrius 12th Mar 2022 |
|
||||
| |
|
||||
\*-------------------------------------------------------------------*/
|
||||
|
||||
#define applyBrightness(c, bright) ((RGBColor) ((RGBGetBValue(c) * bright / CM_MM_ARGB_BRIGHTNESS_MAX_DEFAULT) << 16 | (RGBGetGValue(c) * bright / CM_MM_ARGB_BRIGHTNESS_MAX_DEFAULT) << 8 | (RGBGetRValue(c) * bright / CM_MM_ARGB_BRIGHTNESS_MAX_DEFAULT)))
|
||||
|
||||
#include "RGBController_CMMMController.h"
|
||||
|
||||
/**------------------------------------------------------------------*\
|
||||
@name Coolermaster Master Mouse
|
||||
@type USB
|
||||
@save :white_check_mark:
|
||||
@direct :white_check_mark:
|
||||
@effects :white_check_mark:
|
||||
@detectors DetectCoolerMasterMouse
|
||||
@comment
|
||||
\*-------------------------------------------------------------------*/
|
||||
|
||||
RGBController_CMMMController::RGBController_CMMMController(CMMMController* controller_ptr)
|
||||
{
|
||||
controller = controller_ptr;
|
||||
uint8_t speed = controller->GetLedSpeed();
|
||||
|
||||
name = "Cooler Master MasterMouse";
|
||||
vendor = controller->GetDeviceVendor();
|
||||
type = DEVICE_TYPE_MOUSE;
|
||||
description = "Cooler Master MasterMouse";
|
||||
serial = controller->GetSerial();
|
||||
location = controller->GetLocation();
|
||||
|
||||
mode Custom;
|
||||
Custom.name = "Direct";
|
||||
Custom.value = CM_MM_MODE_CUSTOM;
|
||||
Custom.flags = MODE_FLAG_HAS_PER_LED_COLOR | MODE_FLAG_HAS_BRIGHTNESS | MODE_FLAG_MANUAL_SAVE;
|
||||
Custom.brightness_min = CM_MM_ARGB_BRIGHTNESS_MIN;
|
||||
Custom.brightness_max = CM_MM_ARGB_BRIGHTNESS_MAX_DEFAULT;
|
||||
Custom.brightness = CM_MM_ARGB_BRIGHTNESS_MAX_DEFAULT;
|
||||
Custom.color_mode = MODE_COLORS_PER_LED;
|
||||
modes.push_back(Custom);
|
||||
|
||||
mode Static;
|
||||
Static.name = "Static";
|
||||
Static.value = CM_MM_MODE_STATIC;
|
||||
Static.flags = MODE_FLAG_HAS_MODE_SPECIFIC_COLOR | MODE_FLAG_HAS_BRIGHTNESS | MODE_FLAG_MANUAL_SAVE;
|
||||
Static.brightness_min = CM_MM_ARGB_BRIGHTNESS_MIN;
|
||||
Static.brightness_max = CM_MM_ARGB_BRIGHTNESS_MAX_DEFAULT;
|
||||
Static.brightness = CM_MM_ARGB_BRIGHTNESS_MAX_DEFAULT;
|
||||
Static.colors_min = 1;
|
||||
Static.colors_max = 1;
|
||||
Static.colors.resize(Static.colors_max);
|
||||
Static.speed_min = CM_MM_SPEED_1;
|
||||
Static.speed_max = CM_MM_SPEED_5;
|
||||
Static.color_mode = MODE_COLORS_MODE_SPECIFIC;
|
||||
Static.speed = CM_MM_SPEED_3;
|
||||
modes.push_back(Static);
|
||||
|
||||
mode Breathing;
|
||||
Breathing.name = "Breathing";
|
||||
Breathing.value = CM_MM_MODE_BREATHING;
|
||||
Breathing.flags = MODE_FLAG_HAS_SPEED | MODE_FLAG_HAS_MODE_SPECIFIC_COLOR | MODE_FLAG_HAS_BRIGHTNESS | MODE_FLAG_MANUAL_SAVE;
|
||||
Breathing.brightness_min = CM_MM_ARGB_BRIGHTNESS_MIN;
|
||||
Breathing.brightness_max = CM_MM_ARGB_BRIGHTNESS_MAX_DEFAULT;
|
||||
Breathing.brightness = CM_MM_ARGB_BRIGHTNESS_MAX_DEFAULT;
|
||||
Breathing.colors_min = 1;
|
||||
Breathing.colors_max = 1;
|
||||
Breathing.colors.resize(Breathing.colors_max);
|
||||
Breathing.speed_min = CM_MM_SPEED_1;
|
||||
Breathing.speed_max = CM_MM_SPEED_5;
|
||||
Breathing.color_mode = MODE_COLORS_MODE_SPECIFIC;
|
||||
Breathing.speed = CM_MM_SPEED_3;
|
||||
modes.push_back(Breathing);
|
||||
|
||||
mode Spectrum_Cycle;
|
||||
Spectrum_Cycle.name = "Spectrum Cycle";
|
||||
Spectrum_Cycle.value = CM_MM_MODE_SPECTRUM_CYCLE;
|
||||
Spectrum_Cycle.flags = MODE_FLAG_HAS_SPEED | MODE_FLAG_HAS_BRIGHTNESS | MODE_FLAG_MANUAL_SAVE;
|
||||
Spectrum_Cycle.brightness_min = CM_MM_ARGB_BRIGHTNESS_MIN;
|
||||
Spectrum_Cycle.brightness_max = CM_MM_ARGB_BRIGHTNESS_MAX_SPECTRUM;
|
||||
Spectrum_Cycle.brightness = CM_MM_ARGB_BRIGHTNESS_MAX_SPECTRUM;
|
||||
Spectrum_Cycle.speed_min = CM_MM_SPEED_1;
|
||||
Spectrum_Cycle.speed_max = CM_MM_SPEED_5;
|
||||
Spectrum_Cycle.color_mode = MODE_COLORS_NONE;
|
||||
Spectrum_Cycle.speed = CM_MM_SPEED_3;
|
||||
modes.push_back(Spectrum_Cycle);
|
||||
|
||||
mode Stars;
|
||||
Stars.name = "Stars";
|
||||
Stars.value = CM_MM_MODE_STARS;
|
||||
Stars.flags = MODE_FLAG_HAS_SPEED | MODE_FLAG_HAS_MODE_SPECIFIC_COLOR | MODE_FLAG_HAS_BRIGHTNESS | MODE_FLAG_MANUAL_SAVE;
|
||||
Stars.brightness_min = CM_MM_ARGB_BRIGHTNESS_MIN;
|
||||
Stars.brightness_max = CM_MM_ARGB_BRIGHTNESS_MAX_DEFAULT;
|
||||
Stars.brightness = CM_MM_ARGB_BRIGHTNESS_MAX_DEFAULT;
|
||||
Stars.colors_min = 2;
|
||||
Stars.colors_max = 2;
|
||||
Stars.colors.resize(Stars.colors_max);
|
||||
Stars.speed_min = CM_MM_SPEED_1;
|
||||
Stars.speed_max = CM_MM_SPEED_5;
|
||||
Stars.color_mode = MODE_COLORS_MODE_SPECIFIC;
|
||||
Stars.speed = CM_MM_SPEED_3;
|
||||
modes.push_back(Stars);
|
||||
|
||||
mode Indicator;
|
||||
Indicator.name = "Indicator";
|
||||
Indicator.value = CM_MM_MODE_INDICATOR;
|
||||
Indicator.flags = MODE_FLAG_MANUAL_SAVE;
|
||||
Indicator.color_mode = MODE_COLORS_NONE;
|
||||
modes.push_back(Indicator);
|
||||
|
||||
mode Off;
|
||||
Off.name = "Turn Off";
|
||||
Off.value = CM_MM_MODE_OFF;
|
||||
Off.flags = MODE_FLAG_MANUAL_SAVE;
|
||||
Off.color_mode = MODE_COLORS_NONE;
|
||||
modes.push_back(Off);
|
||||
|
||||
uint16_t pid = controller->GetProductID();
|
||||
|
||||
if(pid == 0x0065 || pid == 0x0097)
|
||||
{
|
||||
leds_count = 3;
|
||||
}
|
||||
else
|
||||
{
|
||||
leds_count = 2;
|
||||
}
|
||||
|
||||
Init_Controller(); //Only processed on first run
|
||||
SetupZones();
|
||||
|
||||
uint8_t temp_mode = controller->GetMode();
|
||||
|
||||
for(std::size_t mode_index = 0; mode_index < modes.size(); mode_index++)
|
||||
{
|
||||
if(modes[mode_index].value == temp_mode)
|
||||
{
|
||||
active_mode = mode_index;
|
||||
break;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
if(modes[active_mode].color_mode == MODE_COLORS_MODE_SPECIFIC)
|
||||
{
|
||||
modes[active_mode].colors[0] = ToRGBColor(controller->GetLedRed(),controller->GetLedGreen(),controller->GetLedBlue());
|
||||
}
|
||||
|
||||
|
||||
if(pid == 0x0065 || pid == 0x0097)
|
||||
{
|
||||
colors[0] = controller->GetWheelColour();
|
||||
colors[1] = controller->GetButtonsColour();
|
||||
colors[2] = controller->GetLogoColour();
|
||||
}
|
||||
else
|
||||
{
|
||||
colors[0] = controller->GetWheelColour();
|
||||
colors[1] = controller->GetLogoColour();
|
||||
}
|
||||
}
|
||||
|
||||
RGBController_CMMMController::~RGBController_CMMMController()
|
||||
{
|
||||
delete controller;
|
||||
}
|
||||
|
||||
void RGBController_CMMMController::Init_Controller()
|
||||
{
|
||||
zone mouse_zone;
|
||||
mouse_zone.name = name;
|
||||
mouse_zone.type = ZONE_TYPE_LINEAR;
|
||||
mouse_zone.leds_min = leds_count;
|
||||
mouse_zone.leds_max = leds_count;
|
||||
mouse_zone.leds_count = leds_count;
|
||||
mouse_zone.matrix_map = NULL;
|
||||
zones.push_back(mouse_zone);
|
||||
|
||||
int value = 0;
|
||||
uint16_t pid = controller->GetProductID();
|
||||
|
||||
led wheel_led;
|
||||
wheel_led.name = "Scroll Wheel";
|
||||
wheel_led.value = value;
|
||||
leds.push_back(wheel_led);
|
||||
|
||||
value++;
|
||||
|
||||
if(pid == 0x0065 || pid == 0x0097)
|
||||
{
|
||||
led buttons_led;
|
||||
buttons_led.name = "Buttons";
|
||||
buttons_led.value = value;
|
||||
leds.push_back(buttons_led);
|
||||
value++;
|
||||
}
|
||||
|
||||
led logo_led;
|
||||
logo_led.name = "Logo";
|
||||
logo_led.value = value;
|
||||
leds.push_back(logo_led);
|
||||
}
|
||||
|
||||
void RGBController_CMMMController::SetupZones()
|
||||
{
|
||||
SetupColors();
|
||||
}
|
||||
|
||||
void RGBController_CMMMController::ResizeZone(int /*zone*/, int /*new_size*/)
|
||||
{
|
||||
/*---------------------------------------------------------*\
|
||||
| This device does not support resizing zones |
|
||||
\*---------------------------------------------------------*/
|
||||
}
|
||||
|
||||
void RGBController_CMMMController::DeviceUpdateLEDs()
|
||||
{
|
||||
int value = 0;
|
||||
uint16_t pid = controller->GetProductID();
|
||||
|
||||
RGBColor wheel = applyBrightness(colors[value], modes[active_mode].brightness);
|
||||
RGBColor buttons = ToRGBColor(0, 0, 0);
|
||||
value++;
|
||||
|
||||
if(pid == 0x0065 || pid == 0x0097)
|
||||
{
|
||||
buttons = applyBrightness(colors[value], modes[active_mode].brightness);
|
||||
value++;
|
||||
}
|
||||
|
||||
RGBColor logo = applyBrightness(colors[value], modes[active_mode].brightness);
|
||||
|
||||
controller->SetLedsDirect(wheel, buttons, logo);
|
||||
}
|
||||
|
||||
void RGBController_CMMMController::UpdateZoneLEDs(int /*zone*/)
|
||||
{
|
||||
DeviceUpdateLEDs();
|
||||
}
|
||||
|
||||
void RGBController_CMMMController::UpdateSingleLED(int /*led*/)
|
||||
{
|
||||
DeviceUpdateLEDs();
|
||||
}
|
||||
|
||||
void RGBController_CMMMController::SetCustomMode()
|
||||
{
|
||||
for(std::size_t mode_index = 0; mode_index < modes.size(); mode_index++)
|
||||
{
|
||||
if(modes[mode_index].value == CM_MM_MODE_CUSTOM)
|
||||
{
|
||||
active_mode = mode_index;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void RGBController_CMMMController::DeviceUpdateMode()
|
||||
{
|
||||
RGBColor mode_one = 0;
|
||||
RGBColor mode_two = 0;
|
||||
|
||||
if(modes[active_mode].value != CM_MM_MODE_CUSTOM)
|
||||
{
|
||||
if(modes[active_mode].color_mode == MODE_COLORS_MODE_SPECIFIC )
|
||||
{
|
||||
mode_one = modes[active_mode].colors[0];
|
||||
|
||||
if(modes[active_mode].colors.size() > 1)
|
||||
{
|
||||
mode_two = modes[active_mode].colors[1];
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
if(modes[active_mode].value == CM_MM_MODE_STARS)
|
||||
{
|
||||
controller->SendUpdate(modes[active_mode].value, modes[active_mode].speed, mode_one, mode_two, modes[active_mode].brightness);
|
||||
}
|
||||
else
|
||||
{
|
||||
controller->SendUpdate(modes[active_mode].value, modes[active_mode].speed, mode_one, modes[active_mode].brightness);
|
||||
}
|
||||
}
|
||||
|
||||
void RGBController_CMMMController::DeviceSaveMode()
|
||||
{
|
||||
DeviceUpdateMode();
|
||||
controller->SendSavePacket();
|
||||
}
|
||||
@@ -0,0 +1,43 @@
|
||||
/*-------------------------------------------------------------------*\
|
||||
| RGBController_CMMMController.h |
|
||||
| |
|
||||
| Driver for Coolermaster MaterMouse Controller |
|
||||
| |
|
||||
| Chris M (Dr_No) 14th Feb 2021 - MM711 Base |
|
||||
| Dracrius 12th Mar 2022 |
|
||||
| |
|
||||
\*-------------------------------------------------------------------*/
|
||||
|
||||
#pragma once
|
||||
#include "RGBController.h"
|
||||
#include "CMMMController.h"
|
||||
#include <vector>
|
||||
|
||||
#define CM_MM_ARGB_BRIGHTNESS_MIN 0x00
|
||||
#define CM_MM_ARGB_BRIGHTNESS_MAX_DEFAULT 0xFF
|
||||
#define CM_MM_ARGB_BRIGHTNESS_MAX_SPECTRUM 0x7F
|
||||
|
||||
class RGBController_CMMMController : public RGBController
|
||||
{
|
||||
public:
|
||||
RGBController_CMMMController(CMMMController* controller_ptr);
|
||||
~RGBController_CMMMController();
|
||||
|
||||
void SetupZones();
|
||||
void ResizeZone(int zone, int new_size);
|
||||
|
||||
void DeviceUpdateLEDs();
|
||||
void UpdateZoneLEDs(int zone);
|
||||
void UpdateSingleLED(int led);
|
||||
|
||||
void SetCustomMode();
|
||||
void DeviceUpdateMode();
|
||||
void DeviceSaveMode();
|
||||
private:
|
||||
void Init_Controller();
|
||||
int GetDeviceMode();
|
||||
|
||||
int leds_count;
|
||||
|
||||
CMMMController* controller;
|
||||
};
|
||||
@@ -1,168 +1,183 @@
|
||||
/*-------------------------------------------------------------------*\
|
||||
| RGBController_CMMP750Controller.cpp |
|
||||
| |
|
||||
| Driver for Coolermaster MP750 mousepad |
|
||||
| |
|
||||
| Chris M (Dr_No) 18th Apr 2020 |
|
||||
| |
|
||||
\*-------------------------------------------------------------------*/
|
||||
|
||||
#include "RGBController_CMMP750Controller.h"
|
||||
|
||||
RGBController_CMMP750Controller::RGBController_CMMP750Controller(CMMP750Controller* cmmp_ptr)
|
||||
{
|
||||
cmmp750 = cmmp_ptr;
|
||||
unsigned char speed = cmmp750->GetLedSpeed();
|
||||
|
||||
name = cmmp750->GetDeviceName();
|
||||
vendor = "Cooler Master";
|
||||
type = DEVICE_TYPE_MOUSEMAT;
|
||||
description = cmmp750->GetDeviceName();
|
||||
version = "1.0";
|
||||
serial = cmmp750->GetSerial();
|
||||
location = cmmp750->GetLocation();
|
||||
|
||||
mode Static;
|
||||
Static.name = "Static";
|
||||
Static.value = CM_MP750_MODE_STATIC;
|
||||
Static.flags = MODE_FLAG_HAS_PER_LED_COLOR;
|
||||
Static.color_mode = MODE_COLORS_PER_LED;
|
||||
modes.push_back(Static);
|
||||
|
||||
mode Blink;
|
||||
Blink.name = "Blink";
|
||||
Blink.value = CM_MP750_MODE_BLINK;
|
||||
Blink.flags = MODE_FLAG_HAS_SPEED | MODE_FLAG_HAS_PER_LED_COLOR;
|
||||
Blink.speed_min = MP750_SPEED_SLOWEST;
|
||||
Blink.speed_max = MP750_SPEED_FASTEST;
|
||||
Blink.color_mode = MODE_COLORS_PER_LED;
|
||||
Blink.speed = speed;
|
||||
modes.push_back(Blink);
|
||||
|
||||
mode Breathing;
|
||||
Breathing.name = "Breathing";
|
||||
Breathing.value = CM_MP750_MODE_BREATHING;
|
||||
Breathing.flags = MODE_FLAG_HAS_SPEED | MODE_FLAG_HAS_PER_LED_COLOR;
|
||||
Breathing.speed_min = MP750_SPEED_SLOWEST;
|
||||
Breathing.speed_max = MP750_SPEED_FASTEST;
|
||||
Breathing.color_mode = MODE_COLORS_PER_LED;
|
||||
Breathing.speed = speed;
|
||||
modes.push_back(Breathing);
|
||||
|
||||
mode ColorCycle;
|
||||
ColorCycle.name = "Color Cycle";
|
||||
ColorCycle.value = CM_MP750_MODE_COLOR_CYCLE;
|
||||
ColorCycle.flags = MODE_FLAG_HAS_SPEED;
|
||||
ColorCycle.speed_min = MP750_SPEED_SLOWEST;
|
||||
ColorCycle.speed_max = MP750_SPEED_FASTEST;
|
||||
ColorCycle.color_mode = MODE_COLORS_NONE;
|
||||
ColorCycle.speed = speed;
|
||||
modes.push_back(ColorCycle);
|
||||
|
||||
mode BreathCycle;
|
||||
BreathCycle.name = "Breath Cycle";
|
||||
BreathCycle.value = CM_MP750_MODE_BREATH_CYCLE;
|
||||
BreathCycle.flags = MODE_FLAG_HAS_SPEED;
|
||||
BreathCycle.speed_min = MP750_SPEED_SLOWEST;
|
||||
BreathCycle.speed_max = MP750_SPEED_FASTEST;
|
||||
BreathCycle.color_mode = MODE_COLORS_NONE;
|
||||
BreathCycle.speed = speed;
|
||||
modes.push_back(BreathCycle);
|
||||
|
||||
mode Off;
|
||||
Off.name = "Turn Off";
|
||||
Off.value = CM_MP750_MODE_OFF;
|
||||
Off.color_mode = MODE_COLORS_NONE;
|
||||
modes.push_back(Off);
|
||||
|
||||
SetupZones();
|
||||
active_mode = GetDeviceMode();
|
||||
}
|
||||
|
||||
RGBController_CMMP750Controller::~RGBController_CMMP750Controller()
|
||||
{
|
||||
delete cmmp750;
|
||||
}
|
||||
|
||||
int RGBController_CMMP750Controller::GetDeviceMode()
|
||||
{
|
||||
int temp_mode = cmmp750->GetMode();
|
||||
for(unsigned int i = 0; i < modes.size(); i++)
|
||||
{
|
||||
if (temp_mode == modes[i].value)
|
||||
{
|
||||
return i;
|
||||
}
|
||||
}
|
||||
//If not found return 0
|
||||
return 0;
|
||||
}
|
||||
|
||||
void RGBController_CMMP750Controller::SetupZones()
|
||||
{
|
||||
zone MP_zone;
|
||||
MP_zone.name = "Mousepad";
|
||||
MP_zone.type = ZONE_TYPE_SINGLE;
|
||||
MP_zone.leds_min = 1;
|
||||
MP_zone.leds_max = 1;
|
||||
MP_zone.leds_count = 1;
|
||||
MP_zone.matrix_map = NULL;
|
||||
zones.push_back(MP_zone);
|
||||
|
||||
led MP_led;
|
||||
MP_led.name = "Mousepad LED";
|
||||
leds.push_back(MP_led);
|
||||
|
||||
SetupColors();
|
||||
|
||||
/*---------------------------------------------------------*\
|
||||
| Initialize colors for each LED |
|
||||
\*---------------------------------------------------------*/
|
||||
for(std::size_t led_idx = 0; led_idx < leds.size(); led_idx++)
|
||||
{
|
||||
unsigned char red = cmmp750->GetLedRed();
|
||||
unsigned char grn = cmmp750->GetLedGreen();
|
||||
unsigned char blu = cmmp750->GetLedBlue();
|
||||
|
||||
colors[led_idx] = ToRGBColor(red, grn, blu);
|
||||
}
|
||||
}
|
||||
|
||||
void RGBController_CMMP750Controller::ResizeZone(int /*zone*/, int /*new_size*/)
|
||||
{
|
||||
/*---------------------------------------------------------*\
|
||||
| This device does not support resizing zones |
|
||||
\*---------------------------------------------------------*/
|
||||
}
|
||||
|
||||
void RGBController_CMMP750Controller::DeviceUpdateLEDs()
|
||||
{
|
||||
unsigned char red = RGBGetRValue(colors[0]);
|
||||
unsigned char grn = RGBGetGValue(colors[0]);
|
||||
unsigned char blu = RGBGetBValue(colors[0]);
|
||||
cmmp750->SetColor(red, grn, blu);
|
||||
}
|
||||
|
||||
void RGBController_CMMP750Controller::UpdateZoneLEDs(int zone)
|
||||
{
|
||||
RGBColor color = colors[zone];
|
||||
unsigned char red = RGBGetRValue(color);
|
||||
unsigned char grn = RGBGetGValue(color);
|
||||
unsigned char blu = RGBGetBValue(color);
|
||||
cmmp750->SetColor(red, grn, blu);
|
||||
}
|
||||
|
||||
void RGBController_CMMP750Controller::UpdateSingleLED(int led)
|
||||
{
|
||||
UpdateZoneLEDs(led);
|
||||
}
|
||||
|
||||
void RGBController_CMMP750Controller::SetCustomMode()
|
||||
{
|
||||
active_mode = 0;
|
||||
}
|
||||
|
||||
void RGBController_CMMP750Controller::DeviceUpdateMode()
|
||||
{
|
||||
cmmp750->SetMode(modes[active_mode].value, modes[active_mode].speed);
|
||||
}
|
||||
/*-------------------------------------------------------------------*\
|
||||
| RGBController_CMMP750Controller.cpp |
|
||||
| |
|
||||
| Driver for Coolermaster MP750 mousepad |
|
||||
| |
|
||||
| Chris M (Dr_No) 18th Apr 2020 |
|
||||
| |
|
||||
\*-------------------------------------------------------------------*/
|
||||
|
||||
#include "RGBController_CMMP750Controller.h"
|
||||
|
||||
/**------------------------------------------------------------------*\
|
||||
@name Coolermaster Mouse Pad
|
||||
@type USB
|
||||
@save :warning:
|
||||
@direct :x:
|
||||
@effects :white_check_mark:
|
||||
@detectors DetectCoolerMasterMousemats
|
||||
@comment
|
||||
\*-------------------------------------------------------------------*/
|
||||
|
||||
RGBController_CMMP750Controller::RGBController_CMMP750Controller(CMMP750Controller* controller_ptr)
|
||||
{
|
||||
controller = controller_ptr;
|
||||
unsigned char speed = controller->GetLedSpeed();
|
||||
|
||||
name = controller->GetDeviceName();
|
||||
vendor = "Cooler Master";
|
||||
type = DEVICE_TYPE_MOUSEMAT;
|
||||
description = controller->GetDeviceName();
|
||||
serial = controller->GetSerial();
|
||||
location = controller->GetLocation();
|
||||
|
||||
mode Static;
|
||||
Static.name = "Static";
|
||||
Static.value = CM_MP750_MODE_STATIC;
|
||||
Static.flags = MODE_FLAG_HAS_PER_LED_COLOR;
|
||||
Static.color_mode = MODE_COLORS_PER_LED;
|
||||
modes.push_back(Static);
|
||||
|
||||
mode Blink;
|
||||
Blink.name = "Blink";
|
||||
Blink.value = CM_MP750_MODE_BLINK;
|
||||
Blink.flags = MODE_FLAG_HAS_SPEED | MODE_FLAG_HAS_PER_LED_COLOR;
|
||||
Blink.speed_min = MP750_SPEED_SLOWEST;
|
||||
Blink.speed_max = MP750_SPEED_FASTEST;
|
||||
Blink.color_mode = MODE_COLORS_PER_LED;
|
||||
Blink.speed = speed;
|
||||
modes.push_back(Blink);
|
||||
|
||||
mode Breathing;
|
||||
Breathing.name = "Breathing";
|
||||
Breathing.value = CM_MP750_MODE_BREATHING;
|
||||
Breathing.flags = MODE_FLAG_HAS_SPEED | MODE_FLAG_HAS_PER_LED_COLOR;
|
||||
Breathing.speed_min = MP750_SPEED_SLOWEST;
|
||||
Breathing.speed_max = MP750_SPEED_FASTEST;
|
||||
Breathing.color_mode = MODE_COLORS_PER_LED;
|
||||
Breathing.speed = speed;
|
||||
modes.push_back(Breathing);
|
||||
|
||||
mode ColorCycle;
|
||||
ColorCycle.name = "Color Cycle";
|
||||
ColorCycle.value = CM_MP750_MODE_COLOR_CYCLE;
|
||||
ColorCycle.flags = MODE_FLAG_HAS_SPEED;
|
||||
ColorCycle.speed_min = MP750_SPEED_SLOWEST;
|
||||
ColorCycle.speed_max = MP750_SPEED_FASTEST;
|
||||
ColorCycle.color_mode = MODE_COLORS_NONE;
|
||||
ColorCycle.speed = speed;
|
||||
modes.push_back(ColorCycle);
|
||||
|
||||
mode BreathCycle;
|
||||
BreathCycle.name = "Breath Cycle";
|
||||
BreathCycle.value = CM_MP750_MODE_BREATH_CYCLE;
|
||||
BreathCycle.flags = MODE_FLAG_HAS_SPEED;
|
||||
BreathCycle.speed_min = MP750_SPEED_SLOWEST;
|
||||
BreathCycle.speed_max = MP750_SPEED_FASTEST;
|
||||
BreathCycle.color_mode = MODE_COLORS_NONE;
|
||||
BreathCycle.speed = speed;
|
||||
modes.push_back(BreathCycle);
|
||||
|
||||
mode Off;
|
||||
Off.name = "Turn Off";
|
||||
Off.value = CM_MP750_MODE_OFF;
|
||||
Off.color_mode = MODE_COLORS_NONE;
|
||||
modes.push_back(Off);
|
||||
|
||||
SetupZones();
|
||||
active_mode = GetDeviceMode();
|
||||
}
|
||||
|
||||
RGBController_CMMP750Controller::~RGBController_CMMP750Controller()
|
||||
{
|
||||
delete controller;
|
||||
}
|
||||
|
||||
int RGBController_CMMP750Controller::GetDeviceMode()
|
||||
{
|
||||
int temp_mode = controller->GetMode();
|
||||
|
||||
for(unsigned int i = 0; i < modes.size(); i++)
|
||||
{
|
||||
if (temp_mode == modes[i].value)
|
||||
{
|
||||
return i;
|
||||
}
|
||||
}
|
||||
|
||||
/*---------------------------------------------------------*\
|
||||
| If not found return 0 |
|
||||
\*---------------------------------------------------------*/
|
||||
return 0;
|
||||
}
|
||||
|
||||
void RGBController_CMMP750Controller::SetupZones()
|
||||
{
|
||||
zone MP_zone;
|
||||
MP_zone.name = "Mousepad";
|
||||
MP_zone.type = ZONE_TYPE_SINGLE;
|
||||
MP_zone.leds_min = 1;
|
||||
MP_zone.leds_max = 1;
|
||||
MP_zone.leds_count = 1;
|
||||
MP_zone.matrix_map = NULL;
|
||||
zones.push_back(MP_zone);
|
||||
|
||||
led MP_led;
|
||||
MP_led.name = "Mousepad LED";
|
||||
leds.push_back(MP_led);
|
||||
|
||||
SetupColors();
|
||||
|
||||
/*---------------------------------------------------------*\
|
||||
| Initialize colors for each LED |
|
||||
\*---------------------------------------------------------*/
|
||||
for(std::size_t led_idx = 0; led_idx < leds.size(); led_idx++)
|
||||
{
|
||||
unsigned char red = controller->GetLedRed();
|
||||
unsigned char grn = controller->GetLedGreen();
|
||||
unsigned char blu = controller->GetLedBlue();
|
||||
|
||||
colors[led_idx] = ToRGBColor(red, grn, blu);
|
||||
}
|
||||
}
|
||||
|
||||
void RGBController_CMMP750Controller::ResizeZone(int /*zone*/, int /*new_size*/)
|
||||
{
|
||||
/*---------------------------------------------------------*\
|
||||
| This device does not support resizing zones |
|
||||
\*---------------------------------------------------------*/
|
||||
}
|
||||
|
||||
void RGBController_CMMP750Controller::DeviceUpdateLEDs()
|
||||
{
|
||||
unsigned char red = RGBGetRValue(colors[0]);
|
||||
unsigned char grn = RGBGetGValue(colors[0]);
|
||||
unsigned char blu = RGBGetBValue(colors[0]);
|
||||
|
||||
controller->SetColor(red, grn, blu);
|
||||
}
|
||||
|
||||
void RGBController_CMMP750Controller::UpdateZoneLEDs(int zone)
|
||||
{
|
||||
RGBColor color = colors[zone];
|
||||
unsigned char red = RGBGetRValue(color);
|
||||
unsigned char grn = RGBGetGValue(color);
|
||||
unsigned char blu = RGBGetBValue(color);
|
||||
|
||||
controller->SetColor(red, grn, blu);
|
||||
}
|
||||
|
||||
void RGBController_CMMP750Controller::UpdateSingleLED(int led)
|
||||
{
|
||||
UpdateZoneLEDs(led);
|
||||
}
|
||||
|
||||
void RGBController_CMMP750Controller::SetCustomMode()
|
||||
{
|
||||
active_mode = 0;
|
||||
}
|
||||
|
||||
void RGBController_CMMP750Controller::DeviceUpdateMode()
|
||||
{
|
||||
controller->SetMode(modes[active_mode].value, modes[active_mode].speed);
|
||||
}
|
||||
|
||||
@@ -1,33 +1,33 @@
|
||||
/*-------------------------------------------------------------------*\
|
||||
| RGBController_CMMP750Controller.h |
|
||||
| |
|
||||
| Driver for Coolermaster MP750 mousepad |
|
||||
| |
|
||||
| Chris M (Dr_No) 18th Apr 2020 |
|
||||
| |
|
||||
\*-------------------------------------------------------------------*/
|
||||
|
||||
#pragma once
|
||||
#include "RGBController.h"
|
||||
#include "CMMP750Controller.h"
|
||||
|
||||
class RGBController_CMMP750Controller : public RGBController
|
||||
{
|
||||
public:
|
||||
RGBController_CMMP750Controller(CMMP750Controller* cmmp_ptr);
|
||||
~RGBController_CMMP750Controller();
|
||||
|
||||
void SetupZones();
|
||||
void ResizeZone(int zone, int new_size);
|
||||
|
||||
void DeviceUpdateLEDs();
|
||||
void UpdateZoneLEDs(int zone);
|
||||
void UpdateSingleLED(int led);
|
||||
|
||||
void SetCustomMode();
|
||||
void DeviceUpdateMode();
|
||||
private:
|
||||
CMMP750Controller* cmmp750;
|
||||
|
||||
int GetDeviceMode();
|
||||
};
|
||||
/*-------------------------------------------------------------------*\
|
||||
| RGBController_CMMP750Controller.h |
|
||||
| |
|
||||
| Driver for Coolermaster MP750 mousepad |
|
||||
| |
|
||||
| Chris M (Dr_No) 18th Apr 2020 |
|
||||
| |
|
||||
\*-------------------------------------------------------------------*/
|
||||
|
||||
#pragma once
|
||||
#include "RGBController.h"
|
||||
#include "CMMP750Controller.h"
|
||||
|
||||
class RGBController_CMMP750Controller : public RGBController
|
||||
{
|
||||
public:
|
||||
RGBController_CMMP750Controller(CMMP750Controller* controller_ptr);
|
||||
~RGBController_CMMP750Controller();
|
||||
|
||||
void SetupZones();
|
||||
void ResizeZone(int zone, int new_size);
|
||||
|
||||
void DeviceUpdateLEDs();
|
||||
void UpdateZoneLEDs(int zone);
|
||||
void UpdateSingleLED(int led);
|
||||
|
||||
void SetCustomMode();
|
||||
void DeviceUpdateMode();
|
||||
private:
|
||||
CMMP750Controller* controller;
|
||||
|
||||
int GetDeviceMode();
|
||||
};
|
||||
|
||||
@@ -8,18 +8,28 @@
|
||||
|
||||
#include "RGBController_CMR6000Controller.h"
|
||||
|
||||
RGBController_CMR6000Controller::RGBController_CMR6000Controller(CMR6000Controller* cmmp_ptr)
|
||||
/**------------------------------------------------------------------*\
|
||||
@name AMD Radeon 6000
|
||||
@type USB
|
||||
@save :x:
|
||||
@direct :white_check_mark:
|
||||
@effects :white_check_mark:
|
||||
@detectors DetectCoolerMasterGPU
|
||||
@comment Similar to the Wraith Spire before it the AMD branded Radeon
|
||||
GPUs have an RGB controller provided by Coolermaster.
|
||||
\*-------------------------------------------------------------------*/
|
||||
|
||||
RGBController_CMR6000Controller::RGBController_CMR6000Controller(CMR6000Controller* controller_ptr)
|
||||
{
|
||||
cmr6000 = cmmp_ptr;
|
||||
unsigned char speed = cmr6000->GetLedSpeed();
|
||||
controller = controller_ptr;
|
||||
unsigned char speed = controller->GetLedSpeed();
|
||||
|
||||
name = "AMD RX 6xxx GPU";
|
||||
vendor = "Cooler Master";
|
||||
type = DEVICE_TYPE_GPU;
|
||||
description = cmr6000->GetDeviceName();
|
||||
version = "1.0";
|
||||
serial = cmr6000->GetSerial();
|
||||
location = cmr6000->GetLocation();
|
||||
description = controller->GetDeviceName();
|
||||
serial = controller->GetSerial();
|
||||
location = controller->GetLocation();
|
||||
|
||||
mode Off;
|
||||
Off.name = "Off";
|
||||
@@ -29,12 +39,12 @@ RGBController_CMR6000Controller::RGBController_CMR6000Controller(CMR6000Controll
|
||||
modes.push_back(Off);
|
||||
|
||||
mode Direct;
|
||||
Direct.name = "Direct";
|
||||
Direct.value = CM_MR6000_MODE_DIRECT;
|
||||
Direct.flags = MODE_FLAG_HAS_PER_LED_COLOR| MODE_FLAG_HAS_BRIGHTNESS;
|
||||
Direct.color_mode = MODE_COLORS_PER_LED;
|
||||
Direct.colors_min = 1;
|
||||
Direct.colors_max = 1;
|
||||
Direct.name = "Direct";
|
||||
Direct.value = CM_MR6000_MODE_DIRECT;
|
||||
Direct.flags = MODE_FLAG_HAS_PER_LED_COLOR| MODE_FLAG_HAS_BRIGHTNESS;
|
||||
Direct.color_mode = MODE_COLORS_PER_LED;
|
||||
Direct.colors_min = 1;
|
||||
Direct.colors_max = 1;
|
||||
Direct.colors.resize(1);
|
||||
Direct.brightness_min = 0x00;
|
||||
Direct.brightness_max = 0xFF;
|
||||
@@ -75,23 +85,23 @@ RGBController_CMR6000Controller::RGBController_CMR6000Controller(CMR6000Controll
|
||||
|
||||
RGBController_CMR6000Controller::~RGBController_CMR6000Controller()
|
||||
{
|
||||
delete cmr6000;
|
||||
delete controller;
|
||||
}
|
||||
|
||||
void RGBController_CMR6000Controller::SetupZones()
|
||||
{
|
||||
zone GP_zone;
|
||||
GP_zone.name = "GPU";
|
||||
GP_zone.type = ZONE_TYPE_SINGLE;
|
||||
GP_zone.leds_min = 1;
|
||||
GP_zone.leds_max = 1;
|
||||
GP_zone.leds_count = 1;
|
||||
GP_zone.matrix_map = NULL;
|
||||
GP_zone.name = "GPU";
|
||||
GP_zone.type = ZONE_TYPE_SINGLE;
|
||||
GP_zone.leds_min = 1;
|
||||
GP_zone.leds_max = 1;
|
||||
GP_zone.leds_count = 1;
|
||||
GP_zone.matrix_map = NULL;
|
||||
zones.push_back(GP_zone);
|
||||
|
||||
led GP_led;
|
||||
GP_led.name = "Logo";
|
||||
GP_led.value = 0;
|
||||
GP_led.name = "Logo";
|
||||
GP_led.value = 0;
|
||||
leds.push_back(GP_led);
|
||||
|
||||
SetupColors();
|
||||
@@ -121,7 +131,7 @@ void RGBController_CMR6000Controller::DeviceUpdateLEDs()
|
||||
unsigned char rnd = (modes[active_mode].color_mode == MODE_COLORS_RANDOM) ? 0xA0 : 0x20;
|
||||
unsigned char bri = (modes[active_mode].flags & MODE_FLAG_HAS_BRIGHTNESS) ? modes[active_mode].brightness : 0xFF;
|
||||
|
||||
cmr6000->SetMode(modes[active_mode].value, modes[active_mode].speed, red, grn, blu, rnd, bri);
|
||||
controller->SetMode(modes[active_mode].value, modes[active_mode].speed, red, grn, blu, rnd, bri);
|
||||
}
|
||||
|
||||
void RGBController_CMR6000Controller::UpdateZoneLEDs(int /*zone*/)
|
||||
|
||||
@@ -1,32 +1,32 @@
|
||||
/*-------------------------------------------------------------------*\
|
||||
| RGBController_CMR6000Controller.h |
|
||||
| |
|
||||
| Driver for Coolermaster based AMD Radeon GPU (6000 series) |
|
||||
| |
|
||||
| Eric S (edbgon) 2nd Feb 2021 |
|
||||
\*-------------------------------------------------------------------*/
|
||||
|
||||
#pragma once
|
||||
#include "RGBController.h"
|
||||
#include "CMR6000Controller.h"
|
||||
|
||||
class RGBController_CMR6000Controller : public RGBController
|
||||
{
|
||||
public:
|
||||
RGBController_CMR6000Controller(CMR6000Controller* cmmp_ptr);
|
||||
~RGBController_CMR6000Controller();
|
||||
|
||||
void SetupZones();
|
||||
void ResizeZone(int zone, int new_size);
|
||||
|
||||
void DeviceUpdateLEDs();
|
||||
void UpdateZoneLEDs(int zone);
|
||||
void UpdateSingleLED(int led);
|
||||
|
||||
void SetCustomMode();
|
||||
void DeviceUpdateMode();
|
||||
private:
|
||||
CMR6000Controller* cmr6000;
|
||||
|
||||
int GetDeviceMode();
|
||||
};
|
||||
/*-------------------------------------------------------------------*\
|
||||
| RGBController_CMR6000Controller.h |
|
||||
| |
|
||||
| Driver for Coolermaster based AMD Radeon GPU (6000 series) |
|
||||
| |
|
||||
| Eric S (edbgon) 2nd Feb 2021 |
|
||||
\*-------------------------------------------------------------------*/
|
||||
|
||||
#pragma once
|
||||
#include "RGBController.h"
|
||||
#include "CMR6000Controller.h"
|
||||
|
||||
class RGBController_CMR6000Controller : public RGBController
|
||||
{
|
||||
public:
|
||||
RGBController_CMR6000Controller(CMR6000Controller* controller_ptr);
|
||||
~RGBController_CMR6000Controller();
|
||||
|
||||
void SetupZones();
|
||||
void ResizeZone(int zone, int new_size);
|
||||
|
||||
void DeviceUpdateLEDs();
|
||||
void UpdateZoneLEDs(int zone);
|
||||
void UpdateSingleLED(int led);
|
||||
|
||||
void SetCustomMode();
|
||||
void DeviceUpdateMode();
|
||||
private:
|
||||
CMR6000Controller* controller;
|
||||
|
||||
int GetDeviceMode();
|
||||
};
|
||||
|
||||
@@ -43,17 +43,26 @@
|
||||
| Single color for Star |
|
||||
\*-----------------------------------------------------------------------------------------------------------------------------------------*/
|
||||
|
||||
RGBController_CMRGBController::RGBController_CMRGBController(CMRGBController *cmrgb_ptr)
|
||||
/**------------------------------------------------------------------*\
|
||||
@name Coolermaster RGB
|
||||
@type USB
|
||||
@save :warning:
|
||||
@direct :x:
|
||||
@effects :white_check_mark:
|
||||
@detectors DetectCoolerMasterRGB
|
||||
@comment This is a 12V analogue RGB controller only.
|
||||
\*-------------------------------------------------------------------*/
|
||||
|
||||
RGBController_CMRGBController::RGBController_CMRGBController(CMRGBController* controller_ptr)
|
||||
{
|
||||
cmrgb = cmrgb_ptr;
|
||||
controller = controller_ptr;
|
||||
|
||||
name = "Cooler Master RGB Controller";
|
||||
vendor = "Cooler Master";
|
||||
type = DEVICE_TYPE_LEDSTRIP;
|
||||
description = cmrgb->GetDeviceName();
|
||||
version = "";
|
||||
serial = cmrgb->GetSerial();
|
||||
location = cmrgb->GetLocation();
|
||||
description = controller->GetDeviceName();
|
||||
serial = controller->GetSerial();
|
||||
location = controller->GetLocation();
|
||||
|
||||
mode Static;
|
||||
Static.name = "Static";
|
||||
@@ -128,10 +137,10 @@ RGBController_CMRGBController::RGBController_CMRGBController(CMRGBController *cm
|
||||
modes.push_back(Multiple);
|
||||
|
||||
mode Off;
|
||||
Off.name = "Off";
|
||||
Off.value = CM_RGBC_MODE_OFF;
|
||||
Off.color_mode = MODE_COLORS_NONE;
|
||||
Off.flags = 0;
|
||||
Off.name = "Off";
|
||||
Off.value = CM_RGBC_MODE_OFF;
|
||||
Off.color_mode = MODE_COLORS_NONE;
|
||||
Off.flags = 0;
|
||||
modes.push_back(Off);
|
||||
|
||||
SetupZones();
|
||||
@@ -141,12 +150,12 @@ RGBController_CMRGBController::RGBController_CMRGBController(CMRGBController *cm
|
||||
|
||||
RGBController_CMRGBController::~RGBController_CMRGBController()
|
||||
{
|
||||
delete cmrgb;
|
||||
delete controller;
|
||||
}
|
||||
|
||||
void RGBController_CMRGBController::ReadAllModeConfigsFromDevice()
|
||||
{
|
||||
int device_mode = cmrgb->GetMode();
|
||||
int device_mode = controller->GetMode();
|
||||
|
||||
for(std::size_t mode_idx = 0; mode_idx < modes.size(); mode_idx++)
|
||||
{
|
||||
@@ -161,7 +170,7 @@ void RGBController_CMRGBController::ReadAllModeConfigsFromDevice()
|
||||
continue;
|
||||
}
|
||||
|
||||
cmrgb->ReadModeConfig(modes[mode_idx].value);
|
||||
controller->ReadModeConfig(modes[mode_idx].value);
|
||||
LoadConfigFromDeviceController(mode_idx);
|
||||
}
|
||||
|
||||
@@ -171,7 +180,7 @@ void RGBController_CMRGBController::ReadAllModeConfigsFromDevice()
|
||||
\*---------------------------------------------------------*/
|
||||
if(active_mode != -1)
|
||||
{
|
||||
cmrgb->ReadModeConfig(modes[active_mode].value);
|
||||
controller->ReadModeConfig(modes[active_mode].value);
|
||||
LoadConfigFromDeviceController(active_mode);
|
||||
}
|
||||
}
|
||||
@@ -180,25 +189,25 @@ void RGBController_CMRGBController::LoadConfigFromDeviceController(int mode_idx)
|
||||
{
|
||||
for(std::size_t color_idx = 0; color_idx < modes[mode_idx].colors.size(); color_idx++)
|
||||
{
|
||||
modes[mode_idx].colors[0] = cmrgb->GetModeColor(color_idx);
|
||||
modes[mode_idx].colors[0] = controller->GetModeColor(color_idx);
|
||||
}
|
||||
|
||||
if(modes[mode_idx].flags & MODE_FLAG_HAS_PER_LED_COLOR)
|
||||
{
|
||||
for (std::size_t led_idx = 0; led_idx < leds.size(); led_idx++)
|
||||
{
|
||||
SetLED(led_idx, cmrgb->GetPortColor(led_idx));
|
||||
SetLED(led_idx, controller->GetPortColor(led_idx));
|
||||
}
|
||||
}
|
||||
|
||||
if(modes[mode_idx].flags & MODE_FLAG_HAS_SPEED)
|
||||
{
|
||||
modes[mode_idx].speed = cmrgb->GetSpeed();
|
||||
modes[mode_idx].speed = controller->GetSpeed();
|
||||
}
|
||||
|
||||
if(modes[mode_idx].flags & MODE_FLAG_HAS_BRIGHTNESS)
|
||||
{
|
||||
modes[active_mode].brightness = cmrgb->GetBrightness();
|
||||
modes[active_mode].brightness = controller->GetBrightness();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -223,8 +232,8 @@ void RGBController_CMRGBController::SetupZones()
|
||||
|
||||
for(int i = 1; i <= CM_RGBC_NUM_LEDS; i++)
|
||||
{
|
||||
led* new_led = new led();
|
||||
new_led->name = "LED " + std::to_string(i);
|
||||
led* new_led = new led();
|
||||
new_led->name = "LED " + std::to_string(i);
|
||||
leds.push_back(*new_led);
|
||||
}
|
||||
|
||||
@@ -246,7 +255,7 @@ void RGBController_CMRGBController::DeviceUpdateLEDs()
|
||||
|
||||
void RGBController_CMRGBController::UpdateZoneLEDs(int zone)
|
||||
{
|
||||
cmrgb->SetLedsDirect(zones[zone].colors[0], zones[zone].colors[1], zones[zone].colors[2], zones[zone].colors[3]);
|
||||
controller->SetLedsDirect(zones[zone].colors[0], zones[zone].colors[1], zones[zone].colors[2], zones[zone].colors[3]);
|
||||
}
|
||||
|
||||
void RGBController_CMRGBController::UpdateSingleLED(int /*led*/)
|
||||
@@ -270,5 +279,5 @@ void RGBController_CMRGBController::DeviceUpdateMode()
|
||||
RGBColor color_1 = (modes[active_mode].color_mode == MODE_COLORS_MODE_SPECIFIC) ? modes[active_mode].colors[0] : 0;
|
||||
RGBColor color_2 = (modes[active_mode].color_mode == MODE_COLORS_MODE_SPECIFIC && modes[active_mode].colors.size() > 1) ? modes[active_mode].colors[1] : 0;
|
||||
|
||||
cmrgb->SetMode(modes[active_mode].value, modes[active_mode].speed, modes[active_mode].brightness, color_1, color_2);
|
||||
controller->SetMode(modes[active_mode].value, modes[active_mode].speed, modes[active_mode].brightness, color_1, color_2);
|
||||
}
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
class RGBController_CMRGBController : public RGBController
|
||||
{
|
||||
public:
|
||||
RGBController_CMRGBController(CMRGBController* cmrgb_ptr);
|
||||
RGBController_CMRGBController(CMRGBController* controller_ptr);
|
||||
~RGBController_CMRGBController();
|
||||
|
||||
void SetupZones();
|
||||
@@ -29,7 +29,7 @@ public:
|
||||
void DeviceUpdateMode();
|
||||
|
||||
private:
|
||||
CMRGBController* cmrgb;
|
||||
CMRGBController* controller;
|
||||
void LoadConfigFromDeviceController(int device_mode);
|
||||
void ReadAllModeConfigsFromDevice();
|
||||
};
|
||||
|
||||
@@ -9,18 +9,43 @@
|
||||
|
||||
#include "RGBController_CMSmallARGBController.h"
|
||||
|
||||
RGBController_CMSmallARGBController::RGBController_CMSmallARGBController(CMSmallARGBController *cmargb_ptr)
|
||||
{
|
||||
cmargb = cmargb_ptr;
|
||||
unsigned char speed = cmargb->GetLedSpeed();
|
||||
/**------------------------------------------------------------------*\
|
||||
@name Coolermaster Small ARGB
|
||||
@type USB
|
||||
@save :warning:
|
||||
@direct :white_check_mark:
|
||||
@effects :white_check_mark:
|
||||
@detectors DetectCoolerMasterSmallARGB
|
||||
@comment The Coolermaster Small ARGB device supports `Direct` mode
|
||||
from firmware 0012 onwards. Check the serial number for the date
|
||||
"A202104052336" or newer.
|
||||
\*-------------------------------------------------------------------*/
|
||||
|
||||
name = small_argb_header_data[cmargb->GetZoneIndex()].name;
|
||||
RGBController_CMSmallARGBController::RGBController_CMSmallARGBController(CMSmallARGBController* controller_ptr)
|
||||
{
|
||||
controller = controller_ptr;
|
||||
unsigned char speed = controller->GetLedSpeed();
|
||||
|
||||
name = small_argb_header_data[controller->GetZoneIndex()].name;
|
||||
vendor = "Cooler Master";
|
||||
type = DEVICE_TYPE_LEDSTRIP;
|
||||
description = cmargb->GetDeviceName();
|
||||
description = controller->GetDeviceName();
|
||||
version = "2.0 for FW0012";
|
||||
serial = cmargb->GetSerial();
|
||||
location = cmargb->GetLocation();
|
||||
serial = controller->GetSerial();
|
||||
location = controller->GetLocation();
|
||||
|
||||
if(serial >= CM_SMALL_ARGB_FW0012)
|
||||
{
|
||||
mode Direct;
|
||||
Direct.name = "Direct";
|
||||
Direct.value = CM_SMALL_ARGB_MODE_DIRECT;
|
||||
Direct.flags = MODE_FLAG_HAS_PER_LED_COLOR | MODE_FLAG_HAS_BRIGHTNESS;
|
||||
Direct.brightness_min = 0;
|
||||
Direct.brightness_max = CM_SMALL_ARGB_BRIGHTNESS_MAX;
|
||||
Direct.brightness = CM_SMALL_ARGB_BRIGHTNESS_MAX;
|
||||
Direct.color_mode = MODE_COLORS_PER_LED;
|
||||
modes.push_back(Direct);
|
||||
}
|
||||
|
||||
mode Off;
|
||||
Off.name = "Turn Off";
|
||||
@@ -118,16 +143,6 @@ RGBController_CMSmallARGBController::RGBController_CMSmallARGBController(CMSmall
|
||||
Spectrum.speed = speed;
|
||||
modes.push_back(Spectrum);
|
||||
|
||||
mode Direct;
|
||||
Direct.name = "Direct";
|
||||
Direct.value = CM_SMALL_ARGB_MODE_DIRECT;
|
||||
Direct.flags = MODE_FLAG_HAS_PER_LED_COLOR | MODE_FLAG_HAS_BRIGHTNESS;
|
||||
Direct.brightness_min = 0;
|
||||
Direct.brightness_max = CM_SMALL_ARGB_BRIGHTNESS_MAX;
|
||||
Direct.brightness = CM_SMALL_ARGB_BRIGHTNESS_MAX;
|
||||
Direct.color_mode = MODE_COLORS_PER_LED;
|
||||
modes.push_back(Direct);
|
||||
|
||||
mode PassThru;
|
||||
PassThru.name = "Pass Thru";
|
||||
PassThru.value = CM_SMALL_ARGB_MODE_PASSTHRU;
|
||||
@@ -137,34 +152,38 @@ RGBController_CMSmallARGBController::RGBController_CMSmallARGBController(CMSmall
|
||||
Init_Controller(); //Only processed on first run
|
||||
SetupZones();
|
||||
|
||||
int temp_mode = cmargb->GetMode();
|
||||
int temp_mode = controller->GetMode();
|
||||
|
||||
for(std::size_t mode_idx = 0; mode_idx < modes.size() ; mode_idx++)
|
||||
{
|
||||
if (temp_mode == modes[mode_idx].value)
|
||||
{
|
||||
active_mode = mode_idx;
|
||||
active_mode = mode_idx;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (modes[active_mode].flags & MODE_FLAG_HAS_MODE_SPECIFIC_COLOR)
|
||||
{
|
||||
modes[active_mode].colors[0] = ToRGBColor(cmargb->GetLedRed(), cmargb->GetLedGreen(), cmargb->GetLedBlue());
|
||||
modes[active_mode].colors[0] = ToRGBColor(controller->GetLedRed(), controller->GetLedGreen(), controller->GetLedBlue());
|
||||
}
|
||||
modes[active_mode].color_mode = (cmargb->GetRandomColours()) ? MODE_COLORS_RANDOM : MODE_COLORS_MODE_SPECIFIC;
|
||||
|
||||
modes[active_mode].color_mode = (controller->GetRandomColours()) ? MODE_COLORS_RANDOM : MODE_COLORS_MODE_SPECIFIC;
|
||||
|
||||
if (modes[active_mode].flags & MODE_FLAG_HAS_SPEED)
|
||||
{
|
||||
modes[active_mode].speed = cmargb->GetLedSpeed();
|
||||
modes[active_mode].speed = controller->GetLedSpeed();
|
||||
}
|
||||
}
|
||||
|
||||
RGBController_CMSmallARGBController::~RGBController_CMSmallARGBController()
|
||||
{
|
||||
delete cmargb;
|
||||
delete controller;
|
||||
}
|
||||
|
||||
void RGBController_CMSmallARGBController::Init_Controller()
|
||||
{
|
||||
int zone_idx = cmargb->GetZoneIndex();
|
||||
int zone_idx = controller->GetZoneIndex();
|
||||
int zone_led_count = small_argb_header_data[zone_idx].count;
|
||||
bool boolSingleLED = ( zone_led_count == 1 ); //If argb_header_data[zone_idx].count == 1 then the zone is ZONE_TYPE_SINGLE
|
||||
|
||||
@@ -195,7 +214,7 @@ void RGBController_CMSmallARGBController::SetupZones()
|
||||
|
||||
if (!boolSingleLED)
|
||||
{
|
||||
cmargb->SetLedCount(small_argb_header_data[zone_idx].header, zones[zone_idx].leds_count);
|
||||
controller->SetLedCount(small_argb_header_data[zone_idx].header, zones[zone_idx].leds_count);
|
||||
}
|
||||
|
||||
for(unsigned int lp_idx = 0; lp_idx < zones[zone_idx].leds_count; lp_idx++)
|
||||
@@ -249,7 +268,7 @@ void RGBController_CMSmallARGBController::UpdateZoneLEDs(int zone)
|
||||
{
|
||||
if(serial >= CM_SMALL_ARGB_FW0012)
|
||||
{
|
||||
cmargb->SetLedsDirect( zones[zone].colors, zones[zone].leds_count );
|
||||
controller->SetLedsDirect( zones[zone].colors, zones[zone].leds_count );
|
||||
}
|
||||
}
|
||||
|
||||
@@ -260,13 +279,24 @@ void RGBController_CMSmallARGBController::UpdateSingleLED(int led)
|
||||
|
||||
void RGBController_CMSmallARGBController::SetCustomMode()
|
||||
{
|
||||
active_mode = CM_SMALL_ARGB_MODE_DIRECT; //The small ARGB may not support "Direct" mode
|
||||
/*-------------------------------------------------*\
|
||||
| The small ARGB may not support "Direct" mode |
|
||||
| in which case this will select "Pass Thru" |
|
||||
\*-------------------------------------------------*/
|
||||
if(serial >= CM_SMALL_ARGB_FW0012)
|
||||
{
|
||||
active_mode = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
active_mode = 7;
|
||||
}
|
||||
}
|
||||
|
||||
void RGBController_CMSmallARGBController::DeviceUpdateMode()
|
||||
{
|
||||
bool random_colours = (modes[active_mode].color_mode == MODE_COLORS_RANDOM);
|
||||
bool random_colours = (modes[active_mode].color_mode == MODE_COLORS_RANDOM);
|
||||
RGBColor colour = (modes[active_mode].color_mode == MODE_COLORS_MODE_SPECIFIC) ? modes[active_mode].colors[0] : 0;
|
||||
|
||||
cmargb->SetMode( modes[active_mode].value, modes[active_mode].speed, modes[active_mode].brightness, colour, random_colours);
|
||||
controller->SetMode( modes[active_mode].value, modes[active_mode].speed, modes[active_mode].brightness, colour, random_colours);
|
||||
}
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
class RGBController_CMSmallARGBController : public RGBController
|
||||
{
|
||||
public:
|
||||
RGBController_CMSmallARGBController(CMSmallARGBController* cmargb_ptr);
|
||||
RGBController_CMSmallARGBController(CMSmallARGBController* controller_ptr);
|
||||
~RGBController_CMSmallARGBController();
|
||||
|
||||
void SetupZones();
|
||||
@@ -36,5 +36,5 @@ private:
|
||||
void Init_Controller();
|
||||
int GetDeviceMode();
|
||||
|
||||
CMSmallARGBController* cmargb;
|
||||
CMSmallARGBController* controller;
|
||||
};
|
||||
|
||||
@@ -141,6 +141,8 @@ void CorsairCommanderCoreController::SendMultiPkt(unsigned char buffarray[][5],
|
||||
hid_write(dev, hidtemp, CORSAIR_COMMANDER_CORE_PACKET_SIZE);
|
||||
hid_read(dev, hidtemp, CORSAIR_COMMANDER_CORE_PACKET_SIZE);
|
||||
}
|
||||
|
||||
delete[] hidtemp;
|
||||
}
|
||||
|
||||
void CorsairCommanderCoreController::SetDirectColor
|
||||
@@ -187,11 +189,11 @@ void CorsairCommanderCoreController::SetDirectColor
|
||||
led_idx = led_idx + zones[zone_idx].leds_count;
|
||||
|
||||
/*-------------------------------------------------*\
|
||||
| Move offset for pump zone with less than 29 LEDs |
|
||||
| Move offset for pump zone with less than 33 LEDs |
|
||||
\*-------------------------------------------------*/
|
||||
if(zone_idx == 0)
|
||||
{
|
||||
packet_offset = packet_offset + 3 * (29 - zones[zone_idx].leds_count);
|
||||
packet_offset = packet_offset + 3 * (33 - zones[zone_idx].leds_count);
|
||||
}
|
||||
|
||||
/*-------------------------------------------------*\
|
||||
@@ -211,6 +213,8 @@ void CorsairCommanderCoreController::SetDirectColor
|
||||
last_commit_time = std::chrono::steady_clock::now();
|
||||
|
||||
hid_write(dev, usb_buf, CORSAIR_COMMANDER_CORE_PACKET_SIZE);
|
||||
|
||||
delete[] usb_buf;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+135
-125
@@ -1,125 +1,135 @@
|
||||
/*-----------------------------------------*\
|
||||
| RGBController_CorsairCapellix.cpp |
|
||||
| |
|
||||
| Generic RGB Interface for Corsair |
|
||||
| Commander Core |
|
||||
| |
|
||||
| Jeff P. |
|
||||
\*-----------------------------------------*/
|
||||
|
||||
#include "RGBController_CorsairCommanderCore.h"
|
||||
|
||||
RGBController_CorsairCommanderCore::RGBController_CorsairCommanderCore(CorsairCommanderCoreController* corsair_ptr)
|
||||
{
|
||||
corsair = corsair_ptr;
|
||||
|
||||
vendor = "Corsair";
|
||||
description = "Corsair Commander Core";
|
||||
type = DEVICE_TYPE_COOLER;
|
||||
location = corsair->GetLocationString();
|
||||
|
||||
SetupZones();
|
||||
|
||||
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);
|
||||
}
|
||||
|
||||
RGBController_CorsairCommanderCore::~RGBController_CorsairCommanderCore()
|
||||
{
|
||||
delete corsair;
|
||||
}
|
||||
|
||||
void RGBController_CorsairCommanderCore::SetupZones()
|
||||
{
|
||||
std::atomic<bool> first_run;
|
||||
first_run = 0;
|
||||
|
||||
if(zones.size() == 0)
|
||||
{
|
||||
first_run = 1;
|
||||
}
|
||||
|
||||
zones.resize(7);
|
||||
zones[0].name = "Pump";
|
||||
zones[0].type = ZONE_TYPE_LINEAR;
|
||||
zones[0].leds_min = 0;
|
||||
zones[0].leds_max = 29;
|
||||
|
||||
for(unsigned int i = 1; i < (CORSAIR_COMMANDER_CORE_NUM_CHANNELS + 1); i++)
|
||||
{
|
||||
zones[i].name = "RGB Port " + std::to_string(i);
|
||||
zones[i].type = ZONE_TYPE_LINEAR;
|
||||
zones[i].leds_min = 0;
|
||||
zones[i].leds_max = 34;
|
||||
|
||||
if(first_run)
|
||||
{
|
||||
zones[i].leds_count = 0;
|
||||
}
|
||||
}
|
||||
|
||||
leds.clear();
|
||||
colors.clear();
|
||||
|
||||
for(unsigned int zone_idx = 0; zone_idx < zones.size(); zone_idx++)
|
||||
{
|
||||
for (unsigned int led_idx = 0; led_idx < zones[zone_idx].leds_count; led_idx++)
|
||||
{
|
||||
led new_led;
|
||||
new_led.name = zones[zone_idx].name + " LED " + std::to_string(led_idx+1);
|
||||
|
||||
leds.push_back(new_led);
|
||||
}
|
||||
}
|
||||
|
||||
SetupColors();
|
||||
}
|
||||
|
||||
void RGBController_CorsairCommanderCore::ResizeZone(int zone, int new_size)
|
||||
{
|
||||
if((size_t) zone >= zones.size())
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if(((unsigned int)new_size >= zones[zone].leds_min) && ((unsigned int)new_size <= zones[zone].leds_max))
|
||||
{
|
||||
zones[zone].leds_count = new_size;
|
||||
|
||||
SetupZones();
|
||||
}
|
||||
}
|
||||
|
||||
void RGBController_CorsairCommanderCore::DeviceUpdateLEDs()
|
||||
{
|
||||
DeviceUpdateMode();
|
||||
}
|
||||
|
||||
void RGBController_CorsairCommanderCore::UpdateZoneLEDs(int /*zone*/)
|
||||
{
|
||||
DeviceUpdateLEDs();
|
||||
}
|
||||
|
||||
void RGBController_CorsairCommanderCore::UpdateSingleLED(int /*led*/)
|
||||
{
|
||||
DeviceUpdateLEDs();
|
||||
}
|
||||
|
||||
void RGBController_CorsairCommanderCore::SetCustomMode()
|
||||
{
|
||||
active_mode = 0;
|
||||
}
|
||||
|
||||
void RGBController_CorsairCommanderCore::DeviceUpdateMode()
|
||||
{
|
||||
switch(modes[active_mode].value)
|
||||
{
|
||||
case CORSAIR_COMMANDER_CORE_MODE_DIRECT:
|
||||
corsair->SetDirectColor(colors, zones);
|
||||
break;
|
||||
}
|
||||
}
|
||||
/*-----------------------------------------*\
|
||||
| RGBController_CorsairCapellix.cpp |
|
||||
| |
|
||||
| Generic RGB Interface for Corsair |
|
||||
| Commander Core |
|
||||
| |
|
||||
| Jeff P. |
|
||||
\*-----------------------------------------*/
|
||||
|
||||
#include "RGBController_CorsairCommanderCore.h"
|
||||
|
||||
/**------------------------------------------------------------------*\
|
||||
@name Corsair Commander Core
|
||||
@type USB
|
||||
@save :x:
|
||||
@direct :white_check_mark:
|
||||
@effects :x:
|
||||
@detectors DetectCorsairCapellixHIDControllers
|
||||
@comment
|
||||
\*-------------------------------------------------------------------*/
|
||||
|
||||
RGBController_CorsairCommanderCore::RGBController_CorsairCommanderCore(CorsairCommanderCoreController* controller_ptr)
|
||||
{
|
||||
controller = controller_ptr;
|
||||
|
||||
vendor = "Corsair";
|
||||
description = "Corsair Commander Core";
|
||||
type = DEVICE_TYPE_COOLER;
|
||||
location = controller->GetLocationString();
|
||||
|
||||
SetupZones();
|
||||
|
||||
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);
|
||||
}
|
||||
|
||||
RGBController_CorsairCommanderCore::~RGBController_CorsairCommanderCore()
|
||||
{
|
||||
delete controller;
|
||||
}
|
||||
|
||||
void RGBController_CorsairCommanderCore::SetupZones()
|
||||
{
|
||||
std::atomic<bool> first_run;
|
||||
first_run = 0;
|
||||
|
||||
if(zones.size() == 0)
|
||||
{
|
||||
first_run = 1;
|
||||
}
|
||||
|
||||
zones.resize(7);
|
||||
zones[0].name = "Pump";
|
||||
zones[0].type = ZONE_TYPE_LINEAR;
|
||||
zones[0].leds_min = 0;
|
||||
zones[0].leds_max = 33;
|
||||
|
||||
for(unsigned int i = 1; i < (CORSAIR_COMMANDER_CORE_NUM_CHANNELS + 1); i++)
|
||||
{
|
||||
zones[i].name = "RGB Port " + std::to_string(i);
|
||||
zones[i].type = ZONE_TYPE_LINEAR;
|
||||
zones[i].leds_min = 0;
|
||||
zones[i].leds_max = 34;
|
||||
|
||||
if(first_run)
|
||||
{
|
||||
zones[i].leds_count = 0;
|
||||
}
|
||||
}
|
||||
|
||||
leds.clear();
|
||||
colors.clear();
|
||||
|
||||
for(unsigned int zone_idx = 0; zone_idx < zones.size(); zone_idx++)
|
||||
{
|
||||
for (unsigned int led_idx = 0; led_idx < zones[zone_idx].leds_count; led_idx++)
|
||||
{
|
||||
led new_led;
|
||||
new_led.name = zones[zone_idx].name + " LED " + std::to_string(led_idx+1);
|
||||
|
||||
leds.push_back(new_led);
|
||||
}
|
||||
}
|
||||
|
||||
SetupColors();
|
||||
}
|
||||
|
||||
void RGBController_CorsairCommanderCore::ResizeZone(int zone, int new_size)
|
||||
{
|
||||
if((size_t) zone >= zones.size())
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if(((unsigned int)new_size >= zones[zone].leds_min) && ((unsigned int)new_size <= zones[zone].leds_max))
|
||||
{
|
||||
zones[zone].leds_count = new_size;
|
||||
|
||||
SetupZones();
|
||||
}
|
||||
}
|
||||
|
||||
void RGBController_CorsairCommanderCore::DeviceUpdateLEDs()
|
||||
{
|
||||
DeviceUpdateMode();
|
||||
}
|
||||
|
||||
void RGBController_CorsairCommanderCore::UpdateZoneLEDs(int /*zone*/)
|
||||
{
|
||||
DeviceUpdateLEDs();
|
||||
}
|
||||
|
||||
void RGBController_CorsairCommanderCore::UpdateSingleLED(int /*led*/)
|
||||
{
|
||||
DeviceUpdateLEDs();
|
||||
}
|
||||
|
||||
void RGBController_CorsairCommanderCore::SetCustomMode()
|
||||
{
|
||||
active_mode = 0;
|
||||
}
|
||||
|
||||
void RGBController_CorsairCommanderCore::DeviceUpdateMode()
|
||||
{
|
||||
switch(modes[active_mode].value)
|
||||
{
|
||||
case CORSAIR_COMMANDER_CORE_MODE_DIRECT:
|
||||
controller->SetDirectColor(colors, zones);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,33 +1,33 @@
|
||||
/*-----------------------------------------*\
|
||||
| RGBController_CorsairCapellix.h |
|
||||
| |
|
||||
| Generic RGB Interface for Corsair |
|
||||
| Commander Core |
|
||||
| |
|
||||
| Jeff P. |
|
||||
\*-----------------------------------------*/
|
||||
|
||||
#pragma once
|
||||
#include "RGBController.h"
|
||||
#include "CorsairCommanderCoreController.h"
|
||||
|
||||
class RGBController_CorsairCommanderCore : public RGBController
|
||||
{
|
||||
public:
|
||||
RGBController_CorsairCommanderCore(CorsairCommanderCoreController* corsair_ptr);
|
||||
~RGBController_CorsairCommanderCore();
|
||||
|
||||
void SetupZones();
|
||||
|
||||
void ResizeZone(int zone, int new_size);
|
||||
void DeviceUpdateLEDs();
|
||||
void UpdateZoneLEDs(int zone);
|
||||
void UpdateSingleLED(int led);
|
||||
|
||||
void SetCustomMode();
|
||||
void DeviceUpdateMode();
|
||||
|
||||
private:
|
||||
CorsairCommanderCoreController* corsair;
|
||||
std::vector<int> fanleds{0};
|
||||
};
|
||||
/*-----------------------------------------*\
|
||||
| RGBController_CorsairCapellix.h |
|
||||
| |
|
||||
| Generic RGB Interface for Corsair |
|
||||
| Commander Core |
|
||||
| |
|
||||
| Jeff P. |
|
||||
\*-----------------------------------------*/
|
||||
|
||||
#pragma once
|
||||
#include "RGBController.h"
|
||||
#include "CorsairCommanderCoreController.h"
|
||||
|
||||
class RGBController_CorsairCommanderCore : public RGBController
|
||||
{
|
||||
public:
|
||||
RGBController_CorsairCommanderCore(CorsairCommanderCoreController* controller_ptr);
|
||||
~RGBController_CorsairCommanderCore();
|
||||
|
||||
void SetupZones();
|
||||
|
||||
void ResizeZone(int zone, int new_size);
|
||||
void DeviceUpdateLEDs();
|
||||
void UpdateZoneLEDs(int zone);
|
||||
void UpdateSingleLED(int led);
|
||||
|
||||
void SetCustomMode();
|
||||
void DeviceUpdateMode();
|
||||
|
||||
private:
|
||||
CorsairCommanderCoreController* controller;
|
||||
std::vector<int> fanleds{0};
|
||||
};
|
||||
|
||||
@@ -15,6 +15,8 @@
|
||||
|
||||
typedef unsigned char corsair_dev_id;
|
||||
|
||||
#define CORSAIR_DOMINATOR_PLATINUM_NAME "Corsair Dominator Platinum"
|
||||
|
||||
class CorsairDominatorPlatinumController
|
||||
{
|
||||
public:
|
||||
|
||||
+17
-4
@@ -4,6 +4,7 @@
|
||||
#include "RGBController_CorsairDominatorPlatinum.h"
|
||||
#include "i2c_smbus.h"
|
||||
#include "pci_ids.h"
|
||||
#include "LogManager.h"
|
||||
#include <vector>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
@@ -12,10 +13,13 @@ using namespace std::chrono_literals;
|
||||
|
||||
bool TestForCorsairDominatorPlatinumController(i2c_smbus_interface *bus, unsigned char address)
|
||||
{
|
||||
|
||||
int res = bus->i2c_smbus_write_quick(address, I2C_SMBUS_WRITE);
|
||||
|
||||
LOG_DEBUG("[%s] Trying address %02X", CORSAIR_DOMINATOR_PLATINUM_NAME, address);
|
||||
|
||||
if(res < 0)
|
||||
{
|
||||
LOG_DEBUG("[%s] Failed: res was %04X", CORSAIR_DOMINATOR_PLATINUM_NAME, res);
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -23,6 +27,7 @@ bool TestForCorsairDominatorPlatinumController(i2c_smbus_interface *bus, unsigne
|
||||
|
||||
if(res != 0x1b)
|
||||
{
|
||||
LOG_DEBUG("[%s] Failed: expected 0x1b, got %04X", CORSAIR_DOMINATOR_PLATINUM_NAME, res);
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -30,6 +35,7 @@ bool TestForCorsairDominatorPlatinumController(i2c_smbus_interface *bus, unsigne
|
||||
|
||||
if(res != 0x04)
|
||||
{
|
||||
LOG_DEBUG("[%s] Failed: expected 0x04, got %04X", CORSAIR_DOMINATOR_PLATINUM_NAME, res);
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -53,18 +59,25 @@ void DetectCorsairDominatorPlatinumControllers(std::vector<i2c_smbus_interface *
|
||||
{
|
||||
IF_DRAM_SMBUS(busses[bus]->pci_vendor, busses[bus]->pci_device)
|
||||
{
|
||||
for(unsigned char addr = 0x58; addr <= 0x5f; addr++)
|
||||
LOG_DEBUG("[%s] Testing bus %d", CORSAIR_DOMINATOR_PLATINUM_NAME, bus);
|
||||
|
||||
for(unsigned char addr = 0x58; addr <= 0x5F; addr++)
|
||||
{
|
||||
if(TestForCorsairDominatorPlatinumController(busses[bus], addr))
|
||||
{
|
||||
CorsairDominatorPlatinumController* new_controller = new CorsairDominatorPlatinumController(busses[bus], addr);
|
||||
CorsairDominatorPlatinumController* new_controller = new CorsairDominatorPlatinumController(busses[bus], addr);
|
||||
RGBController_CorsairDominatorPlatinum* new_rgbcontroller = new RGBController_CorsairDominatorPlatinum(new_controller);
|
||||
|
||||
ResourceManager::get()->RegisterRGBController(new_rgbcontroller);
|
||||
}
|
||||
std::this_thread::sleep_for(10ms);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
LOG_DEBUG("[%s] Bus %d is not a DRAM bus", CORSAIR_DOMINATOR_PLATINUM_NAME, bus);
|
||||
}
|
||||
}
|
||||
}
|
||||
} /* DetectCorsairDominatorPlatinumControllers() */
|
||||
|
||||
REGISTER_I2C_DETECTOR("Corsair Dominator Platinum", DetectCorsairDominatorPlatinumControllers);
|
||||
|
||||
+125
-114
@@ -1,114 +1,125 @@
|
||||
/*-------------------------------------------------*\
|
||||
| RGBController_CorsairDominatorPlatinum.cpp |
|
||||
| |
|
||||
| Corsair Vengeance Pro RGB driver |
|
||||
| |
|
||||
| Erik Gilling (konkers) 9/25/2020 |
|
||||
\*-------------------------------------------------*/
|
||||
|
||||
#include "RGBController_CorsairDominatorPlatinum.h"
|
||||
|
||||
RGBController_CorsairDominatorPlatinum::RGBController_CorsairDominatorPlatinum(CorsairDominatorPlatinumController* corsair_ptr)
|
||||
{
|
||||
corsair = corsair_ptr;
|
||||
|
||||
name = corsair->GetDeviceName();
|
||||
vendor = "Corsair";
|
||||
type = DEVICE_TYPE_DRAM;
|
||||
description = "Corsair Dominator Platinum RGB Device";
|
||||
location = corsair->GetDeviceLocation();
|
||||
|
||||
mode Direct;
|
||||
Direct.name = "Direct";
|
||||
Direct.value = 0;
|
||||
Direct.flags = MODE_FLAG_HAS_PER_LED_COLOR;
|
||||
Direct.speed_min = 0;
|
||||
Direct.speed_max = 0;
|
||||
Direct.speed = 0;
|
||||
Direct.color_mode = MODE_COLORS_PER_LED;
|
||||
modes.push_back(Direct);
|
||||
|
||||
SetupZones();
|
||||
|
||||
active_mode = 0;
|
||||
}
|
||||
|
||||
RGBController_CorsairDominatorPlatinum::~RGBController_CorsairDominatorPlatinum()
|
||||
{
|
||||
delete corsair;
|
||||
}
|
||||
|
||||
void RGBController_CorsairDominatorPlatinum::SetupZones()
|
||||
{
|
||||
/*---------------------------------------------------------*\
|
||||
| Set up zone |
|
||||
\*---------------------------------------------------------*/
|
||||
zone new_zone;
|
||||
new_zone.name = "Corsair Platinum Zone";
|
||||
new_zone.type = ZONE_TYPE_LINEAR;
|
||||
new_zone.leds_min = corsair->GetLEDCount();
|
||||
new_zone.leds_max = corsair->GetLEDCount();
|
||||
new_zone.leds_count = corsair->GetLEDCount();
|
||||
new_zone.matrix_map = NULL;
|
||||
zones.push_back(new_zone);
|
||||
|
||||
/*---------------------------------------------------------*\
|
||||
| Set up LEDs |
|
||||
\*---------------------------------------------------------*/
|
||||
for(std::size_t led_idx = 0; led_idx < zones[0].leds_count; led_idx++)
|
||||
{
|
||||
led *new_led = new led();
|
||||
new_led->name = "Corsair Platinum LED ";
|
||||
new_led->name.append(std::to_string(led_idx));
|
||||
leds.push_back(*new_led);
|
||||
}
|
||||
|
||||
SetupColors();
|
||||
}
|
||||
|
||||
void RGBController_CorsairDominatorPlatinum::ResizeZone(int /*zone*/, int /*new_size*/)
|
||||
{
|
||||
/*---------------------------------------------------------*\
|
||||
| This device does not support resizing zones |
|
||||
\*---------------------------------------------------------*/
|
||||
}
|
||||
|
||||
void RGBController_CorsairDominatorPlatinum::DeviceUpdateLEDs()
|
||||
{
|
||||
for(std::size_t led = 0; led < colors.size(); led++)
|
||||
{
|
||||
RGBColor color = colors[led];
|
||||
unsigned char red = RGBGetRValue(color);
|
||||
unsigned char grn = RGBGetGValue(color);
|
||||
unsigned char blu = RGBGetBValue(color);
|
||||
corsair->SetLEDColor(led, red, grn, blu);
|
||||
}
|
||||
|
||||
corsair->ApplyColors();
|
||||
}
|
||||
|
||||
void RGBController_CorsairDominatorPlatinum::UpdateZoneLEDs(int /*zone*/)
|
||||
{
|
||||
DeviceUpdateLEDs();
|
||||
}
|
||||
|
||||
void RGBController_CorsairDominatorPlatinum::UpdateSingleLED(int led)
|
||||
{
|
||||
RGBColor color = colors[led];
|
||||
unsigned char red = RGBGetRValue(color);
|
||||
unsigned char grn = RGBGetGValue(color);
|
||||
unsigned char blu = RGBGetBValue(color);
|
||||
|
||||
corsair->SetLEDColor(led, red, grn, blu);
|
||||
corsair->ApplyColors();
|
||||
}
|
||||
|
||||
void RGBController_CorsairDominatorPlatinum::SetCustomMode()
|
||||
{
|
||||
active_mode = 0;
|
||||
}
|
||||
|
||||
void RGBController_CorsairDominatorPlatinum::DeviceUpdateMode()
|
||||
{
|
||||
|
||||
}
|
||||
/*-------------------------------------------------*\
|
||||
| RGBController_CorsairDominatorPlatinum.cpp |
|
||||
| |
|
||||
| Corsair Vengeance Pro RGB driver |
|
||||
| |
|
||||
| Erik Gilling (konkers) 9/25/2020 |
|
||||
\*-------------------------------------------------*/
|
||||
|
||||
#include "RGBController_CorsairDominatorPlatinum.h"
|
||||
|
||||
/**------------------------------------------------------------------*\
|
||||
@name Corsair Dominator Platinum
|
||||
@type SMBus
|
||||
@save :x:
|
||||
@direct :white_check_mark:
|
||||
@effects :x:
|
||||
@detectors DetectCorsairDominatorPlatinumControllers
|
||||
@comment
|
||||
\*-------------------------------------------------------------------*/
|
||||
|
||||
RGBController_CorsairDominatorPlatinum::RGBController_CorsairDominatorPlatinum(CorsairDominatorPlatinumController* controller_ptr)
|
||||
{
|
||||
controller = controller_ptr;
|
||||
|
||||
name = controller->GetDeviceName();
|
||||
vendor = "Corsair";
|
||||
type = DEVICE_TYPE_DRAM;
|
||||
description = "Corsair Dominator Platinum RGB Device";
|
||||
location = controller->GetDeviceLocation();
|
||||
|
||||
mode Direct;
|
||||
Direct.name = "Direct";
|
||||
Direct.value = 0;
|
||||
Direct.flags = MODE_FLAG_HAS_PER_LED_COLOR;
|
||||
Direct.speed_min = 0;
|
||||
Direct.speed_max = 0;
|
||||
Direct.speed = 0;
|
||||
Direct.color_mode = MODE_COLORS_PER_LED;
|
||||
modes.push_back(Direct);
|
||||
|
||||
SetupZones();
|
||||
|
||||
active_mode = 0;
|
||||
}
|
||||
|
||||
RGBController_CorsairDominatorPlatinum::~RGBController_CorsairDominatorPlatinum()
|
||||
{
|
||||
delete controller;
|
||||
}
|
||||
|
||||
void RGBController_CorsairDominatorPlatinum::SetupZones()
|
||||
{
|
||||
/*---------------------------------------------------------*\
|
||||
| Set up zone |
|
||||
\*---------------------------------------------------------*/
|
||||
zone new_zone;
|
||||
new_zone.name = "Corsair Platinum Zone";
|
||||
new_zone.type = ZONE_TYPE_LINEAR;
|
||||
new_zone.leds_min = controller->GetLEDCount();
|
||||
new_zone.leds_max = controller->GetLEDCount();
|
||||
new_zone.leds_count = controller->GetLEDCount();
|
||||
new_zone.matrix_map = NULL;
|
||||
zones.push_back(new_zone);
|
||||
|
||||
/*---------------------------------------------------------*\
|
||||
| Set up LEDs |
|
||||
\*---------------------------------------------------------*/
|
||||
for(std::size_t led_idx = 0; led_idx < zones[0].leds_count; led_idx++)
|
||||
{
|
||||
led *new_led = new led();
|
||||
new_led->name = "Corsair Platinum LED ";
|
||||
new_led->name.append(std::to_string(led_idx));
|
||||
leds.push_back(*new_led);
|
||||
}
|
||||
|
||||
SetupColors();
|
||||
}
|
||||
|
||||
void RGBController_CorsairDominatorPlatinum::ResizeZone(int /*zone*/, int /*new_size*/)
|
||||
{
|
||||
/*---------------------------------------------------------*\
|
||||
| This device does not support resizing zones |
|
||||
\*---------------------------------------------------------*/
|
||||
}
|
||||
|
||||
void RGBController_CorsairDominatorPlatinum::DeviceUpdateLEDs()
|
||||
{
|
||||
for(std::size_t led = 0; led < colors.size(); led++)
|
||||
{
|
||||
RGBColor color = colors[led];
|
||||
unsigned char red = RGBGetRValue(color);
|
||||
unsigned char grn = RGBGetGValue(color);
|
||||
unsigned char blu = RGBGetBValue(color);
|
||||
|
||||
controller->SetLEDColor(led, red, grn, blu);
|
||||
}
|
||||
|
||||
controller->ApplyColors();
|
||||
}
|
||||
|
||||
void RGBController_CorsairDominatorPlatinum::UpdateZoneLEDs(int /*zone*/)
|
||||
{
|
||||
DeviceUpdateLEDs();
|
||||
}
|
||||
|
||||
void RGBController_CorsairDominatorPlatinum::UpdateSingleLED(int led)
|
||||
{
|
||||
RGBColor color = colors[led];
|
||||
unsigned char red = RGBGetRValue(color);
|
||||
unsigned char grn = RGBGetGValue(color);
|
||||
unsigned char blu = RGBGetBValue(color);
|
||||
|
||||
controller->SetLEDColor(led, red, grn, blu);
|
||||
controller->ApplyColors();
|
||||
}
|
||||
|
||||
void RGBController_CorsairDominatorPlatinum::SetCustomMode()
|
||||
{
|
||||
active_mode = 0;
|
||||
}
|
||||
|
||||
void RGBController_CorsairDominatorPlatinum::DeviceUpdateMode()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
+33
-33
@@ -1,33 +1,33 @@
|
||||
/*--------------------------------------------*\
|
||||
| RGBController_CorsairDominatorPlatinum.h |
|
||||
| |
|
||||
| Corsair Dominator Platinum RGB driver |
|
||||
| |
|
||||
| Erik Gilling (konkers) 9/25/2020 |
|
||||
\*--------------------------------------------*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "RGBController.h"
|
||||
#include "CorsairDominatorPlatinumController.h"
|
||||
|
||||
class RGBController_CorsairDominatorPlatinum : public RGBController
|
||||
{
|
||||
public:
|
||||
RGBController_CorsairDominatorPlatinum(CorsairDominatorPlatinumController* corsair_ptr);
|
||||
~RGBController_CorsairDominatorPlatinum();
|
||||
|
||||
void SetupZones();
|
||||
|
||||
void ResizeZone(int zone, int new_size);
|
||||
|
||||
void DeviceUpdateLEDs();
|
||||
void UpdateZoneLEDs(int zone);
|
||||
void UpdateSingleLED(int led);
|
||||
|
||||
void SetCustomMode();
|
||||
void DeviceUpdateMode();
|
||||
|
||||
private:
|
||||
CorsairDominatorPlatinumController* corsair;
|
||||
};
|
||||
/*--------------------------------------------*\
|
||||
| RGBController_CorsairDominatorPlatinum.h |
|
||||
| |
|
||||
| Corsair Dominator Platinum RGB driver |
|
||||
| |
|
||||
| Erik Gilling (konkers) 9/25/2020 |
|
||||
\*--------------------------------------------*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "RGBController.h"
|
||||
#include "CorsairDominatorPlatinumController.h"
|
||||
|
||||
class RGBController_CorsairDominatorPlatinum : public RGBController
|
||||
{
|
||||
public:
|
||||
RGBController_CorsairDominatorPlatinum(CorsairDominatorPlatinumController* controller_ptr);
|
||||
~RGBController_CorsairDominatorPlatinum();
|
||||
|
||||
void SetupZones();
|
||||
|
||||
void ResizeZone(int zone, int new_size);
|
||||
|
||||
void DeviceUpdateLEDs();
|
||||
void UpdateZoneLEDs(int zone);
|
||||
void UpdateSingleLED(int led);
|
||||
|
||||
void SetCustomMode();
|
||||
void DeviceUpdateMode();
|
||||
|
||||
private:
|
||||
CorsairDominatorPlatinumController* controller;
|
||||
};
|
||||
|
||||
@@ -6,7 +6,11 @@
|
||||
|
||||
#include "RGBController.h"
|
||||
#include <vector>
|
||||
#ifdef __FreeBSD__
|
||||
#include <libusb.h>
|
||||
#else
|
||||
#include <libusb-1.0/libusb.h>
|
||||
#endif
|
||||
|
||||
#pragma once
|
||||
|
||||
|
||||
@@ -1,77 +1,80 @@
|
||||
#include "Detector.h"
|
||||
#include "CorsairHydroController.h"
|
||||
#include "RGBController.h"
|
||||
#include "RGBController_CorsairHydro.h"
|
||||
#include <vector>
|
||||
#include <libusb-1.0/libusb.h>
|
||||
|
||||
/*-----------------------------------------------------*\
|
||||
| Corsair vendor ID |
|
||||
\*-----------------------------------------------------*/
|
||||
#define CORSAIR_VID 0x1B1C
|
||||
|
||||
/*-----------------------------------------------------*\
|
||||
| Keyboard Hydro Series product IDs |
|
||||
\*-----------------------------------------------------*/
|
||||
#define CORSAIR_H115I_PRO_RGB_PID 0x0C13
|
||||
#define CORSAIR_H100I_PRO_RGB_PID 0x0C15
|
||||
#define CORSAIR_H150I_PRO_RGB_PID 0x0C12
|
||||
|
||||
typedef struct
|
||||
{
|
||||
unsigned short usb_vid;
|
||||
unsigned short usb_pid;
|
||||
unsigned char usb_interface;
|
||||
const char * name;
|
||||
} corsair_hydro_device;
|
||||
|
||||
#define CORSAIR_NUM_DEVICES (sizeof(device_list) / sizeof(device_list[ 0 ]))
|
||||
|
||||
static const corsair_hydro_device device_list[] =
|
||||
{
|
||||
/*-----------------------------------------------------------------------------------------------------*\
|
||||
| Coolers |
|
||||
\*-----------------------------------------------------------------------------------------------------*/
|
||||
{ CORSAIR_VID, CORSAIR_H100I_PRO_RGB_PID, 0, "Corsair H100i PRO RGB" },
|
||||
{ CORSAIR_VID, CORSAIR_H115I_PRO_RGB_PID, 0, "Corsair H115i PRO RGB" },
|
||||
{ CORSAIR_VID, CORSAIR_H150I_PRO_RGB_PID, 0, "Corsair H150i PRO RGB" },
|
||||
};
|
||||
|
||||
/******************************************************************************************\
|
||||
* *
|
||||
* DetectCorsairHydroControllers *
|
||||
* *
|
||||
* Tests the USB address to see if a Corsair RGB Cooler controller exists there. *
|
||||
* *
|
||||
\******************************************************************************************/
|
||||
|
||||
void DetectCorsairHydroControllers(std::vector<RGBController*>& rgb_controllers)
|
||||
{
|
||||
libusb_init(NULL);
|
||||
|
||||
#ifdef _WIN32
|
||||
libusb_set_option(NULL, LIBUSB_OPTION_USE_USBDK);
|
||||
#endif
|
||||
|
||||
for(std::size_t device_idx = 0; device_idx < CORSAIR_NUM_DEVICES; device_idx++)
|
||||
{
|
||||
libusb_device_handle * dev = libusb_open_device_with_vid_pid(NULL, device_list[device_idx].usb_vid, device_list[device_idx].usb_pid);
|
||||
|
||||
//Look for Corsair RGB Peripheral
|
||||
if(dev)
|
||||
{
|
||||
libusb_detach_kernel_driver(dev, 0);
|
||||
libusb_claim_interface(dev, 0);
|
||||
|
||||
CorsairHydroController* controller = new CorsairHydroController(dev);//, device_list[device_idx].usb_endpoint);
|
||||
|
||||
RGBController_CorsairHydro* rgb_controller = new RGBController_CorsairHydro(controller);
|
||||
|
||||
rgb_controller->name = device_list[device_idx].name;
|
||||
|
||||
rgb_controllers.push_back(rgb_controller);
|
||||
}
|
||||
}
|
||||
} /* DetectCorsairHydroControllers() */
|
||||
|
||||
REGISTER_DETECTOR("Corsair Hydro Series", DetectCorsairHydroControllers);
|
||||
#include "Detector.h"
|
||||
#include "CorsairHydroController.h"
|
||||
#include "RGBController.h"
|
||||
#include "RGBController_CorsairHydro.h"
|
||||
#include <vector>
|
||||
#ifdef __FreeBSD__
|
||||
#include <libusb.h>
|
||||
#else
|
||||
#include <libusb-1.0/libusb.h>
|
||||
#endif
|
||||
|
||||
/*-----------------------------------------------------*\
|
||||
| Corsair vendor ID |
|
||||
\*-----------------------------------------------------*/
|
||||
#define CORSAIR_VID 0x1B1C
|
||||
|
||||
/*-----------------------------------------------------*\
|
||||
| Keyboard Hydro Series product IDs |
|
||||
\*-----------------------------------------------------*/
|
||||
#define CORSAIR_H115I_PRO_RGB_PID 0x0C13
|
||||
#define CORSAIR_H100I_PRO_RGB_PID 0x0C15
|
||||
#define CORSAIR_H150I_PRO_RGB_PID 0x0C12
|
||||
|
||||
typedef struct
|
||||
{
|
||||
unsigned short usb_vid;
|
||||
unsigned short usb_pid;
|
||||
unsigned char usb_interface;
|
||||
const char * name;
|
||||
} corsair_hydro_device;
|
||||
|
||||
#define CORSAIR_NUM_DEVICES (sizeof(device_list) / sizeof(device_list[ 0 ]))
|
||||
|
||||
static const corsair_hydro_device device_list[] =
|
||||
{
|
||||
/*-----------------------------------------------------------------------------------------------------*\
|
||||
| Coolers |
|
||||
\*-----------------------------------------------------------------------------------------------------*/
|
||||
{ CORSAIR_VID, CORSAIR_H100I_PRO_RGB_PID, 0, "Corsair H100i PRO RGB" },
|
||||
{ CORSAIR_VID, CORSAIR_H115I_PRO_RGB_PID, 0, "Corsair H115i PRO RGB" },
|
||||
{ CORSAIR_VID, CORSAIR_H150I_PRO_RGB_PID, 0, "Corsair H150i PRO RGB" },
|
||||
};
|
||||
|
||||
/******************************************************************************************\
|
||||
* *
|
||||
* DetectCorsairHydroControllers *
|
||||
* *
|
||||
* Tests the USB address to see if a Corsair RGB Cooler controller exists there. *
|
||||
* *
|
||||
\******************************************************************************************/
|
||||
|
||||
void DetectCorsairHydroControllers(std::vector<RGBController*>& rgb_controllers)
|
||||
{
|
||||
libusb_init(NULL);
|
||||
|
||||
#ifdef _WIN32
|
||||
libusb_set_option(NULL, LIBUSB_OPTION_USE_USBDK);
|
||||
#endif
|
||||
|
||||
for(std::size_t device_idx = 0; device_idx < CORSAIR_NUM_DEVICES; device_idx++)
|
||||
{
|
||||
libusb_device_handle * dev = libusb_open_device_with_vid_pid(NULL, device_list[device_idx].usb_vid, device_list[device_idx].usb_pid);
|
||||
|
||||
//Look for Corsair RGB Peripheral
|
||||
if(dev)
|
||||
{
|
||||
libusb_detach_kernel_driver(dev, 0);
|
||||
libusb_claim_interface(dev, 0);
|
||||
|
||||
CorsairHydroController* controller = new CorsairHydroController(dev);
|
||||
RGBController_CorsairHydro* rgb_controller = new RGBController_CorsairHydro(controller);
|
||||
|
||||
rgb_controller->name = device_list[device_idx].name;
|
||||
|
||||
rgb_controllers.push_back(rgb_controller);
|
||||
}
|
||||
}
|
||||
} /* DetectCorsairHydroControllers() */
|
||||
|
||||
REGISTER_DETECTOR("Corsair Hydro Series", DetectCorsairHydroControllers);
|
||||
|
||||
@@ -1,143 +1,153 @@
|
||||
/*-----------------------------------------*\
|
||||
| RGBController_CorsairHydro.cpp |
|
||||
| |
|
||||
| Generic RGB Interface for Corsair |
|
||||
| Hydro Series |
|
||||
| |
|
||||
| Adam Honse (CalcProgrammer1) 8/18/2020 |
|
||||
\*-----------------------------------------*/
|
||||
|
||||
#include "RGBController_CorsairHydro.h"
|
||||
|
||||
RGBController_CorsairHydro::RGBController_CorsairHydro(CorsairHydroController* corsair_ptr)
|
||||
{
|
||||
corsair = corsair_ptr;
|
||||
|
||||
vendor = "Corsair";
|
||||
description = "Corsair Hydro Series Device";
|
||||
version = corsair->GetFirmwareString();
|
||||
type = DEVICE_TYPE_COOLER;
|
||||
location = corsair->GetLocation();
|
||||
|
||||
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);
|
||||
|
||||
mode Blinking;
|
||||
Blinking.name = "Blinking";
|
||||
Blinking.value = 1;
|
||||
Blinking.flags = MODE_FLAG_HAS_SPEED | MODE_FLAG_HAS_MODE_SPECIFIC_COLOR;
|
||||
Blinking.color_mode = MODE_COLORS_MODE_SPECIFIC;
|
||||
Blinking.speed_min = 0x0F;
|
||||
Blinking.speed_max = 0x05;
|
||||
Blinking.speed = 0x0A;
|
||||
Blinking.colors_min = 2;
|
||||
Blinking.colors_max = 2;
|
||||
Blinking.colors.resize(2);
|
||||
modes.push_back(Blinking);
|
||||
|
||||
mode ColorShift;
|
||||
ColorShift.name = "Color Shift";
|
||||
ColorShift.value = 2;
|
||||
ColorShift.flags = MODE_FLAG_HAS_SPEED | MODE_FLAG_HAS_MODE_SPECIFIC_COLOR;
|
||||
ColorShift.color_mode = MODE_COLORS_MODE_SPECIFIC;
|
||||
ColorShift.speed_min = 0x46;
|
||||
ColorShift.speed_max = 0x0F;
|
||||
ColorShift.speed = 0x28;
|
||||
ColorShift.colors_min = 2;
|
||||
ColorShift.colors_max = 2;
|
||||
ColorShift.colors.resize(2);
|
||||
modes.push_back(ColorShift);
|
||||
|
||||
mode Pulsing;
|
||||
Pulsing.name = "Pulsing";
|
||||
Pulsing.value = 3;
|
||||
Pulsing.flags = MODE_FLAG_HAS_SPEED | MODE_FLAG_HAS_MODE_SPECIFIC_COLOR;
|
||||
Pulsing.color_mode = MODE_COLORS_MODE_SPECIFIC;
|
||||
Pulsing.speed_min = 0x50;
|
||||
Pulsing.speed_max = 0x1E;
|
||||
Pulsing.speed = 0x37;
|
||||
Pulsing.colors_min = 2;
|
||||
Pulsing.colors_max = 2;
|
||||
Pulsing.colors.resize(2);
|
||||
modes.push_back(Pulsing);
|
||||
|
||||
SetupZones();
|
||||
}
|
||||
|
||||
RGBController_CorsairHydro::~RGBController_CorsairHydro()
|
||||
{
|
||||
delete corsair;
|
||||
}
|
||||
|
||||
void RGBController_CorsairHydro::SetupZones()
|
||||
{
|
||||
zone new_zone;
|
||||
|
||||
new_zone.name = "Pump Zone";
|
||||
new_zone.type = ZONE_TYPE_SINGLE;
|
||||
new_zone.leds_min = 1;
|
||||
new_zone.leds_max = 1;
|
||||
new_zone.leds_count = 1;
|
||||
new_zone.matrix_map = NULL;
|
||||
zones.push_back(new_zone);
|
||||
|
||||
led new_led;
|
||||
|
||||
new_led.name = "Pump LED";
|
||||
leds.push_back(new_led);
|
||||
|
||||
SetupColors();
|
||||
}
|
||||
|
||||
void RGBController_CorsairHydro::ResizeZone(int /*zone*/, int /*new_size*/)
|
||||
{
|
||||
/*---------------------------------------------------------*\
|
||||
| This device does not support resizing zones |
|
||||
\*---------------------------------------------------------*/
|
||||
}
|
||||
|
||||
void RGBController_CorsairHydro::DeviceUpdateLEDs()
|
||||
{
|
||||
DeviceUpdateMode();
|
||||
}
|
||||
|
||||
void RGBController_CorsairHydro::UpdateZoneLEDs(int /*zone*/)
|
||||
{
|
||||
DeviceUpdateLEDs();
|
||||
}
|
||||
|
||||
void RGBController_CorsairHydro::UpdateSingleLED(int /*led*/)
|
||||
{
|
||||
DeviceUpdateLEDs();
|
||||
}
|
||||
|
||||
void RGBController_CorsairHydro::SetCustomMode()
|
||||
{
|
||||
active_mode = 0;
|
||||
}
|
||||
|
||||
void RGBController_CorsairHydro::DeviceUpdateMode()
|
||||
{
|
||||
switch(modes[active_mode].value)
|
||||
{
|
||||
case 0:
|
||||
corsair->SetFixed(colors);
|
||||
break;
|
||||
|
||||
case 1:
|
||||
corsair->SetBlink(modes[active_mode].colors, modes[active_mode].speed);
|
||||
break;
|
||||
|
||||
case 2:
|
||||
corsair->SetShift(modes[active_mode].colors, modes[active_mode].speed);
|
||||
break;
|
||||
|
||||
case 3:
|
||||
corsair->SetPulse(modes[active_mode].colors, modes[active_mode].speed);
|
||||
break;
|
||||
}
|
||||
}
|
||||
/*-----------------------------------------*\
|
||||
| RGBController_CorsairHydro.cpp |
|
||||
| |
|
||||
| Generic RGB Interface for Corsair |
|
||||
| Hydro Series |
|
||||
| |
|
||||
| Adam Honse (CalcProgrammer1) 8/18/2020 |
|
||||
\*-----------------------------------------*/
|
||||
|
||||
#include "RGBController_CorsairHydro.h"
|
||||
|
||||
/**------------------------------------------------------------------*\
|
||||
@name Corsair Hydro
|
||||
@type USB
|
||||
@save :x:
|
||||
@direct :white_check_mark:
|
||||
@effects :white_check_mark:
|
||||
@detectors DetectCorsairHydroControllers
|
||||
@comment
|
||||
\*-------------------------------------------------------------------*/
|
||||
|
||||
RGBController_CorsairHydro::RGBController_CorsairHydro(CorsairHydroController* controller_ptr)
|
||||
{
|
||||
controller = controller_ptr;
|
||||
|
||||
vendor = "Corsair";
|
||||
description = "Corsair Hydro Series Device";
|
||||
version = controller->GetFirmwareString();
|
||||
type = DEVICE_TYPE_COOLER;
|
||||
location = controller->GetLocation();
|
||||
|
||||
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);
|
||||
|
||||
mode Blinking;
|
||||
Blinking.name = "Blinking";
|
||||
Blinking.value = 1;
|
||||
Blinking.flags = MODE_FLAG_HAS_SPEED | MODE_FLAG_HAS_MODE_SPECIFIC_COLOR;
|
||||
Blinking.color_mode = MODE_COLORS_MODE_SPECIFIC;
|
||||
Blinking.speed_min = 0x0F;
|
||||
Blinking.speed_max = 0x05;
|
||||
Blinking.speed = 0x0A;
|
||||
Blinking.colors_min = 2;
|
||||
Blinking.colors_max = 2;
|
||||
Blinking.colors.resize(2);
|
||||
modes.push_back(Blinking);
|
||||
|
||||
mode ColorShift;
|
||||
ColorShift.name = "Color Shift";
|
||||
ColorShift.value = 2;
|
||||
ColorShift.flags = MODE_FLAG_HAS_SPEED | MODE_FLAG_HAS_MODE_SPECIFIC_COLOR;
|
||||
ColorShift.color_mode = MODE_COLORS_MODE_SPECIFIC;
|
||||
ColorShift.speed_min = 0x46;
|
||||
ColorShift.speed_max = 0x0F;
|
||||
ColorShift.speed = 0x28;
|
||||
ColorShift.colors_min = 2;
|
||||
ColorShift.colors_max = 2;
|
||||
ColorShift.colors.resize(2);
|
||||
modes.push_back(ColorShift);
|
||||
|
||||
mode Pulsing;
|
||||
Pulsing.name = "Pulsing";
|
||||
Pulsing.value = 3;
|
||||
Pulsing.flags = MODE_FLAG_HAS_SPEED | MODE_FLAG_HAS_MODE_SPECIFIC_COLOR;
|
||||
Pulsing.color_mode = MODE_COLORS_MODE_SPECIFIC;
|
||||
Pulsing.speed_min = 0x50;
|
||||
Pulsing.speed_max = 0x1E;
|
||||
Pulsing.speed = 0x37;
|
||||
Pulsing.colors_min = 2;
|
||||
Pulsing.colors_max = 2;
|
||||
Pulsing.colors.resize(2);
|
||||
modes.push_back(Pulsing);
|
||||
|
||||
SetupZones();
|
||||
}
|
||||
|
||||
RGBController_CorsairHydro::~RGBController_CorsairHydro()
|
||||
{
|
||||
delete controller;
|
||||
}
|
||||
|
||||
void RGBController_CorsairHydro::SetupZones()
|
||||
{
|
||||
zone new_zone;
|
||||
|
||||
new_zone.name = "Pump Zone";
|
||||
new_zone.type = ZONE_TYPE_SINGLE;
|
||||
new_zone.leds_min = 1;
|
||||
new_zone.leds_max = 1;
|
||||
new_zone.leds_count = 1;
|
||||
new_zone.matrix_map = NULL;
|
||||
zones.push_back(new_zone);
|
||||
|
||||
led new_led;
|
||||
|
||||
new_led.name = "Pump LED";
|
||||
leds.push_back(new_led);
|
||||
|
||||
SetupColors();
|
||||
}
|
||||
|
||||
void RGBController_CorsairHydro::ResizeZone(int /*zone*/, int /*new_size*/)
|
||||
{
|
||||
/*---------------------------------------------------------*\
|
||||
| This device does not support resizing zones |
|
||||
\*---------------------------------------------------------*/
|
||||
}
|
||||
|
||||
void RGBController_CorsairHydro::DeviceUpdateLEDs()
|
||||
{
|
||||
DeviceUpdateMode();
|
||||
}
|
||||
|
||||
void RGBController_CorsairHydro::UpdateZoneLEDs(int /*zone*/)
|
||||
{
|
||||
DeviceUpdateLEDs();
|
||||
}
|
||||
|
||||
void RGBController_CorsairHydro::UpdateSingleLED(int /*led*/)
|
||||
{
|
||||
DeviceUpdateLEDs();
|
||||
}
|
||||
|
||||
void RGBController_CorsairHydro::SetCustomMode()
|
||||
{
|
||||
active_mode = 0;
|
||||
}
|
||||
|
||||
void RGBController_CorsairHydro::DeviceUpdateMode()
|
||||
{
|
||||
switch(modes[active_mode].value)
|
||||
{
|
||||
case 0:
|
||||
controller->SetFixed(colors);
|
||||
break;
|
||||
|
||||
case 1:
|
||||
controller->SetBlink(modes[active_mode].colors, modes[active_mode].speed);
|
||||
break;
|
||||
|
||||
case 2:
|
||||
controller->SetShift(modes[active_mode].colors, modes[active_mode].speed);
|
||||
break;
|
||||
|
||||
case 3:
|
||||
controller->SetPulse(modes[active_mode].colors, modes[active_mode].speed);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,33 +1,33 @@
|
||||
/*-----------------------------------------*\
|
||||
| RGBController_CorsairHydro.h |
|
||||
| |
|
||||
| Generic RGB Interface for Corsair |
|
||||
| Hydro Series |
|
||||
| |
|
||||
| Adam Honse (CalcProgrammer1) 8/17/2020 |
|
||||
\*-----------------------------------------*/
|
||||
|
||||
#pragma once
|
||||
#include "RGBController.h"
|
||||
#include "CorsairHydroController.h"
|
||||
|
||||
class RGBController_CorsairHydro : public RGBController
|
||||
{
|
||||
public:
|
||||
RGBController_CorsairHydro(CorsairHydroController* corsair_ptr);
|
||||
~RGBController_CorsairHydro();
|
||||
|
||||
void SetupZones();
|
||||
|
||||
void ResizeZone(int zone, int new_size);
|
||||
|
||||
void DeviceUpdateLEDs();
|
||||
void UpdateZoneLEDs(int zone);
|
||||
void UpdateSingleLED(int led);
|
||||
|
||||
void SetCustomMode();
|
||||
void DeviceUpdateMode();
|
||||
|
||||
private:
|
||||
CorsairHydroController* corsair;
|
||||
};
|
||||
/*-----------------------------------------*\
|
||||
| RGBController_CorsairHydro.h |
|
||||
| |
|
||||
| Generic RGB Interface for Corsair |
|
||||
| Hydro Series |
|
||||
| |
|
||||
| Adam Honse (CalcProgrammer1) 8/17/2020 |
|
||||
\*-----------------------------------------*/
|
||||
|
||||
#pragma once
|
||||
#include "RGBController.h"
|
||||
#include "CorsairHydroController.h"
|
||||
|
||||
class RGBController_CorsairHydro : public RGBController
|
||||
{
|
||||
public:
|
||||
RGBController_CorsairHydro(CorsairHydroController* controller_ptr);
|
||||
~RGBController_CorsairHydro();
|
||||
|
||||
void SetupZones();
|
||||
|
||||
void ResizeZone(int zone, int new_size);
|
||||
|
||||
void DeviceUpdateLEDs();
|
||||
void UpdateZoneLEDs(int zone);
|
||||
void UpdateSingleLED(int led);
|
||||
|
||||
void SetCustomMode();
|
||||
void DeviceUpdateMode();
|
||||
|
||||
private:
|
||||
CorsairHydroController* controller;
|
||||
};
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user