Compare commits

...
Author SHA1 Message Date
Adam Honse 0fca93e454 OpenRGB Release Candidate 1.0rc2 2025-09-14 14:31:57 -05:00
Adam Honse 664b794efa Update warning message if I2C doesn't load 2025-09-14 14:31:46 -05:00
Adam Honse c60cf5d2de Update SMBus documentation for PawnIO 2025-09-14 14:31:33 -05:00
Adam Honse 8d8f70bfdf Only build PawnIO support in 64-bit builds, provide non-functional stub implementations in super_io.cpp for 32-bit builds 2025-09-14 14:31:23 -05:00
Adam Honse b349c3ff2c Update PawnIO SMBus driver to use standardized API between all drivers, add NCT6793 driver, and remove WinRing0 SMBus drivers 2025-09-14 14:31:13 -05:00
Stephen Horvath 30a250c7df Replace WinRing0 with PawnIO for SMBus and Super-IO access on Windows
Commits squashed, files cleaned up, and rebased by Adam Honse <[email protected]>
2025-09-14 14:31:02 -05:00
Adam Honse a1449d99cf Change suffix back to git after 1.0rc2wr0 release candidate 2025-09-14 14:30:51 -05:00
Adam Honse a589a0f0b8 OpenRGB Release Candidate 1.0rc2wr0 2025-09-14 14:30:17 -05:00
Adam Honse 21594063ca More warning fixes 2025-09-14 13:41:44 -05:00
Adam Honse 8f89583eb0 Fix some warnings 2025-09-14 13:29:08 -05:00
austinleroy 8487b5c89d Adding support for Logitech G600 Mouse 2025-09-14 13:15:55 -05:00
John DeSilva 3a2d0f46ac Update HYTEMouseMatController to compile on FreeBSD
This change includes the libusb implementation files of
HYTEMouseMatController as sources when compiling on FreeBSD. Without
this change, we see `error: unknown type name 'HYTEMousematController'`.
2025-09-14 13:00:47 +00:00
John DeSilva 8af2461735 Include a startup source for FreeBSD
This seems to have been missed when the startup files were split out
during a refactor to support starting OpenRGB as a Windows service in
cf2df815e3.

Without this change, we see `ld: error: undefined symbol: main` when
compiling on FreeBSD.

I chose to name the file main_FreeBSD_Linux_MacOS instead of
main_Linux_MacOS_FreeBSD to keep the list alphabetical.
2025-09-14 13:00:47 +00:00
Adam Honse 6c8c48d2fe Add option for installing OpenRGB as a service in Wix installer 2025-09-14 03:54:27 -05:00
Fefedu973 f8895af960 Add support for the StreamDeck 2025-09-14 00:59:48 -05:00
Adam Honse 4664a27d6b Disable realtime malware scanning on GitLab CI so that it doesn't break builds with WinRing0 2025-09-14 00:27:46 -05:00
Adam Honse 2609822f8a Fix flickering on JGINYUE USB controller direct mode 2025-09-13 17:01:22 -05:00
Barry H cd3ad1822b Add EVGA RTX 2070 FTW3 Ultra OC, RTX 2080 XC HYBRID GAMING & 2080 Ti FTW3 Ultra Hydro Copper Gaming 2025-09-12 10:35:37 -05:00
Austin Blake 0a6930945e Add support for Gigabyte Radeon RX 9070 XT Gaming 16G 2025-09-11 11:57:14 -05:00
Alexander Mateides 4373df41ba Support for Gigabyte RX9070 Gaming OC 16G 2025-09-11 01:01:23 -05:00
Cosebdd 0971aa92c3 Excluded mode change from MSI GPU FPS Limiter 2025-09-10 07:49:49 -05:00
Fefedu973 f2aef24b8a Fixed govee direct mode control 2025-09-10 00:36:04 -05:00
silverspy18 f019320df1 Increased I2C_SMBUS_BLOCK_MAX and added error handling for buffer overflow. 2025-09-07 13:31:42 -05:00
Sniper Framirez 3af3d137a5 Support Gainward GeForce RTX 3060 Pegasus 12G 2025-09-07 00:33:08 -05:00
Nexrem 9d0d65ca3a Commonize other RedDevil driver under one tree and detector as V1 2025-09-05 08:45:20 -05:00
Nexrem 9a33c95b69 Add support for PowerColor Red Devil RX9070XT 2025-09-04 09:20:17 -05:00
Adam Honse b113fd8cbc Update RGBController documentation 2025-08-26 20:16:28 -05:00
Adam Honse 1836b5e417 Update Detector documentation 2025-08-26 17:07:02 -05:00
Erick Granados d5f9411ecb Fixes for the XPGSummoner keyboard controller 2025-08-26 12:23:25 -05:00
The Cyric 9ad0fa26bf Add another subdevice id for Gigabyte 5090 XTREME WATERFORCE 2025-08-26 08:16:03 -05:00
morg 6a4550c6f0 DetectNZXTKrakenElite: Add missing detector in controller comments 2025-08-26 08:09:01 -05:00
Daniel Clark cc3414408f Fix upstream regression. in DeviceUpdateLEDs() RGBFusion 2.0 USB. 2025-08-25 18:38:17 -05:00
Zoran Peričić fd8101b0c3 Support Kingston Fury Beast DDR5 with Jedec ID: 0x3011 2025-08-24 20:37:24 +02:00
2B 18f484c274 add support for Gigabyte Radeon RX 7900 XT GAMING OC 20G 2025-08-23 01:15:51 -05:00
Adam Honse 221f5007ab Fix laptop and monitor device type strings 2025-08-22 21:52:31 -05:00
Chris fbb7d16039 Changed Gigabyte Fusion 2 controller
* Removed warnings
* Refactored RGBFusion2USBController::SetLEDEffect() to improve readability
* Tidied up Mode declarations
* Other changes for style and formatting
2025-08-22 07:57:02 -05:00
Nikola Jurkovic ca84bad1fc MM700 Extended 3XL 2025-08-22 07:52:25 -05:00
Adam Honse be9fe7bb2d Fix Commander Core XT when configuring RGB header zone to zero and when switching between zero and nonzero modes 2025-08-21 22:43:32 -05:00
Nikola Jurkovic e21d29fa27 Commander Core XT 2025-08-21 22:38:04 -05:00
Erick Granados febdd2ad5e Added Controller for XPG Summoner 2025-08-18 15:26:53 -05:00
Daniel Clark 503ad36256 Merge rework of IT8297, IT5702, IT5711 driver code. Adds new controller IT82950. 2025-08-18 14:46:00 -05:00
Erick Granados 1be1656ce8 Added Controller for SteelSeries QCK PRISM XL Destiny 2: Lightfall Edition 2025-08-18 01:05:41 -05:00
Barry H cd6831ccbe Add Nollie 1, 8, 16 & 32 OS2 Firmware support 2025-08-18 01:03:18 -05:00
Adam Honse 676547b8b0 Pass name string into I2C DIMM detectors, store name in KingstonFuryDRAMController to avoid setting it in detector 2025-08-17 01:17:02 -05:00
Adam Honse c82a6052a2 Store name in AsusAuraUSBControllers to avoid setting it in detectors 2025-08-16 18:26:09 -05:00
Adam Honse a0726dc065 Store name in LogitechControllers to avoid setting it in detectors 2025-08-16 16:47:44 -05:00
Robert Ernst 86fbdfa6e7 Add Mystic Light Controller with PID 7D14 of Mainboard MSI A520M PRO 2025-08-16 12:04:55 -05:00
Anshi Mehta 0eb082f21b docs: improve wording and clarity in mode description 2025-08-16 12:03:36 -05:00
Shaydera 714736bf73 Fix RGB controller detection for Gigabyte AORUS RTX 5090 MASTER (use 0x75) 2025-08-16 12:03:05 -05:00
Adam Honse 079e344c5a Store name in RoccatControllers to avoid setting it in detectors 2025-08-16 02:07:11 -05:00
Adam Honse c2e0bd496f Store name in SinowealthControllers to avoid setting it in detectors 2025-08-16 01:15:15 -05:00
Adam Honse f1a050a503 Store name in SteelSeriesControllers to avoid setting it in detectors, rework SteelSeriesApexBaseController to move code out of header file 2025-08-16 00:37:51 -05:00
Adam Honse bf24ab3d53 Store name in ENESMBusController to avoid setting it in detector 2025-08-15 22:53:36 -05:00
Adam Honse 5190274004 Store name in MSIGPUv2Controller to avoid setting it in detector 2025-08-15 16:57:02 -05:00
Adam Honse 5db766cfa0 Store name in CoolerMasterControllers to avoid setting it in detectors 2025-08-15 16:16:13 -05:00
Eve ddc8bc5885 Alternate PCI subsystem ID for EVGA RTX3070 FTW3 Ultra LHR 2025-08-15 16:11:06 -05:00
Adam Honse 4036a9e414 Store name in CorsairPeripheralV2Controllers to avoid setting it in detectors 2025-08-15 12:19:05 -05:00
Adam Honse fa74b64d6d Remove unused CorsairK95PlatinumXTController files 2025-08-15 12:10:09 -05:00
Adam Honse 59c2ca2052 Store name in CorsairPeripheralControllers to avoid setting it in detectors 2025-08-15 11:40:28 -05:00
Chris M a528db1604 Simplified / Modularised the Appimage runner scripts 2025-08-15 01:06:20 -05:00
Chris M 72a5afc910 Added Trixie builds
* Combined common Deb build steps
2025-08-15 01:04:05 -05:00
jurkovic-nikola 974f7d1e26 commander core packet size 2025-08-15 00:39:42 -05:00
Adam Honse 2a6ad477e6 Store name in HoltekControllers to avoid setting it in detectors 2025-08-14 23:37:05 -05:00
Adam Honse ce64dbc686 Store name in ZotacV2GPUController to avoid setting it in detector 2025-08-14 23:36:56 -05:00
Adam Honse eb199dae67 Store name in ZotacTuringGPUController to avoid setting it in detector 2025-08-14 23:36:48 -05:00
Adam Honse ad9fd08a08 Store name in ZETKeyboardController to avoid setting it in detector 2025-08-14 23:36:40 -05:00
Adam Honse 86b2ced685 Store name in ZETEdgeAirProController to avoid setting it in detector 2025-08-14 23:36:33 -05:00
Adam Honse 4e96056ac4 Store name in ZalmanZSyncController to avoid setting it in detector 2025-08-14 23:01:51 -05:00
Adam Honse 84c24e70c0 Store name in WushiController to avoid setting it in detector 2025-08-14 22:59:05 -05:00
Adam Honse d069947252 Store name in WootingKeyboardController to avoid setting it in detector 2025-08-14 22:56:43 -05:00
Adam Honse 550503d757 Store name in ViewSonicController to avoid setting it in detector 2025-08-14 22:43:40 -05:00
Adam Honse ef6241fe38 Store name in ValkyrieKeyboardController to avoid setting it in detector 2025-08-14 22:31:59 -05:00
Adam Honse fcce668d66 Store name in TrustControllers to avoid setting it in detectors 2025-08-14 20:20:10 -05:00
Adam Honse 1bd9215a72 Store name in SRGBmodsControllers to avoid setting it in detectors 2025-08-14 20:11:54 -05:00
Adam Honse 840512751c Store name in SonyDualSenseController to avoid setting it in detector 2025-08-14 20:08:40 -05:00
Adam Honse 517287117b Store name in SkyloongController to avoid setting it in detector 2025-08-14 20:05:55 -05:00
Adam Honse 46d935c1a4 Store name in SapphireGPUControllers to avoid setting it in detectors 2025-08-14 20:03:41 -05:00
Adam Honse 9680d072fa Store name in RedSquareControllers to avoid setting it in detectors 2025-08-14 19:32:37 -05:00
Adam Honse 06413f2877 Store name in RedragonMouseController to avoid setting it in detector 2025-08-14 19:28:20 -05:00
Adam Honse ce86faabfe Store name in PowerColorRedDevilGPUController to avoid setting it in detector 2025-08-14 19:24:58 -05:00
Adam Honse 2134323bf8 Store name in PNYLovelaceGPUController to avoid setting it in detector 2025-08-14 19:17:34 -05:00
Adam Honse 67e08d3415 Store name in PatriotViperMouseController to avoid setting it in detector 2025-08-14 19:13:11 -05:00
Adam Honse f8d3c7a838 Store name in PalitGPUController to avoid setting it in detector 2025-08-14 19:10:35 -05:00
Adam Honse 2c630a5218 Store name in OKSKeyboardController to avoid setting it in detector 2025-08-14 19:06:29 -05:00
Adam Honse e418aa7f95 Store name in NZXTMouseController to avoid setting it in detector 2025-08-14 19:00:39 -05:00
Adam Honse 3ab1519e25 Store name in NZXTKrakenController to avoid setting it in detector 2025-08-14 11:50:06 -05:00
Adam Honse d8c40cab6d Store name in NZXTHue2Controller to avoid setting it in detector 2025-08-14 11:46:34 -05:00
Adam Honse f0e9650085 Store name in NZXTHue1Controller to avoid setting it in detector 2025-08-14 11:42:53 -05:00
Adam Honse a34d796059 Store name in NVIDIAIlluminationController to avoid setting it in detector 2025-08-14 11:42:43 -05:00
Adam Honse 9470cb69fd Store name in NvidiaESAController to avoid setting it in detector 2025-08-14 11:34:16 -05:00
Adam Honse 520b83a226 Store name in NollieController to avoid setting it in detector 2025-08-14 11:31:42 -05:00
Adam Honse 85af2e1ed7 Store name in N5312AController to avoid setting it in detector 2025-08-14 11:29:00 -05:00
Adam Honse f420e9bbbe Store name in MSIVigorController to avoid setting it in detector 2025-08-14 11:26:20 -05:00
Adam Honse 82cb9fb7d0 Fill in location in GigabyteSuperIORGBController 2025-08-14 10:19:50 -05:00
Adam Honse 719d7b8801 Store name in MSIRGBController to avoid setting it in detector 2025-08-14 10:19:11 -05:00
Adam Honse b13ca818bb Store name in MSIOptixController to avoid setting it in detector 2025-08-14 10:02:46 -05:00
Nikola Jurkovic 2dd013a0a0 AIO H1xx ELITE Series 2025-08-13 17:37:10 -05:00
Adam Honse 49e4f00aff Store name in MSIMysticLightControllers to avoid setting it in detectors 2025-08-13 11:49:45 -05:00
Adam Honse 4c018421a2 Fix warning from unused name parameter in LianLiControllerDetect 2025-08-12 19:33:15 -05:00
Adam Honse a2826ec865 Store name in MSIGPUController to avoid setting it in detector 2025-08-12 19:27:44 -05:00
Adam Honse c256b6246a Store name in MountainKeyboardController to avoid setting it in detector 2025-08-12 18:57:10 -05:00
Adam Honse f9bfb951ca Store name in MintakaKeyboardController to avoid setting it in detector 2025-08-12 18:54:35 -05:00
Adam Honse 8c63eeea47 Store name in LuxaforController to avoid setting it in detector 2025-08-12 18:48:34 -05:00
Adam Honse b136e7739a Store name in LinuxLEDController to avoid setting it in detector 2025-08-12 18:44:35 -05:00
Adam Honse 2967ccb1cb Add a mutex and remove a timeout to reduce flicker on HYTE Q60 logo LEDs 2025-08-12 13:10:36 -05:00
Adam Honse 03d5dd6008 Fix name initialization typo in HYTENexusController 2025-08-12 10:14:00 -05:00
Adam Honse 89d1ee2483 Remove name override for LianLiStrimerLConnect to match other LianLi controllers 2025-08-12 09:55:40 -05:00
Adam Honse c313b19fc5 Store name in LGMonitorController to avoid setting it in detector 2025-08-12 09:53:03 -05:00
Nikola Jurkovic 2a6856a5d2 fix led enumeration when lcd cap is installed 2025-08-12 08:47:23 -05:00
Adam Honse f3c7a213b1 Store name in LexipMouseController to avoid setting it in detector 2025-08-11 20:46:58 -05:00
Adam Honse f6ddf5676a Store name in LenovoMotherboardController to avoid setting it in detector 2025-08-11 20:45:07 -05:00
Adam Honse b331fbcd4d Store name in LenovoControllers to avoid setting it in detectors 2025-08-11 20:37:48 -05:00
Adam Honse 41eec46fa7 Store name in LegoDimensionsToypadBaseController to avoid setting it in detector 2025-08-11 20:31:05 -05:00
Adam Honse 0eb34eec25 Store name in LEDStripController to avoid setting it in detector 2025-08-11 20:23:07 -05:00
Adam Honse a1f144daf2 Store name in KeychronKeyboardController to avoid setting it in detector 2025-08-11 18:29:59 -05:00
Adam Honse ca73941e5d Store name in IonicoController to avoid setting it in detector 2025-08-11 18:07:13 -05:00
Adam Honse 0bdf600409 Store name in InstantMouseController to avoid setting it in detector 2025-08-11 18:04:55 -05:00
Adam Honse d5f8e2cac9 Store name in HYTENexusController to avoid setting it in detector 2025-08-11 18:02:26 -05:00
Adam Honse 20f3e5db0b Store name in HYTEMousematController to avoid setting it in detector 2025-08-11 17:24:00 -05:00
Adam Honse d412ef5e17 Store name in HYTEKeyboardController to avoid setting it in detector 2025-08-11 17:24:00 -05:00
Adam Honse 0269cdd068 Store name in HyperXMousematControllers to avoid setting it in detector 2025-08-11 17:24:00 -05:00
Nikola Jurkovic 12f90a67f9 link system hub fixups 2025-08-11 10:08:54 -05:00
Adam Honse ca554d9ef6 Store name in HyperXMouseControllers to avoid setting it in detectors 2025-08-10 21:26:58 -05:00
Adam Honse 0c0ffe7f5c Store name in HyperXMicrophoneController to avoid setting it in detector 2025-08-10 21:02:42 -05:00
Adam Honse 0eee6044b2 Fix name setting in GalaxGPUv1Controller 2025-08-10 16:55:24 -05:00
Adam Honse da21f992c5 Store name in HyperXKeyboardControllers to avoid setting it in detectors 2025-08-10 16:51:32 -05:00
Adam Honse 6c8a46cc7d Store name in HyperXDRAMController to avoid setting it in detector 2025-08-10 16:22:38 -05:00
Adam Honse aa31e21868 Don't override name in HoltekControllerDetect, names are generic so not saving them in Controller 2025-08-10 16:17:36 -05:00
lightminerva ee66121364 Move corsair k95 rgb platinum xt to the corsair peripheral v2 controller 2025-08-10 14:39:44 -05:00
Adam Honse 327edf2a6b Store name in GigabyteSuperIORGBController to avoid setting it in detector 2025-08-10 00:33:01 -05:00
Adam Honse 2535ac3edf Store name in GigabyteRGBFusionGPUController to avoid setting it in detector 2025-08-10 00:27:45 -05:00
Adam Honse df56b42e62 Store name in GigabyteRGBFusion2GPUController to avoid setting it in detector 2025-08-10 00:22:08 -05:00
Adam Honse bed69130fd Store name in GigabyteRGBFusion2BlackwellGPUController to avoid setting it in detector 2025-08-10 00:18:25 -05:00
Adam Honse f54460fd2e Store name in GigabyteAorusPCCaseController to avoid setting it in detector 2025-08-10 00:08:59 -05:00
Adam Honse 2bde9b287f Store name in GigabyteAorusMouseController to avoid setting it in detector 2025-08-10 00:07:00 -05:00
Adam Honse c8abbc6054 Add Razer Blackwidow V4 Pro 75% (Wired) 2025-08-08 19:20:35 -05:00
Adam Honse cba7c016d3 Store name in GigabyteAorusLaptopController to avoid setting it in detector 2025-08-08 11:43:37 -05:00
Adam Honse 7d0db424ec Store name in GigabyteAorusCPUCoolerController to avoid setting it in detector 2025-08-08 11:37:10 -05:00
Adam Honse 6f9e164874 Store name in GalaxGPUControllers to avoid setting it in detectors 2025-08-08 11:36:59 -05:00
Adam Honse 2927135cdd Store name in GaiZhongGaiControllers to avoid setting it in detector 2025-08-08 11:26:55 -05:00
Adam Honse 0afcdbd0ca Store name in GainwardGPUControllers to avoid setting it in detectors 2025-08-08 11:21:43 -05:00
Adam Honse 8813c9936d Store name in EVGAUSBControllers to avoid setting it in detectors 2025-08-08 00:11:31 -05:00
Adam Honse abe7068197 Store name in EVisionKeyboardControllers to avoid setting it in detectors 2025-08-07 23:22:41 -05:00
Adam Honse d7f0872690 Store name in EVGATuringGPUController to avoid setting it in detector 2025-08-07 23:04:29 -05:00
Adam Honse df75659778 Rework EVGAPascalGPUController to use I2C PCI detector and store name in controller to avoid setting it in detector 2025-08-07 23:03:53 -05:00
Adam Honse c32663bb32 Rework EVGAGP102GPUController to use I2C PCI detector and store name in controller to avoid setting it in detector 2025-08-07 11:55:18 -05:00
Adam Honse c94eed432d Store name in EVGAAmpereGPUController to avoid setting it in detector 2025-08-07 11:53:26 -05:00
Adam Honse a73a879238 Store name in DuckyKeyboardController to avoid setting it in detector 2025-08-07 11:17:54 -05:00
Adam Honse a8500a2a8a Store name in DRGBController to avoid setting it in detector 2025-08-06 17:18:39 -05:00
Adam Honse 718962c188 Store name in DasKeyboardController to avoid setting it in detector 2025-08-06 17:13:55 -05:00
Adam Honse e6190ec275 Store name in DreamCheekyController to avoid setting it in detector 2025-08-06 11:31:48 -05:00
Adam Honse 13e8f70438 Store name in DarkProjectrKeyboardController to avoid setting it in detector 2025-08-06 11:27:37 -05:00
Adam Honse ea206235c5 Store name in CryorigH7QuadLumiController to avoid setting it in detector 2025-08-06 08:33:36 -05:00
Adam Honse dc0103a155 Store name in CreativeSoundBlasterXG6Controller to avoid setting it in detector 2025-08-06 08:25:20 -05:00
Adam Honse 31ec06b576 Store name in CougarControllers to avoid setting it in detectors 2025-08-06 00:48:13 -05:00
Adam Honse 17a58b4c22 Store name in CorsairLightingNodeController to avoid setting it in detector 2025-08-06 00:48:13 -05:00
Chris Pawlukiewicz 56564092bc New device: Gigabyte GV-N5090GAMING-OC-32GD 2025-08-05 20:57:48 -05:00
Adam Honse 2b546fce9f Store name in CorsairHydroPlatinumController to avoid setting it in detector 2025-08-05 20:50:38 -05:00
Sirs0ri 69a065eeed New device: ASUS ROG-STRIX-RTX3070-8G-V2-GAMING 2025-08-05 13:49:20 -05:00
Chris M a7c01e039d Fixed Gigabyte Blackwell GPU controller metadata 2025-08-05 19:37:26 +10:00
Adam Honse 4639833bdb Store name in CorsairHydroController to avoid setting it in detector 2025-08-04 17:35:00 -05:00
Adam Honse bf6fe2b4fb Default name in RGBController_CorsairHydro2 to avoid setting it in detector 2025-08-04 17:24:36 -05:00
Adam Honse 04d2ebacca Store name in CorsairDominatorPlatinumController to avoid setting it in detector 2025-08-04 17:18:26 -05:00
Adam Honse e44fd9ed78 Store name in CorsairCommanderCoreController to avoid setting it in detector, fix detector name 2025-08-04 17:15:58 -05:00
Adam Honse 526d35edfe Store name in ColorfulGPUControllers to avoid setting it in detectors 2025-08-04 17:12:14 -05:00
Adam Honse 2ec68c29de Store name in CherryKeyboardController to avoid setting it in detector 2025-08-04 14:04:27 -05:00
Adam Honse c761661386 Store name in AsusLegacyUSBControllers to avoid setting it in detectors 2025-08-04 13:37:21 -05:00
Adam Honse 142e7fcc02 Close HYTE mousemat connections (libusb/serial) on destructor to fix rescan 2025-08-03 22:35:34 -05:00
Adam Honse e928111c00 Store name in AsusAuraGPUController to avoid setting it in detector 2025-08-03 22:05:37 -05:00
Adam Honse 0665ded648 Remove name comment from AsusAuraCoreControllerDDetect 2025-08-03 22:03:21 -05:00
Adam Honse b9a8a62e38 Store name in AOCMousematController to avoid setting it in detector 2025-08-03 21:42:40 -05:00
Adam Honse 74bbaaf643 Store name in AOCMouseController to avoid setting it in detector 2025-08-03 21:38:07 -05:00
Adam Honse 5799ea8160 Store name in AOCKeyboardController to avoid setting it in detector 2025-08-03 21:33:56 -05:00
Adam Honse 3dc2453deb Remove name comment from AnnePro2ControllerDetect 2025-08-03 21:31:57 -05:00
Adam Honse d2b3965bc2 Remove name comment from AMDWraithPrismControllerDetect 2025-08-03 21:31:39 -05:00
Adam Honse e4da571d6b Store name in AlienwareMonitorController to avoid setting it in detector 2025-08-03 21:28:27 -05:00
Adam Honse 5e45480a0e Store name in AlienwareKeyboardControllers to avoid setting it in detector 2025-08-03 18:43:02 -05:00
Adam Honse 90c1e10cc5 Fix AlienwareMonitorController on Linux 2025-08-02 17:45:44 -05:00
Daniel Schaefer 0255b09e0e Compiling.md: Update MSVC runtime download URL 2025-08-02 14:23:13 -05:00
Adam Honse bd21325d04 Fix warnings 2025-08-02 01:59:44 -05:00
berendi 9bc2a6fa2b Initial support for PNY ARGB EPIC X 5070Ti
Commits squashed, cleaned, and reworked for 5070Ti by Adam Honse <[email protected]>
2025-08-02 01:29:03 -05:00
Aiden Vigue cb3f0fdcbd Support for iCUE Link System Hub & attached devices
Commits amended to adhere to OpenRGB code standards and restructure functional layout by Adam Honse <[email protected]>
2025-08-01 21:46:29 -05:00
Adam Honse b8628bb495 Store name in BloodyB820RController to avoid setting it in detector 2025-08-01 11:37:40 -05:00
Adam Honse 9c26f79ca6 Store name in BloodyMouseController to avoid setting it in detector 2025-08-01 11:35:38 -05:00
Adam Honse 30f9b84d5f Use GetName instead of directly accessing the RGBController::name member outside of Controllers 2025-08-01 11:32:55 -05:00
Leon 1318d23401 "Add support for Asus ROG RTX5090 Astral OC BTF and WHITE" 2025-08-01 00:10:13 -05:00
Adam Honse 9fb71a30ec Use getter functions when accessing string fields in RGBControllers in ProfileManager and cli 2025-07-31 18:55:12 -05:00
Adam Honse abd34f1810 Rework RGBControllers and detectors that set string fields other than name outside of the RGBController 2025-07-31 18:36:06 -05:00
Adam Honse 6a472437bb Remove unnecessary implementations of SetCustomMode 2025-07-31 17:35:20 -05:00
Adam Honse 43b97bca75 Rework Debug controller and add manual settings entry for it, also remove graying out the settings save button as sometimes it prevents saving changes 2025-07-31 00:11:18 -05:00
Chris M a667bd456c Removed non-printable characters from License.rtf
* Changed EOL character from Linux LF to Windows CRLF
2025-07-30 22:17:32 +10:00
Adam Honse c6de7cf784 Mark OpenRGB.exe as KeyPath in Wix installer 2025-07-28 21:13:21 -05:00
Adam Honse 59deaad070 Add file header comment to ResourceManagerInterface.h 2025-07-27 01:49:45 -05:00
Muhamad Visat 7709799bc2 Add support for the GALAX GeForce RTX 3080 SG 2025-07-27 01:30:22 -05:00
Adam Honse d59138363e Handle condition where detection finishes before OpenRGBDialog constructor finishes/has time to register detection end callback. Fixes plugins not loading when running OpenRGB as a background service. 2025-07-26 02:36:38 -05:00
Adam Honse faaf2009b6 Add keepalive thread for Razer Blade 14 2021 and 2022 that sends a get device request to keep lighting active 2025-07-26 01:44:09 -05:00
Adam Honse 66c9691c87 Add exception for HYTE NP50 third channel, which needs to send 750 bytes according to documentation 2025-07-25 00:57:00 -05:00
Adam Honse 73d09e7c1c Fix HYTE Nexus Portal NP50 2025-07-25 00:30:37 -05:00
Arthur de Groot 3a508e71aa Update SDK docs 2025-07-24 10:16:57 -05:00
robynegrul a1d7a76349 Lenovo Legion S7 Gen7 2025-07-23 21:22:28 -05:00
Adam Honse 5ea65eda5a Update Compiling.md Windows section to reference the OpenRGB-Qt-Packages and build-windows.bat method of building OpenRGB from source, which is the official build procedure used by the pipeline builds 2025-07-22 19:54:02 -05:00
NolanPG 29347b9b4d Fix Gigabyte's RX 9070 XTs detection 2025-07-21 22:15:22 -05:00
Rahul Salvi a06d528d3b Add support for PowerColor Red Devil RX6800XT 2025-07-20 13:40:31 -07:00
Adam Honse ac0fd4b3fc Remove commented code in build-windows.bat 2025-07-20 01:39:48 -05:00
Valtekken 47783feecb Updated Italian translation's missing lines. 2025-07-19 09:05:53 +00:00
Whippu fad8955397 Add support for Gigabyte RX 7900 GRE 2025-07-18 18:34:10 -05:00
Adam Honse d0bcf06e5f Update metainfo 2025-07-17 11:57:08 -05:00
Adam Honse fed03f88c8 Clean up code 2025-07-16 08:31:48 -05:00
Adam Honse b6afcc222a Add regex include for MacOS 2025-07-16 08:12:09 -05:00
Dmitry Kychanov 4bcc33569a Fix filesystem errors in SerialPort 2025-07-16 15:09:21 +04:00
Dmitry K 46a79c6bb5 Serial port field is now drop-down list 2025-07-16 01:29:16 -05:00
Adam Honse 25d45fd9db Add server settings to settings page 2025-07-15 18:11:32 -05:00
Adam Honse c5795492e1 Update Fedora spec file to include systemd service 2025-07-15 11:45:42 -05:00
Adam Honse e86d9f9241 Add SystemD service file to Linux installation 2025-07-15 11:20:13 -05:00
Adam Honse 3db4ea30a3 Re-add Linux signal handler that was lost when rebasing Windows service main.cpp rework 2025-07-15 11:06:11 -05:00
Adam Honse a3acd6bda5 Fix XPG S40G infinite loop on Windows 11 2025-07-15 00:07:53 -05:00
Adam Honse 12a3b1f83e Delete controller when deleting HYTE RGBControllers 2025-07-14 16:45:01 -05:00
berendi cf2df815e3 Support starting OpenRGB as a Windows service
Commits squashed, code style cleaned up, and manually rebased by Adam Honse <[email protected]>
2025-07-14 20:32:14 -05:00
Adam Honse f03e4fd049 Implement find_usb_serial_port for MacOS, switch HYTE CNVS implementation to serial-based 2025-07-14 17:27:10 -05:00
Jana Rettig 75bf674537 Add support for PowerColor Red Devil GPUs 2025-07-14 15:08:58 -05:00
Adam Honse c3b1b16d11 Clean up comment formatting in ResourceManager.h 2025-07-12 23:04:59 -05:00
Adam Honse d8b9159125 Rework handling of NetworkClient callbacks to route them through ResourceManager and move connection of saved clients to after autoconnection of local client in InitCoroutine 2025-07-12 22:49:14 -05:00
Adam Honse a30617d971 Code cleanup in OpenRGBDialog 2025-07-12 21:58:31 -05:00
Adam Honse c7d824fbf3 Remove unused functions in OpenRGBClientInfoPage and OpenRGBDialog 2025-07-12 21:26:08 -05:00
Adam Honse 2335259dd6 Clean up comment formatting in DMI info files 2025-07-12 21:10:11 -05:00
Adam Honse 64686c92cd Clean up comment formatting in AutoStart files 2025-07-12 20:58:47 -05:00
silverspy18 3cbc4e5570 Add Gigabyte Radeon RX 9070 XT GAMING OC 2025-07-10 15:42:19 -07:00
silverspy18 d3f49c72e1 Implements i2c_smbus_amdadl::i2c_xfer for AMD ADL I2C. 2025-07-10 14:16:57 -05:00
Milan Cermak f460a6573c Add new Kingston model code 0x15 2025-07-09 18:52:18 +02:00
Milan Čermák 26a0b88937 Initial commit for TeamGroup T-Force Xtreem ARGB DDR4 Memory 2025-07-08 16:39:22 -05:00
Adam Honse a3ca8a721d Clean up comment formatting in ResourceManager.cpp 2025-07-08 15:27:59 -05:00
lulu731 bdaebe1218 Feat/ms 1565 2025-07-07 11:55:29 -05:00
Adam Honse f76dbb08cc Add GitHub Sponsor information 2025-07-07 02:20:15 -05:00
Adam Honse 5ac2ece8b4 Clean up comment formatting in SettingsManager and main cpp files 2025-07-07 01:35:42 -05:00
Adam Honse 37cd743315 Clean up comment formatting in LogManager and StringUtils cpp files 2025-07-06 14:39:37 -05:00
Fran c0c772b11b Add Palit RTX 5070 GamingPro 2025-07-05 12:44:18 -05:00
Marco Martinez ccc78c3516 Add support for Airgoo DRGB Controller 2025-07-05 12:38:55 -05:00
LucasMZ 09b7aab886 translation: update pt_BR 2025-07-05 08:55:04 -03:00
Adam Honse ce3eac9d8a Remove some commented outdated code 2025-07-05 01:51:52 -05:00
Adam Honse a762d00aa8 Fix warnings in Windows build 2025-07-05 01:47:40 -05:00
Adam Honse e5b3c12814 Fix warnings in MacOS build 2025-07-05 01:19:06 -05:00
Adam Honse df73d0263a Add send_in_progress locks around send groups in NetworkServer.cpp 2025-07-04 23:37:23 -05:00
Adam Honse 2affb6d1e7 Add missing send_in_progress locks around send groups in NetworkClient.cpp 2025-07-04 23:32:16 -05:00
Adam Honse 4cc6a28e73 Rework NetworkClient server initialization to allow interruption and restarting of server list request process when server sends a device list updated notification 2025-07-04 04:24:37 -05:00
Adam Honse 89881bfd7e Improve spacing so that text doesn't get cut off in GNOME on Linux 2025-07-04 04:24:37 -05:00
Adam Honse 458e30e2be Update client info page UI to account for added column 2025-07-04 04:24:37 -05:00
Adam Honse 5aaadf4e5a Require protocol version 5 to send rescan devices packet and to show rescan button in clients list 2025-07-04 04:24:37 -05:00
Adam Honse c750158286 Make the rescan action in ResourceManager send a rescan request to the client if the client is the primary target (local connection or only connected client when local detection disabled) 2025-07-04 04:24:37 -05:00
Adam Honse 80dee91ab9 Add client functionality to send rescan request and add rescan button for each client in client list 2025-07-04 04:24:37 -05:00
Adam Honse 0cfe5ae0bb Add SDK command to rescan devices 2025-07-04 04:24:37 -05:00
Arthur de Groot b6d4ded29a Fix Logitech G915 blue channel writes for little packet 2025-07-04 02:34:02 -05:00
Adam Honse 6d981e21ff Rework OpenRGBDialog rescan behavior to update UI when rescan is triggered outside of the UI 2025-07-04 00:22:08 -05:00
Adam Honse 38afb8b8eb Replace pwsh with powershell as it is available by default and pwsh needs to be separately installed 2025-07-04 00:09:15 -05:00
Sirs0ri 6efb172fb2 fix: spelling of Nvidia GPU label in New Device issue template 2025-07-03 19:35:51 -05:00
Andre Toerien 3332835417 Use RegisterNetworkClient() with --client 2025-07-03 23:34:08 +02:00
Adam Honse ec34b23688 Convert Corsair Vengeance RGB (non-Pro) controller to use DRAM SPD detector 2025-07-02 21:59:39 -05:00
Devin Wendt e4c43548eb Add multizone support for LIFX devices 2025-07-02 19:47:07 -05:00
Adam Honse fc6306f44a Fix warnings in ASUS USB controllers 2025-07-02 11:26:20 -05:00
Adam Honse 520b2450e3 Fix warning in RazerHanboController.cpp 2025-07-02 11:24:16 -05:00
Adam Honse c96119a9fd Fix warnings in RGBController_MSIMysticLight761.cpp 2025-07-02 11:07:05 -05:00
Adam Honse 5242b3cb03 Fix warnings and clean up MSIMysticLight761Controller 2025-07-02 10:27:51 -05:00
Adam Honse 21cb086b87 Fix unused argument warning in GoveeController 2025-07-02 08:28:23 -05:00
Adam Honse c4d0d38e69 Fix warnings in GigabyteRGBFusion2BlackwellGPUController.cpp 2025-07-02 08:16:55 -05:00
Adam Honse eecdd4befc Fix warnings in AMBXController.cpp 2025-07-02 00:22:52 -05:00
Adam Honse 804490399f Fix warning in AlienwareAW3423DWFController.cpp 2025-07-02 00:18:24 -05:00
Adam Honse 47bb1c0b37 Fix qsizetype 2025-07-02 00:17:32 -05:00
Adam Honse 064bae7b87 Cleanups and warning fixes in ManualDevices 2025-07-01 23:54:20 -05:00
Adam Honse ebfbb4b56f Update file header comment in CorsairVengeanceController to note that it is for original single-zone DDR4 variant 2025-07-01 23:25:13 -05:00
Brandon Ong 35203da9c3 Add support for NZXT F140 RGB Duo fan in NZXT Hue 2 Controller 2025-07-01 21:25:35 -05:00
MrIceHavoc b4dff4dd0c Initial commit for EVGA RTX 3090 Ti FTW3 Ultra Hybrid Gaming device ID 2025-07-01 21:15:19 -05:00
Thomas Peters-Hall 68fc171a31 Add support for MSI Gaming Trio RX 7900 XTX 2025-07-01 20:43:52 -05:00
Atome “Atom” Art fb1c20ed30 Add Rescan Devices button to systray icon dialog 2025-07-01 20:39:55 -05:00
Wolfieee Wolf a31c4f5254 Add DDP (Distributed Display Protocol) controller support 2025-07-01 09:27:00 -05:00
Dmitry K 570cc16c98 Unified page for Manually Added Devices 2025-06-30 10:46:55 -05:00
Adam Honse d796fcba8f Add detection message for reading SPD information and rework IsAnyDimmDetectorEnabled so that it doesn't overwrite the detection string before the GUI can read it 2025-06-27 01:26:29 -05:00
Adam Honse ad7a6e60f2 Cache the JEDEC ID value in SPDAccessor and improve SPD detector logging. Caching the JEDEC ID speeds up DRAM detection significantly. 2025-06-27 01:10:06 -05:00
Joseph E 7c02075ba6 Prevent infinite loop of closeEvent() in OpenRGBDialog 2025-06-26 22:45:10 -05:00
Adam Honse a83165f112 Fix Qt6 amd64 AppImage 2025-06-26 21:58:30 -05:00
morg 8ad90314fd AutoStart settings: fix server port range 2025-06-26 08:34:35 -05:00
morg e2db20b1f3 DeviceView: prevents setting 0px as font size. 2025-06-26 07:44:40 -05:00
Adam Honse 2e26a7f82d Update Nuvoton SMBus documentation for Linux 2025-06-26 02:56:44 -05:00
Adam Honse 313fda32c0 Add Common Modes documentation from the wiki repo 2025-06-26 01:40:02 -05:00
McNutnut 28c0bd8592 Add ViewSonic Elite Monitor (XG271QG) 2025-06-26 00:29:03 -05:00
Adam Honse e87d20b08d Fix JGINYUE not being detected in Linux 2025-06-26 00:28:05 -05:00
RedBlackAka ce32b88010 Add Asus ROG GTX 1060 Gaming #4870 2025-06-19 13:48:56 -05:00
rom4ster 9f82afa485 MSI X870 Tomahawk WIFI support 2025-06-18 18:14:42 -05:00
Jana Rettig 5589aad730 Add I2C_SMBUS_I2C_BLOCK_DATA mode to i2c_smbus_amdadl 2025-06-18 18:05:58 -05:00
Dmitry Kychanov 5f8b044577 Convert all UI files to match Qt standards 2025-06-18 17:53:14 -05:00
Nico Maas 924f5af2ed Implements support for Gainward RTX3090 Ti Phantom 2025-06-17 11:37:36 +02:00
Paulo a5acd5f322 Add static mode to Gigabyte Blackwell controller 2025-06-15 22:04:01 -05:00
ToastKiste211 dff4cc6cbf Add Corsair K68 Red Shadow 2025-06-13 08:13:29 -05:00
ToastKiste211 4532f98a94 Add corsair k60 rgb pro tkl white (v2) 2025-06-10 18:04:48 -05:00
Dmitry Kychanov c09d41bd40 Added base class for all Manually Added Devices settings Entries 2025-06-10 10:32:30 +04:00
Hepi34 fc26902d1d Implements support for the MSI RTX 5080 SUPRIM SOC 2025-06-09 13:27:14 -05:00
linux fight a427bfe1e1 Fixed Colorful iGame RTX3060 Ti W OC detection 2025-06-09 12:36:33 -05:00
Adam Honse 5b1b9b011a Update translating section in CONTRIBUTING.md 2025-06-06 09:27:11 -05:00
Antonin Del Fabbro 97ea56e777 Add basic explanations about Translation 2025-06-06 09:22:52 -05:00
Dmitry Kychanov 91a40ab079 Improved About page 2025-06-05 12:12:08 -05:00
ToastKiste211 4ea1d9a1f4 Support for Corsair K95 RGB PLATINUM SE 2025-06-05 12:07:10 -05:00
zjjxwhh 33dc2f41a9 Improve Simplified Chinese (zh_CN) translation 2025-06-05 08:30:13 -05:00
Dmitry K 6793d4a3a0 Move Autogenerated UI code into Private sections of the window classes 2025-06-04 18:21:13 -05:00
Kyle Rose 4c6bf55c8a Provide more useful CLI error messages 2025-06-04 18:16:45 -05:00
Wolfieee Wolf a977cadfda Add AMBXController for Philips amBX Gaming lights 2025-06-04 17:50:44 -05:00
Antonin Del Fabbro 381069afc7 Improve French (FR_fr) translation 2025-06-03 12:15:32 +02:00
Matthias 3c14af4a28 add support for 'Gigabyte AORUS Radeon RX 9070 XT Elite' 2025-06-02 15:27:48 -05:00
ToastKiste211 c3476be9e4 ADD more Corsair commander core versions 2025-06-02 10:41:37 -05:00
Baptiste Girod 519cdb642c Added ASUS TUF GeForce RTX 5090 Gaming non OC 2025-06-02 15:11:45 +00:00
WalterWoshid 2c1e23fdbd Add support for Lenovo Legion Pro 7 (16IRX9H) 2025-05-30 21:36:56 +02:00
Zhi Yan 7f865d73f0 Add some DRGB controllers 2025-05-30 08:01:13 -05:00
Daniel Stuart d98db1587b Initial support for Galax v2 GPU controller 2025-05-30 00:05:10 -05:00
Dmitry Kychanov 34ff3aa99a Minor cleanup in detectors 2025-05-30 02:44:34 +04:00
Wolfieee Wolf 7177a534b9 Add MadCatzCyborgController for MadCatz Cyborg Gaming Light 2025-05-28 11:55:53 -05:00
Paulo 3e7ad705bb Update Gigabyte Blackwell controller and adds several GPUs 2025-05-27 15:23:36 -05:00
Dave Cuza ac1503d246 Add support for ZOTAC GAMING GeForce RTX 2080 Ti AMP 2025-05-27 10:08:34 -05:00
ManiacKnight 26732ed42c Add Gigabyte NVIDIA 5070TI EAGLE OC ICE 2025-05-27 02:44:33 +05:30
1142 changed files with 42908 additions and 28869 deletions
+1 -1
View File
@@ -1,6 +1,6 @@
# These are supported funding model platforms
github: # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2]
github: CalcProgrammer1
patreon: CalcProgrammer1
open_collective: # Replace with a single Open Collective username
ko_fi: # Replace with a single Ko-fi username
+1
View File
@@ -28,6 +28,7 @@ Build/
.qmake.stash
.vscode
.vs
.idea
# Generic Files
.DS_Store
+130 -220
View File
@@ -65,22 +65,22 @@ before_script:
- !reference [.upstream_rules, rules]
#-----------------------------------------------------------------------#
# Linux (AppImage) i386 Build Target #
# OpenRGB Common Appimage Build Steps #
#-----------------------------------------------------------------------#
"Linux i386 AppImage":
image: registry.gitlab.com/openrgbdevelopers/openrgb-linux-ci-deb-builder:bookworm-i386
.hidden_appimage_script: &appimage_script_steps
image: registry.gitlab.com/openrgbdevelopers/openrgb-linux-ci-deb-builder:bookworm-${TGT_ARCH}
tags:
- linux
- i386
- ${TGT_ARCH}
stage: build
script:
- export $(dpkg-architecture)
- ./scripts/build-appimage.sh
- ./scripts/build-appimage.sh ${TGT_QT}
artifacts:
name: "${CI_PROJECT_NAME}_Linux_i386_${CI_COMMIT_SHORT_SHA}"
name: "${CI_PROJECT_NAME}_Linux_${TGT_NAME}_${CI_COMMIT_SHORT_SHA}"
paths:
- OpenRGB-i386.AppImage
- OpenRGB-${TGT_PATH}.AppImage
- 60-openrgb.rules
- README.md
expire_in: 30 days
@@ -88,62 +88,43 @@ before_script:
rules:
- !reference [.upstream_rules, rules]
#-----------------------------------------------------------------------#
# Linux (AppImage) i386 Build Target #
#-----------------------------------------------------------------------#
"Linux i386 AppImage":
variables:
TGT_ARCH: "i386"
TGT_QT: ""
TGT_NAME: "${TGT_ARCH}"
TGT_PATH: "${TGT_ARCH}"
<<: *appimage_script_steps
#-----------------------------------------------------------------------#
# Linux (AppImage) Qt6 i386 Build Target #
#-----------------------------------------------------------------------#
"Linux i386 AppImage Qt6":
image: registry.gitlab.com/openrgbdevelopers/openrgb-linux-ci-deb-builder:bookworm-i386
tags:
- linux
- i386
stage: build
script:
- export $(dpkg-architecture)
- ./scripts/build-appimage.sh qt6
artifacts:
name: "${CI_PROJECT_NAME}_Linux_i386_Qt6_${CI_COMMIT_SHORT_SHA}"
paths:
- OpenRGB-i386.AppImage
- 60-openrgb.rules
- README.md
expire_in: 30 days
rules:
- !reference [.upstream_rules, rules]
variables:
TGT_ARCH: "i386"
TGT_QT: "qt6"
TGT_NAME: "${TGT_ARCH}_${TGT_QT^}"
TGT_PATH: "${TGT_ARCH}"
<<: *appimage_script_steps
#-----------------------------------------------------------------------#
# Linux (AppImage) amd64 Build Target #
#-----------------------------------------------------------------------#
"Linux amd64 AppImage Base":
image: registry.gitlab.com/openrgbdevelopers/openrgb-linux-ci-deb-builder:bookworm-amd64
stage: build
script:
- export $(dpkg-architecture)
- ./scripts/build-appimage.sh
artifacts:
name: "${CI_PROJECT_NAME}_Linux_amd64_${CI_COMMIT_SHORT_SHA}"
paths:
- OpenRGB-x86_64.AppImage
- 60-openrgb.rules
- README.md
expire_in: 30 days
rules:
- if: $CI_PIPELINE_SOURCE == "merge_request_event" || $CI_PIPELINE_SOURCE == "push"
when: never
"Linux amd64 AppImage":
extends: "Linux amd64 AppImage Base"
variables:
TGT_ARCH: "amd64"
TGT_QT: ""
TGT_NAME: "${TGT_ARCH}"
TGT_PATH: "x86_64"
<<: *appimage_script_steps
rules:
- !reference [.fork_local_runner_rules, rules]
tags:
- linux
- amd64
"Linux amd64 AppImage (gitlab.com runner)":
extends: "Linux amd64 AppImage Base"
extends: "Linux amd64 AppImage"
rules:
- !reference [.fork_gitlab_runner_rules, rules]
tags:
@@ -153,119 +134,80 @@ before_script:
# Linux (AppImage) Qt6 amd64 Build Target #
#-----------------------------------------------------------------------#
"Linux amd64 AppImage Qt6":
image: registry.gitlab.com/openrgbdevelopers/openrgb-linux-ci-deb-builder:bookworm-amd64
tags:
- linux
- amd64
stage: build
script:
- export $(dpkg-architecture)
- ./scripts/build-appimage.sh qt6
artifacts:
name: "${CI_PROJECT_NAME}_Linux_amd64_Qt6_${CI_COMMIT_SHORT_SHA}"
paths:
- OpenRGB-amd64.AppImage
- 60-openrgb.rules
- README.md
expire_in: 30 days
rules:
- !reference [.upstream_rules, rules]
variables:
TGT_ARCH: "amd64"
TGT_QT: "qt6"
TGT_NAME: "${TGT_ARCH}_${TGT_QT^}"
TGT_PATH: "x86_64"
<<: *appimage_script_steps
#-----------------------------------------------------------------------#
# Linux (AppImage) armhf Build Target #
#-----------------------------------------------------------------------#
"Linux armhf AppImage":
image: registry.gitlab.com/openrgbdevelopers/openrgb-linux-ci-deb-builder:bookworm-armhf
tags:
- linux
- armhf
stage: build
script:
- export $(dpkg-architecture)
- ./scripts/build-appimage.sh
artifacts:
name: "${CI_PROJECT_NAME}_Linux_armhf_${CI_COMMIT_SHORT_SHA}"
paths:
- OpenRGB-armhf.AppImage
- 60-openrgb.rules
- README.md
expire_in: 30 days
rules:
- !reference [.upstream_rules, rules]
variables:
TGT_ARCH: "armhf"
TGT_QT: ""
TGT_NAME: "${TGT_ARCH}"
TGT_PATH: "${TGT_ARCH}"
<<: *appimage_script_steps
#-----------------------------------------------------------------------#
# Linux (AppImage) Qt6 armhf Build Target #
#-----------------------------------------------------------------------#
"Linux armhf AppImage Qt6":
image: registry.gitlab.com/openrgbdevelopers/openrgb-linux-ci-deb-builder:bookworm-armhf
tags:
- linux
- armhf
stage: build
script:
- export $(dpkg-architecture)
- ./scripts/build-appimage.sh qt6
artifacts:
name: "${CI_PROJECT_NAME}_Linux_armhf_Qt6_${CI_COMMIT_SHORT_SHA}"
paths:
- OpenRGB-armhf.AppImage
- 60-openrgb.rules
- README.md
expire_in: 30 days
rules:
- !reference [.upstream_rules, rules]
variables:
TGT_ARCH: "armhf"
TGT_QT: "qt6"
TGT_NAME: "${TGT_ARCH}_${TGT_QT^}"
TGT_PATH: "${TGT_ARCH}"
<<: *appimage_script_steps
#-----------------------------------------------------------------------#
# Linux (AppImage) arm64 Build Target #
#-----------------------------------------------------------------------#
"Linux arm64 AppImage":
image: registry.gitlab.com/openrgbdevelopers/openrgb-linux-ci-deb-builder:bookworm-arm64
tags:
- linux
- arm64
stage: build
script:
- export $(dpkg-architecture)
- ./scripts/build-appimage.sh
artifacts:
name: "${CI_PROJECT_NAME}_Linux_arm64_${CI_COMMIT_SHORT_SHA}"
paths:
- OpenRGB-arm64.AppImage
- 60-openrgb.rules
- README.md
expire_in: 30 days
rules:
- !reference [.upstream_rules, rules]
variables:
TGT_ARCH: "arm64"
TGT_QT: ""
TGT_NAME: "${TGT_ARCH}"
TGT_PATH: "${TGT_ARCH}"
<<: *appimage_script_steps
#-----------------------------------------------------------------------#
# Linux (AppImage) Qt6 arm64 Build Target #
#-----------------------------------------------------------------------#
"Linux arm64 AppImage Qt6":
image: registry.gitlab.com/openrgbdevelopers/openrgb-linux-ci-deb-builder:bookworm-arm64
variables:
TGT_ARCH: "arm64"
TGT_QT: "qt6"
TGT_NAME: "${TGT_ARCH}_${TGT_QT^}"
TGT_PATH: "${TGT_ARCH}"
<<: *appimage_script_steps
#-----------------------------------------------------------------------#
# OpenRGB Common Debian Build Steps #
#-----------------------------------------------------------------------#
.hidden_deb_script: &debian_script_steps
stage: build
image: registry.gitlab.com/openrgbdevelopers/openrgb-linux-ci-deb-builder:$TGT_DEB-$TGT_ARCH
tags:
- linux
- arm64
stage: build
- $TGT_ARCH
script:
- export $(dpkg-architecture)
- ./scripts/build-appimage.sh qt6
- ./scripts/build-package-files.sh debian/changelog
- dpkg-architecture -l
- dpkg-buildpackage -us -B
- rm -v ../openrgb-dbgsym*.deb
- mv -v ../openrgb*.deb ./
artifacts:
name: "${CI_PROJECT_NAME}_Linux_arm64_Qt6_${CI_COMMIT_SHORT_SHA}"
name: "${CI_PROJECT_NAME}_Linux_${TGT_ARCH}_deb_${CI_COMMIT_SHORT_SHA}"
paths:
- OpenRGB-arm64.AppImage
- 60-openrgb.rules
- README.md
- openrgb*.deb
exclude:
- openrgb-dbgsym*.deb
expire_in: 30 days
rules:
- !reference [.upstream_rules, rules]
@@ -273,109 +215,73 @@ before_script:
# Linux (.deb) Debian Bookworm i386 Build Target #
#-----------------------------------------------------------------------#
"Linux i386 .deb (Debian Bookworm)":
image: registry.gitlab.com/openrgbdevelopers/openrgb-linux-ci-deb-builder:bookworm-i386
tags:
- linux
- i386
stage: build
script:
- ./scripts/build-package-files.sh debian/changelog
- dpkg-architecture -l
- dpkg-buildpackage -us -B
- rm -v ../openrgb-dbgsym*.deb
- mv -v ../openrgb*.deb ./
variables:
TGT_ARCH: "i386"
TGT_DEB: "bookworm"
<<: *debian_script_steps
artifacts:
name: "${CI_PROJECT_NAME}_Linux_i386_deb_${CI_COMMIT_SHORT_SHA}"
paths:
- openrgb*.deb
exclude:
- openrgb-dbgsym*.deb
expire_in: 30 days
rules:
- !reference [.upstream_rules, rules]
#-----------------------------------------------------------------------#
# Linux (.deb) Debian Trixie i386 Build Target #
#-----------------------------------------------------------------------#
"Linux i386 .deb (Debian Trixie)":
variables:
TGT_ARCH: "i386"
TGT_DEB: "trixie"
<<: *debian_script_steps
#-----------------------------------------------------------------------#
# Linux (.deb) Debian Bookworm amd64 Build Target #
#-----------------------------------------------------------------------#
"Linux amd64 .deb (Debian Bookworm)":
image: registry.gitlab.com/openrgbdevelopers/openrgb-linux-ci-deb-builder:bookworm-amd64
tags:
- linux
- amd64
stage: build
script:
- ./scripts/build-package-files.sh debian/changelog
- dpkg-architecture -l
- dpkg-buildpackage -us -B
- rm -v ../openrgb-dbgsym*.deb
- mv -v ../openrgb*.deb ./
variables:
TGT_ARCH: "amd64"
TGT_DEB: "bookworm"
<<: *debian_script_steps
artifacts:
name: "${CI_PROJECT_NAME}_Linux_amd64_deb_${CI_COMMIT_SHORT_SHA}"
paths:
- openrgb*.deb
exclude:
- openrgb-dbgsym*.deb
expire_in: 30 days
rules:
- !reference [.upstream_rules, rules]
#-----------------------------------------------------------------------#
# Linux (.deb) Debian Trixie amd64 Build Target #
#-----------------------------------------------------------------------#
"Linux amd64 .deb (Debian Trixie)":
variables:
TGT_ARCH: "amd64"
TGT_DEB: "trixie"
<<: *debian_script_steps
#-----------------------------------------------------------------------#
# Linux (.deb) Debian Bookworm armhf Build Target #
#-----------------------------------------------------------------------#
"Linux armhf .deb (Debian Bookworm)":
image: registry.gitlab.com/openrgbdevelopers/openrgb-linux-ci-deb-builder:bookworm-armhf
tags:
- linux
- armhf
stage: build
script:
- ./scripts/build-package-files.sh debian/changelog
- dpkg-architecture -l
- dpkg-buildpackage -us -B
- rm -v ../openrgb-dbgsym*.deb
- mv -v ../openrgb*.deb ./
variables:
TGT_ARCH: "armhf"
TGT_DEB: "bookworm"
<<: *debian_script_steps
artifacts:
name: "${CI_PROJECT_NAME}_Linux_armhf_deb_${CI_COMMIT_SHORT_SHA}"
paths:
- openrgb*.deb
exclude:
- openrgb-dbgsym*.deb
expire_in: 30 days
rules:
- !reference [.upstream_rules, rules]
#-----------------------------------------------------------------------#
# Linux (.deb) Debian Trixie armhf Build Target #
#-----------------------------------------------------------------------#
"Linux armhf .deb (Debian Trixie)":
variables:
TGT_ARCH: "armhf"
TGT_DEB: "trixie"
<<: *debian_script_steps
#-----------------------------------------------------------------------#
# Linux (.deb) Debian Bookworm arm64 Build Target #
#-----------------------------------------------------------------------#
"Linux arm64 .deb (Debian Bookworm)":
image: registry.gitlab.com/openrgbdevelopers/openrgb-linux-ci-deb-builder:bookworm-arm64
tags:
- linux
- arm64
stage: build
script:
- ./scripts/build-package-files.sh debian/changelog
- dpkg-architecture -l
- dpkg-buildpackage -us -B
- rm -v ../openrgb-dbgsym*.deb
- mv -v ../openrgb*.deb ./
variables:
TGT_ARCH: "arm64"
TGT_DEB: "bookworm"
<<: *debian_script_steps
artifacts:
name: "${CI_PROJECT_NAME}_Linux_arm64_deb_${CI_COMMIT_SHORT_SHA}"
paths:
- openrgb*.deb
exclude:
- openrgb-dbgsym*.deb
expire_in: 30 days
rules:
- !reference [.upstream_rules, rules]
#-----------------------------------------------------------------------#
# Linux (.deb) Debian Trixie arm64 Build Target #
#-----------------------------------------------------------------------#
"Linux arm64 .deb (Debian Trixie)":
variables:
TGT_ARCH: "arm64"
TGT_DEB: "trixie"
<<: *debian_script_steps
#-----------------------------------------------------------------------#
# Linux (.rpm, F40) 64-bit Build Target #
@@ -492,6 +398,7 @@ before_script:
- .shared_windows_runners
stage: build
script:
- Set-MpPreference -DisableRealtimeMonitoring $true
- scripts\build-windows.bat 5.15.0 2019 32
artifacts:
name: "${CI_PROJECT_NAME}_Windows_32_${CI_COMMIT_SHORT_SHA}"
@@ -512,6 +419,7 @@ before_script:
- .shared_windows_runners
stage: build
script:
- Set-MpPreference -DisableRealtimeMonitoring $true
- scripts\build-windows.bat 6.8.3 2022 32
artifacts:
name: "${CI_PROJECT_NAME}_Windows_32_Qt6_${CI_COMMIT_SHORT_SHA}"
@@ -532,6 +440,7 @@ before_script:
- .shared_windows_runners
stage: build
script:
- Set-MpPreference -DisableRealtimeMonitoring $true
- scripts\build-windows.bat 5.15.0 2019 64
artifacts:
name: "${CI_PROJECT_NAME}_Windows_64_${CI_COMMIT_SHORT_SHA}"
@@ -571,6 +480,7 @@ before_script:
- .shared_windows_runners
stage: build
script:
- Set-MpPreference -DisableRealtimeMonitoring $true
- scripts\build-windows.bat 6.8.3 2022 64
artifacts:
name: "${CI_PROJECT_NAME}_Windows_64_Qt6_${CI_COMMIT_SHORT_SHA}"
+1 -1
View File
@@ -23,7 +23,7 @@ Please add a link to the manufacturer's product page beneath this line
~"DeviceType::IDK" <!-- I Don't know -->
~"DeviceType::USB" <!-- The device connects to an internal header or external usb port -->
~"DeviceType::GPU::AMD" <!-- The device is an AMD GPU -->
~"DeviceType::GPU::Nvidia" <!-- The device is a Nvidia GPU -->
~"DeviceType::GPU::NVidia" <!-- The device is a Nvidia GPU -->
~"DeviceType::SMBus" <!-- The device is connected to the SMBus eg. RAM -->
~"DeviceType::WMI" <!-- The device is controlled through Windows Management Instrumentation -->
+34 -35
View File
@@ -26,21 +26,21 @@ bool AutoStart::DisableAutoStart()
std::error_code autostart_file_remove_errcode;
bool success = false;
/*-------------------------------------------------*\
| Check if the filename is valid |
\*-------------------------------------------------*/
/*-----------------------------------------------------*\
| Check if the filename is valid |
\*-----------------------------------------------------*/
if(autostart_file != "")
{
/*---------------------------------------------*\
| If file doesn't exist, disable is successful |
\*---------------------------------------------*/
/*-------------------------------------------------*\
| If file doesn't exist, disable is successful |
\*-------------------------------------------------*/
if(!filesystem::exists(autostart_file))
{
success = true;
}
/*---------------------------------------------*\
| Otherwise, delete the file |
\*---------------------------------------------*/
/*-------------------------------------------------*\
| Otherwise, delete the file |
\*-------------------------------------------------*/
else
{
success = filesystem::remove(autostart_file, autostart_file_remove_errcode);
@@ -63,27 +63,26 @@ bool AutoStart::EnableAutoStart(AutoStartInfo autostart_info)
{
bool success = false;
/*-------------------------------------------------*\
| Check if the filename is valid |
\*-------------------------------------------------*/
/*-----------------------------------------------------*\
| Check if the filename is valid |
\*-----------------------------------------------------*/
if(autostart_file != "")
{
std::ofstream autostart_file_stream(autostart_file, std::ios::out | std::ios::trunc);
/*---------------------------------------------*\
| Error out if the file could not be opened |
\*---------------------------------------------*/
/*-------------------------------------------------*\
| Error out if the file could not be opened |
\*-------------------------------------------------*/
if(!autostart_file_stream)
{
LOG_ERROR("[AutoStart] Could not open %s for writing.", autostart_file.c_str());
success = false;
}
/*---------------------------------------------*\
| Otherwise, write the file |
\*---------------------------------------------*/
/*-------------------------------------------------*\
| Otherwise, write the file |
\*-------------------------------------------------*/
else
{
//autostart_file_stream << desktop_file;
autostart_file_stream.close();
success = !autostart_file_stream.fail();
@@ -103,9 +102,9 @@ bool AutoStart::EnableAutoStart(AutoStartInfo autostart_info)
bool AutoStart::IsAutoStartEnabled()
{
/*-------------------------------------------------*\
| Check if the filename is valid |
\*-------------------------------------------------*/
/*-----------------------------------------------------*\
| Check if the filename is valid |
\*-----------------------------------------------------*/
if(autostart_file != "")
{
return(filesystem::exists(autostart_file));
@@ -118,9 +117,9 @@ bool AutoStart::IsAutoStartEnabled()
std::string AutoStart::GetExePath()
{
/*-------------------------------------------------*\
| Create the OpenRGB executable path |
\*-------------------------------------------------*/
/*-----------------------------------------------------*\
| Create the OpenRGB executable path |
\*-----------------------------------------------------*/
char exepath[ PATH_MAX ];
ssize_t count = readlink("/proc/self/exe", exepath, PATH_MAX);
@@ -134,16 +133,16 @@ void AutoStart::InitAutoStart(std::string name)
autostart_name = name;
/*-------------------------------------------------*\
| Get home and config paths |
\*-------------------------------------------------*/
/*-----------------------------------------------------*\
| Get home and config paths |
\*-----------------------------------------------------*/
const char *xdg_config_home = getenv("XDG_CONFIG_HOME");
const char *home = getenv("HOME");
/*-------------------------------------------------*\
| Determine where the autostart .desktop files are |
| kept |
\*-------------------------------------------------*/
/*-----------------------------------------------------*\
| Determine where the autostart .desktop files are |
| kept |
\*-----------------------------------------------------*/
if(xdg_config_home != NULL)
{
autostart_dir = xdg_config_home;
@@ -155,9 +154,9 @@ void AutoStart::InitAutoStart(std::string name)
autostart_dir = autostart_dir + "/.config/autostart/";
}
/*-------------------------------------------------*\
| Check if the filename is valid |
\*-------------------------------------------------*/
/*-----------------------------------------------------*\
| Check if the filename is valid |
\*-----------------------------------------------------*/
if(autostart_dir != "")
{
std::error_code ec;
+45 -45
View File
@@ -26,21 +26,21 @@ bool AutoStart::DisableAutoStart()
std::error_code autostart_file_remove_errcode;
bool success = false;
/*-------------------------------------------------*\
| Check if the filename is valid |
\*-------------------------------------------------*/
/*-----------------------------------------------------*\
| Check if the filename is valid |
\*-----------------------------------------------------*/
if(autostart_file != "")
{
/*---------------------------------------------*\
| If file doesn't exist, disable is successful |
\*---------------------------------------------*/
/*-------------------------------------------------*\
| If file doesn't exist, disable is successful |
\*-------------------------------------------------*/
if(!filesystem::exists(autostart_file))
{
success = true;
}
/*---------------------------------------------*\
| Otherwise, delete the file |
\*---------------------------------------------*/
/*-------------------------------------------------*\
| Otherwise, delete the file |
\*-------------------------------------------------*/
else
{
success = filesystem::remove(autostart_file, autostart_file_remove_errcode);
@@ -63,25 +63,25 @@ bool AutoStart::EnableAutoStart(AutoStartInfo autostart_info)
{
bool success = false;
/*-------------------------------------------------*\
| Check if the filename is valid |
\*-------------------------------------------------*/
/*-----------------------------------------------------*\
| Check if the filename is valid |
\*-----------------------------------------------------*/
if(autostart_file != "")
{
std::string desktop_file = GenerateDesktopFile(autostart_info);
std::ofstream autostart_file_stream(autostart_file, std::ios::out | std::ios::trunc);
/*---------------------------------------------*\
| Error out if the file could not be opened |
\*---------------------------------------------*/
/*-------------------------------------------------*\
| Error out if the file could not be opened |
\*-------------------------------------------------*/
if(!autostart_file_stream)
{
LOG_ERROR("[AutoStart] Could not open %s for writing.", autostart_file.c_str());
success = false;
}
/*---------------------------------------------*\
| Otherwise, write the file |
\*---------------------------------------------*/
/*-------------------------------------------------*\
| Otherwise, write the file |
\*-------------------------------------------------*/
else
{
autostart_file_stream << desktop_file;
@@ -104,9 +104,9 @@ bool AutoStart::EnableAutoStart(AutoStartInfo autostart_info)
bool AutoStart::IsAutoStartEnabled()
{
/*-------------------------------------------------*\
| Check if the filename is valid |
\*-------------------------------------------------*/
/*-----------------------------------------------------*\
| Check if the filename is valid |
\*-----------------------------------------------------*/
if(autostart_file != "")
{
return(filesystem::exists(autostart_file));
@@ -119,9 +119,9 @@ bool AutoStart::IsAutoStartEnabled()
std::string AutoStart::GetExePath()
{
/*-------------------------------------------------*\
| Create the OpenRGB executable path |
\*-------------------------------------------------*/
/*-----------------------------------------------------*\
| Create the OpenRGB executable path |
\*-----------------------------------------------------*/
char exepath[ PATH_MAX ];
ssize_t count = readlink("/proc/self/exe", exepath, PATH_MAX);
@@ -129,17 +129,17 @@ std::string AutoStart::GetExePath()
return(std::string(exepath, (count > 0) ? count : 0));
}
/*-----------------------------------------------------*\
| Linux AutoStart Implementation |
| Private Methods |
\*-----------------------------------------------------*/
/*---------------------------------------------------------*\
| Linux AutoStart Implementation |
| Private Methods |
\*---------------------------------------------------------*/
std::string AutoStart::GenerateDesktopFile(AutoStartInfo autostart_info)
{
/*-------------------------------------------------*\
| Generate a .desktop file from the AutoStart |
| parameters |
\*-------------------------------------------------*/
/*-----------------------------------------------------*\
| Generate a .desktop file from the AutoStart |
| parameters |
\*-----------------------------------------------------*/
std::stringstream fileContents;
fileContents << "[Desktop Entry]" << std::endl;
@@ -151,9 +151,9 @@ std::string AutoStart::GenerateDesktopFile(AutoStartInfo autostart_info)
fileContents << "Terminal=false" << std::endl;
fileContents << "Type=Application" << std::endl;
/*-------------------------------------------------*\
| Add the executable path and arguments |
\*-------------------------------------------------*/
/*-----------------------------------------------------*\
| Add the executable path and arguments |
\*-----------------------------------------------------*/
fileContents << "Exec=" << autostart_info.path;
if (autostart_info.args != "")
@@ -172,16 +172,16 @@ void AutoStart::InitAutoStart(std::string name)
autostart_name = name;
/*-------------------------------------------------*\
| Get home and config paths |
\*-------------------------------------------------*/
/*-----------------------------------------------------*\
| Get home and config paths |
\*-----------------------------------------------------*/
const char *xdg_config_home = getenv("XDG_CONFIG_HOME");
const char *home = getenv("HOME");
/*-------------------------------------------------*\
| Determine where the autostart .desktop files are |
| kept |
\*-------------------------------------------------*/
/*-----------------------------------------------------*\
| Determine where the autostart .desktop files are |
| kept |
\*-----------------------------------------------------*/
if(xdg_config_home != NULL)
{
autostart_dir = xdg_config_home;
@@ -193,9 +193,9 @@ void AutoStart::InitAutoStart(std::string name)
autostart_dir = autostart_dir + "/.config/autostart/";
}
/*-------------------------------------------------*\
| Check if the filename is valid |
\*-------------------------------------------------*/
/*-----------------------------------------------------*\
| Check if the filename is valid |
\*-----------------------------------------------------*/
if(autostart_dir != "")
{
std::error_code ec;
+39 -39
View File
@@ -26,21 +26,21 @@ bool AutoStart::DisableAutoStart()
std::error_code autostart_file_remove_errcode;
bool success = false;
/*-------------------------------------------------*\
| Check if the filename is valid |
\*-------------------------------------------------*/
/*-----------------------------------------------------*\
| Check if the filename is valid |
\*-----------------------------------------------------*/
if(autostart_file != "")
{
/*---------------------------------------------*\
| If file doesn't exist, disable is successful |
\*---------------------------------------------*/
/*-------------------------------------------------*\
| If file doesn't exist, disable is successful |
\*-------------------------------------------------*/
if(!filesystem::exists(autostart_file))
{
success = true;
}
/*---------------------------------------------*\
| Otherwise, delete the file |
\*---------------------------------------------*/
/*-------------------------------------------------*\
| Otherwise, delete the file |
\*-------------------------------------------------*/
else
{
success = filesystem::remove(autostart_file, autostart_file_remove_errcode);
@@ -63,25 +63,25 @@ bool AutoStart::EnableAutoStart(AutoStartInfo autostart_info)
{
bool success = false;
/*-------------------------------------------------*\
| Check if the filename is valid |
\*-------------------------------------------------*/
/*-----------------------------------------------------*\
| Check if the filename is valid |
\*-----------------------------------------------------*/
if(autostart_file != "")
{
std::string desktop_file = GenerateLaunchAgentFile(autostart_info);
std::ofstream autostart_file_stream(autostart_file, std::ios::out | std::ios::trunc);
/*---------------------------------------------*\
| Error out if the file could not be opened |
\*---------------------------------------------*/
/*-------------------------------------------------*\
| Error out if the file could not be opened |
\*-------------------------------------------------*/
if(!autostart_file_stream)
{
LOG_ERROR("[AutoStart] Could not open %s for writing.", autostart_file.c_str());
success = false;
}
/*---------------------------------------------*\
| Otherwise, write the file |
\*---------------------------------------------*/
/*-------------------------------------------------*\
| Otherwise, write the file |
\*-------------------------------------------------*/
else
{
autostart_file_stream << desktop_file;
@@ -104,9 +104,9 @@ bool AutoStart::EnableAutoStart(AutoStartInfo autostart_info)
bool AutoStart::IsAutoStartEnabled()
{
/*-------------------------------------------------*\
| Check if the filename is valid |
\*-------------------------------------------------*/
/*-----------------------------------------------------*\
| Check if the filename is valid |
\*-----------------------------------------------------*/
if(autostart_file != "")
{
return(filesystem::exists(autostart_file));
@@ -119,9 +119,9 @@ bool AutoStart::IsAutoStartEnabled()
std::string AutoStart::GetExePath()
{
/*-------------------------------------------------*\
| Create the OpenRGB executable path |
\*-------------------------------------------------*/
/*-----------------------------------------------------*\
| Create the OpenRGB executable path |
\*-----------------------------------------------------*/
char exepath[ PATH_MAX ];
uint32_t exesize = PATH_MAX;
@@ -132,17 +132,17 @@ std::string AutoStart::GetExePath()
return("");
}
/*-----------------------------------------------------*\
| MacOS AutoStart Implementation |
| Private Methods |
\*-----------------------------------------------------*/
/*---------------------------------------------------------*\
| MacOS AutoStart Implementation |
| Private Methods |
\*---------------------------------------------------------*/
std::string AutoStart::GenerateLaunchAgentFile(AutoStartInfo autostart_info)
{
/*-------------------------------------------------*\
| Generate a .plist file from the AutoStart |
| parameters |
\*-------------------------------------------------*/
/*-----------------------------------------------------*\
| Generate a .plist file from the AutoStart |
| parameters |
\*-----------------------------------------------------*/
std::stringstream fileContents;
fileContents << "<?xml version=\"1.0\" encoding=\"UTF-8\"?>" << std::endl;
@@ -180,16 +180,16 @@ void AutoStart::InitAutoStart(std::string name)
autostart_name = name;
/*-------------------------------------------------*\
| Determine where the autostart .desktop files are |
| kept |
\*-------------------------------------------------*/
/*-----------------------------------------------------*\
| Determine where the autostart .desktop files are |
| kept |
\*-----------------------------------------------------*/
autostart_dir = getenv("HOME");
autostart_dir = autostart_dir + "/Library/LaunchAgents/";
/*-------------------------------------------------*\
| Check if the filename is valid |
\*-------------------------------------------------*/
/*-----------------------------------------------------*\
| Check if the filename is valid |
\*-----------------------------------------------------*/
if(autostart_dir != "")
{
std::error_code ec;
+39 -39
View File
@@ -25,21 +25,21 @@ bool AutoStart::DisableAutoStart()
std::error_code autostart_file_remove_errcode;
bool success = false;
/*-------------------------------------------------*\
| Check if the filename is valid |
\*-------------------------------------------------*/
/*-----------------------------------------------------*\
| Check if the filename is valid |
\*-----------------------------------------------------*/
if(autostart_file != "")
{
/*---------------------------------------------*\
| If file doesn't exist, disable is successful |
\*---------------------------------------------*/
/*-------------------------------------------------*\
| If file doesn't exist, disable is successful |
\*-------------------------------------------------*/
if(!filesystem::exists(autostart_file))
{
success = true;
}
/*---------------------------------------------*\
| Otherwise, delete the file |
\*---------------------------------------------*/
/*-------------------------------------------------*\
| Otherwise, delete the file |
\*-------------------------------------------------*/
else
{
success = filesystem::remove(autostart_file, autostart_file_remove_errcode);
@@ -62,9 +62,9 @@ bool AutoStart::EnableAutoStart(AutoStartInfo autostart_info)
{
bool success = false;
/*-------------------------------------------------*\
| Check if the filename is valid |
\*-------------------------------------------------*/
/*-----------------------------------------------------*\
| Check if the filename is valid |
\*-----------------------------------------------------*/
if(autostart_file != "")
{
bool weInitialised = false;
@@ -79,9 +79,9 @@ bool AutoStart::EnableAutoStart(AutoStartInfo autostart_info)
result = CoCreateInstance(CLSID_ShellLink, NULL, CLSCTX_ALL, IID_IShellLinkW, (void**)&shellLink);
/*---------------------------------------------*\
| If not initialized, initialize |
\*---------------------------------------------*/
/*-------------------------------------------------*\
| If not initialized, initialize |
\*-------------------------------------------------*/
if(result == CO_E_NOTINITIALIZED)
{
weInitialised = true;
@@ -89,10 +89,10 @@ bool AutoStart::EnableAutoStart(AutoStartInfo autostart_info)
result = CoCreateInstance(CLSID_ShellLink, NULL, CLSCTX_ALL, IID_IShellLinkW, (void**)&shellLink);
}
/*---------------------------------------------*\
| If successfully initialized, save a shortcut |
| from the AutoStart parameters |
\*---------------------------------------------*/
/*-------------------------------------------------*\
| If successfully initialized, save a shortcut |
| from the AutoStart parameters |
\*-------------------------------------------------*/
if(SUCCEEDED(result))
{
shellLink->SetPath(exepathw.c_str());
@@ -114,9 +114,9 @@ bool AutoStart::EnableAutoStart(AutoStartInfo autostart_info)
shellLink->Release();
}
/*---------------------------------------------*\
| Uninitialize when done |
\*---------------------------------------------*/
/*-------------------------------------------------*\
| Uninitialize when done |
\*-------------------------------------------------*/
if(weInitialised)
{
CoUninitialize();
@@ -132,9 +132,9 @@ bool AutoStart::EnableAutoStart(AutoStartInfo autostart_info)
bool AutoStart::IsAutoStartEnabled()
{
/*-------------------------------------------------*\
| Check if the filename is valid |
\*-------------------------------------------------*/
/*-----------------------------------------------------*\
| Check if the filename is valid |
\*-----------------------------------------------------*/
if(autostart_file != "")
{
return(filesystem::exists(autostart_file));
@@ -147,9 +147,9 @@ bool AutoStart::IsAutoStartEnabled()
std::string AutoStart::GetExePath()
{
/*-------------------------------------------------*\
| Create the OpenRGB executable path |
\*-------------------------------------------------*/
/*-----------------------------------------------------*\
| Create the OpenRGB executable path |
\*-----------------------------------------------------*/
char exepath[MAX_PATH] = "";
DWORD count = GetModuleFileNameA(NULL, exepath, MAX_PATH);
@@ -157,10 +157,10 @@ std::string AutoStart::GetExePath()
return(std::string(exepath, (count > 0) ? count : 0));
}
/*-----------------------------------------------------*\
| Windows AutoStart Implementation |
| Private Methods |
\*-----------------------------------------------------*/
/*---------------------------------------------------------*\
| Windows AutoStart Implementation |
| Private Methods |
\*---------------------------------------------------------*/
void AutoStart::InitAutoStart(std::string name)
{
@@ -168,9 +168,9 @@ void AutoStart::InitAutoStart(std::string name)
autostart_name = name;
/*-------------------------------------------------*\
| Get startup applications path |
\*-------------------------------------------------*/
/*-----------------------------------------------------*\
| Get startup applications path |
\*-----------------------------------------------------*/
HRESULT result = SHGetFolderPathA(NULL, CSIDL_PROGRAMS, NULL, 0, startMenuPath);
if(SUCCEEDED(result))
@@ -185,10 +185,10 @@ void AutoStart::InitAutoStart(std::string name)
}
}
/*-----------------------------------------------------*\
| Convert an UTF8 string to a wide Unicode String |
| (from wmi.cpp) |
\*-----------------------------------------------------*/
/*---------------------------------------------------------*\
| Convert an UTF8 string to a wide Unicode String |
| (from wmi.cpp) |
\*---------------------------------------------------------*/
std::wstring AutoStart::utf8_decode(const std::string& str)
{
if(str.empty())
+5
View File
@@ -67,3 +67,8 @@ OpenRGB is written in C++, uses the Qt framework for UI, and uses the QMake buil
| This is a comment |
\*_-------------------------------*/
```
## Translating
Translation files are located in [`OpenRGB/qt/i18n/`](https://gitlab.com/CalcProgrammer1/OpenRGB/-/tree/master/qt/i18n), where languages are formatted using ISO 639-1 format: `OpenRGB_xx_XX.ts` — `xx_XX` representing the language code.
In order to translate a file, you need to [fork](https://gitlab.com/CalcProgrammer1/OpenRGB/-/forks/new) the project, create a new file for your language with `lupdate` (or edit an exisiting one), edit the file with `qtlinguist`, commit, push, and create a merge request.
@@ -33,9 +33,8 @@ void DetectA4TechMouseControllers(hid_device_info* info, const std::string& name
if(dev)
{
BloodyMouseController* controller = new BloodyMouseController(dev, info->path, info->product_id);
BloodyMouseController* controller = new BloodyMouseController(dev, info->path, info->product_id, name);
RGBController_BloodyMouse* rgb_controller = new RGBController_BloodyMouse(controller);
rgb_controller->name = name;
ResourceManager::get()->RegisterRGBController(rgb_controller);
}
@@ -47,9 +46,8 @@ void DetectBloodyB820R(hid_device_info* info, const std::string& name)
if(dev)
{
BloodyB820RController* controller = new BloodyB820RController(dev, info->path);
BloodyB820RController* controller = new BloodyB820RController(dev, info->path, name);
RGBController_BloodyB820R* rgb_controller = new RGBController_BloodyB820R(controller);
rgb_controller->name = name;
ResourceManager::get()->RegisterRGBController(rgb_controller);
}
@@ -20,10 +20,11 @@
| the second packet. |
\*-------------------------------------------------------------------------------------*/
BloodyB820RController::BloodyB820RController(hid_device* dev_handle, const char* path)
BloodyB820RController::BloodyB820RController(hid_device* dev_handle, const char* path, std::string dev_name)
{
dev = dev_handle;
location = path;
name = dev_name;
SendControlPacket(BLOODY_B820R_GAIN_CONTROL);
}
@@ -52,6 +53,11 @@ std::string BloodyB820RController::GetLocation()
return("HID: " + location);
}
std::string BloodyB820RController::GetName()
{
return(name);
}
void BloodyB820RController::SendControlPacket(uint8_t data)
{
uint8_t buffer[BLOODY_B820R_PACKET_SIZE] = { 0x07, 0x03, 0x06, 0x01, 0x00, 0x00, 0x00, 0x00 };
@@ -39,15 +39,17 @@ enum
class BloodyB820RController
{
public:
BloodyB820RController(hid_device* dev_handle, const char* path);
BloodyB820RController(hid_device* dev_handle, const char* path, std::string dev_name);
~BloodyB820RController();
std::string GetSerial();
std::string GetLocation();
std::string GetName();
void SetLEDDirect(std::vector<RGBColor> colors);
void SendControlPacket(uint8_t data);
private:
std::string location;
std::string name;
hid_device* dev;
};
@@ -154,7 +154,7 @@ RGBController_BloodyB820R::RGBController_BloodyB820R(BloodyB820RController *cont
{
controller = controller_ptr;
name = "Bloody B820R";
name = controller->GetName();
vendor = "A4Tech";
type = DEVICE_TYPE_KEYBOARD;
description = "A4Tech Bloody Keyboard";
@@ -12,11 +12,12 @@
#include "BloodyMouseController.h"
#include "StringUtils.h"
BloodyMouseController::BloodyMouseController(hid_device* dev_handle, const char* path, uint16_t product_id)
BloodyMouseController::BloodyMouseController(hid_device* dev_handle, const char* path, uint16_t product_id, std::string dev_name)
{
dev = dev_handle;
location = path;
pid = product_id;
name = dev_name;
InitDevice();
}
@@ -49,6 +50,11 @@ std::string BloodyMouseController::GetLocation()
return("HID: " + location);
}
std::string BloodyMouseController::GetName()
{
return(name);
}
void BloodyMouseController::InitDevice()
{
uint8_t buffer[BLOODYMOUSE_WRITE_PACKET_SIZE] = { 0x07, 0x03, 0x06, 0x01, 0x00, 0x00, 0x00, 0x00 };
@@ -50,18 +50,20 @@ enum
class BloodyMouseController
{
public:
BloodyMouseController(hid_device* dev_handle, const char* path, uint16_t product_id);
BloodyMouseController(hid_device* dev_handle, const char* path, uint16_t product_id, std::string dev_name);
~BloodyMouseController();
uint16_t GetPid();
std::string GetSerial();
std::string GetLocation();
std::string GetName();
void SetLedsDirect(std::vector<RGBColor> colors);
private:
uint16_t pid;
std::string location;
std::string name;
hid_device* dev;
void InitDevice();
@@ -71,6 +71,7 @@ RGBController_BloodyMouse::RGBController_BloodyMouse(BloodyMouseController *cont
type = DEVICE_TYPE_MOUSE;
}
name = controller->GetName();
vendor = "Bloody";
description = "Controller compatible with the Bloody W60 Pro and MP 50RS";
serial = controller->GetSerial();
@@ -0,0 +1,195 @@
/*---------------------------------------------------------*\
| AMBXController.cpp |
| |
| Driver for Philips amBX Gaming lights |
| |
| This file is part of the OpenRGB project |
| SPDX-License-Identifier: GPL-2.0-only |
\*---------------------------------------------------------*/
#include "AMBXController.h"
#include "LogManager.h"
#include "StringUtils.h"
#include <cstring>
#include <thread>
#include <chrono>
AMBXController::AMBXController(const char* path)
{
initialized = false;
usb_context = nullptr;
dev_handle = nullptr;
location = "USB: ";
location += path;
// Initialize libusb in this instance
if(libusb_init(&usb_context) < 0)
{
return;
}
// Get the device list
libusb_device** device_list;
ssize_t device_count = libusb_get_device_list(usb_context, &device_list);
if(device_count < 0)
{
return;
}
for(ssize_t i = 0; i < device_count; i++)
{
libusb_device* device = device_list[i];
struct libusb_device_descriptor desc;
if(libusb_get_device_descriptor(device, &desc) != LIBUSB_SUCCESS)
{
continue;
}
if(desc.idVendor == AMBX_VID && desc.idProduct == AMBX_PID)
{
uint8_t bus = libusb_get_bus_number(device);
uint8_t address = libusb_get_device_address(device);
char current_path[32];
snprintf(current_path, sizeof(current_path), "%d-%d", bus, address);
if(strcmp(path, current_path) == 0)
{
// Try to open this device
if(libusb_open(device, &dev_handle) != LIBUSB_SUCCESS)
{
continue;
}
// Try to detach the kernel driver if attached
if(libusb_kernel_driver_active(dev_handle, 0))
{
libusb_detach_kernel_driver(dev_handle, 0);
}
// Set auto-detach for Windows compatibility
libusb_set_auto_detach_kernel_driver(dev_handle, 1);
// Claim the interface
if(libusb_claim_interface(dev_handle, 0) != LIBUSB_SUCCESS)
{
libusb_close(dev_handle);
dev_handle = nullptr;
continue;
}
// Get string descriptor for serial number if available
if(desc.iSerialNumber != 0)
{
unsigned char serial_str[256];
int serial_result = libusb_get_string_descriptor_ascii(dev_handle, desc.iSerialNumber,
serial_str, sizeof(serial_str));
if(serial_result > 0)
{
serial = std::string(reinterpret_cast<char*>(serial_str), serial_result);
}
}
// Successfully opened and claimed the device
initialized = true;
break;
}
}
}
libusb_free_device_list(device_list, 1);
}
AMBXController::~AMBXController()
{
if(initialized)
{
// Turn off all lights before closing
unsigned int led_ids[5] =
{
AMBX_LIGHT_LEFT,
AMBX_LIGHT_RIGHT,
AMBX_LIGHT_WALL_LEFT,
AMBX_LIGHT_WALL_CENTER,
AMBX_LIGHT_WALL_RIGHT
};
RGBColor colors[5] = { 0, 0, 0, 0, 0 };
SetLEDColors(led_ids, colors, 5);
}
if(dev_handle != nullptr)
{
// Release the interface
libusb_release_interface(dev_handle, 0);
// Close the device
libusb_close(dev_handle);
dev_handle = nullptr;
}
if(usb_context != nullptr)
{
libusb_exit(usb_context);
usb_context = nullptr;
}
}
std::string AMBXController::GetDeviceLocation()
{
return location;
}
std::string AMBXController::GetSerialString()
{
return serial;
}
bool AMBXController::IsInitialized()
{
return initialized;
}
void AMBXController::SendPacket(unsigned char* packet, unsigned int size)
{
if(!initialized || dev_handle == nullptr)
{
return;
}
int actual_length = 0;
libusb_interrupt_transfer(dev_handle, AMBX_ENDPOINT_OUT, packet, size, &actual_length, 100);
}
void AMBXController::SetLEDColor(unsigned int led, RGBColor color)
{
if(!initialized)
{
return;
}
unsigned char color_buf[6] =
{
AMBX_PACKET_HEADER,
static_cast<unsigned char>(led),
AMBX_SET_COLOR,
(unsigned char)RGBGetRValue(color),
(unsigned char)RGBGetGValue(color),
(unsigned char)RGBGetBValue(color)
};
SendPacket(color_buf, 6);
std::this_thread::sleep_for(std::chrono::milliseconds(2));
}
void AMBXController::SetLEDColors(unsigned int* leds, RGBColor* colors, unsigned int count)
{
for(unsigned int i = 0; i < count; i++)
{
SetLEDColor(leds[i], colors[i]);
}
}
@@ -0,0 +1,57 @@
/*---------------------------------------------------------*\
| AMBXController.h |
| |
| Driver for Philips amBX Gaming lights |
| |
| This file is part of the OpenRGB project |
| SPDX-License-Identifier: GPL-2.0-only |
\*---------------------------------------------------------*/
#pragma once
#include "RGBController.h"
#include <string>
#ifdef _WIN32
#include "dependencies/libusb-1.0.27/include/libusb.h"
#else
#include <libusb.h>
#endif
#define AMBX_VID 0x0471
#define AMBX_PID 0x083F
#define AMBX_ENDPOINT_OUT 0x02
#define AMBX_PACKET_HEADER 0xA1
#define AMBX_SET_COLOR 0x03
enum
{
AMBX_LIGHT_LEFT = 0x0B,
AMBX_LIGHT_RIGHT = 0x1B,
AMBX_LIGHT_WALL_LEFT = 0x2B,
AMBX_LIGHT_WALL_CENTER = 0x3B,
AMBX_LIGHT_WALL_RIGHT = 0x4B
};
class AMBXController
{
public:
AMBXController(const char* path);
~AMBXController();
std::string GetDeviceLocation();
std::string GetSerialString();
bool IsInitialized();
void SetLEDColor(unsigned int led, RGBColor color);
void SetLEDColors(unsigned int* leds, RGBColor* colors, unsigned int count);
private:
libusb_context* usb_context;
libusb_device_handle* dev_handle;
std::string location;
std::string serial;
bool initialized;
void SendPacket(unsigned char* packet, unsigned int size);
};
@@ -0,0 +1,83 @@
/*---------------------------------------------------------*\
| AMBXControllerDetect.cpp |
| |
| Detector for Philips amBX Gaming lights |
| |
| This file is part of the OpenRGB project |
| SPDX-License-Identifier: GPL-2.0-only |
\*---------------------------------------------------------*/
#include "Detector.h"
#include "AMBXController.h"
#include "RGBController.h"
#include "RGBController_AMBX.h"
#ifdef _WIN32
#include "dependencies/libusb-1.0.27/include/libusb.h"
#else
#include <libusb.h>
#endif
/******************************************************************************************\
* *
* DetectAMBXControllers *
* *
* Detect Philips amBX Gaming devices *
* *
\******************************************************************************************/
void DetectAMBXControllers()
{
libusb_context* ctx = NULL;
if(libusb_init(&ctx) < 0)
{
return;
}
libusb_device** devs;
ssize_t num_devs = libusb_get_device_list(ctx, &devs);
if(num_devs <= 0)
{
libusb_exit(ctx);
return;
}
for(ssize_t i = 0; i < num_devs; i++)
{
libusb_device* dev = devs[i];
libusb_device_descriptor desc;
if(libusb_get_device_descriptor(dev, &desc) != 0)
{
continue;
}
if(desc.idVendor == AMBX_VID && desc.idProduct == AMBX_PID)
{
uint8_t bus = libusb_get_bus_number(dev);
uint8_t address = libusb_get_device_address(dev);
char device_path[32];
snprintf(device_path, sizeof(device_path), "%d-%d", bus, address);
// Use the AMBXController to handle opening and initializing
AMBXController* controller = new AMBXController(device_path);
if(controller->IsInitialized())
{
RGBController_AMBX* rgb_controller = new RGBController_AMBX(controller);
ResourceManager::get()->RegisterRGBController(rgb_controller);
}
else
{
delete controller;
}
}
}
libusb_free_device_list(devs, 1);
libusb_exit(ctx);
}
REGISTER_DETECTOR("Philips amBX", DetectAMBXControllers);
@@ -0,0 +1,179 @@
/*---------------------------------------------------------*\
| RGBController_AMBX.cpp |
| |
| RGB Controller for Philips amBX Gaming lights |
| |
| This file is part of the OpenRGB project |
| SPDX-License-Identifier: GPL-2.0-only |
\*---------------------------------------------------------*/
#include "RGBController_AMBX.h"
/**------------------------------------------------------------------*\
@name Philips amBX
@category Accessory
@type USB
@save :x:
@direct :white_check_mark:
@effects :x:
@detectors DetectAMBXControllers
@comment The Philips amBX Gaming lights system includes left and right
lights and a wall-washer bar with three zones.
\*-------------------------------------------------------------------*/
RGBController_AMBX::RGBController_AMBX(AMBXController* controller_ptr)
{
controller = controller_ptr;
name = "Philips amBX";
vendor = "Philips";
type = DEVICE_TYPE_ACCESSORY;
description = "Philips amBX Gaming Device";
location = controller->GetDeviceLocation();
serial = controller->GetSerialString();
mode Direct;
Direct.name = "Direct";
Direct.value = 0;
Direct.flags = MODE_FLAG_HAS_PER_LED_COLOR;
Direct.color_mode = MODE_COLORS_PER_LED;
modes.push_back(Direct);
SetupZones();
}
RGBController_AMBX::~RGBController_AMBX()
{
delete controller;
}
void RGBController_AMBX::SetupZones()
{
// Set up zones
zone side_lights_zone;
side_lights_zone.name = "Side Lights";
side_lights_zone.type = ZONE_TYPE_LINEAR;
side_lights_zone.leds_min = 2;
side_lights_zone.leds_max = 2;
side_lights_zone.leds_count = 2;
side_lights_zone.matrix_map = NULL;
zones.push_back(side_lights_zone);
zone wallwasher_zone;
wallwasher_zone.name = "Wallwasher";
wallwasher_zone.type = ZONE_TYPE_LINEAR;
wallwasher_zone.leds_min = 3;
wallwasher_zone.leds_max = 3;
wallwasher_zone.leds_count = 3;
wallwasher_zone.matrix_map = NULL;
zones.push_back(wallwasher_zone);
// Set up LEDs
led left_light;
left_light.name = "Left";
left_light.value = AMBX_LIGHT_LEFT;
leds.push_back(left_light);
led right_light;
right_light.name = "Right";
right_light.value = AMBX_LIGHT_RIGHT;
leds.push_back(right_light);
led wall_left;
wall_left.name = "Wall Left";
wall_left.value = AMBX_LIGHT_WALL_LEFT;
leds.push_back(wall_left);
led wall_center;
wall_center.name = "Wall Center";
wall_center.value = AMBX_LIGHT_WALL_CENTER;
leds.push_back(wall_center);
led wall_right;
wall_right.name = "Wall Right";
wall_right.value = AMBX_LIGHT_WALL_RIGHT;
leds.push_back(wall_right);
SetupColors();
}
void RGBController_AMBX::ResizeZone(int /*zone*/, int /*new_size*/)
{
// This device does not support resizing zones
}
void RGBController_AMBX::DeviceUpdateLEDs()
{
if(!controller->IsInitialized())
{
return;
}
unsigned int led_values[5];
RGBColor led_colors[5];
for(unsigned int led_idx = 0; led_idx < leds.size(); led_idx++)
{
led_values[led_idx] = leds[led_idx].value;
led_colors[led_idx] = colors[led_idx];
}
controller->SetLEDColors(led_values, led_colors, static_cast<unsigned int>(leds.size()));
}
void RGBController_AMBX::UpdateZoneLEDs(int zone)
{
if(!controller->IsInitialized())
{
return;
}
unsigned int start_idx = 0;
unsigned int zone_size = 0;
// Calculate start index and size
for(unsigned int z_idx = 0; z_idx < zones.size(); z_idx++)
{
if(z_idx == (unsigned int)zone)
{
zone_size = zones[z_idx].leds_count;
break;
}
start_idx += zones[z_idx].leds_count;
}
unsigned int led_values[5];
RGBColor led_colors[5];
for(unsigned int led_idx = 0; led_idx < zone_size; led_idx++)
{
unsigned int current_idx = start_idx + led_idx;
led_values[led_idx] = leds[current_idx].value;
led_colors[led_idx] = colors[current_idx];
}
controller->SetLEDColors(led_values, led_colors, zone_size);
}
void RGBController_AMBX::UpdateSingleLED(int led)
{
if(!controller->IsInitialized())
{
return;
}
unsigned int led_value = leds[led].value;
RGBColor color = colors[led];
controller->SetLEDColor(led_value, color);
}
void RGBController_AMBX::DeviceUpdateMode()
{
if(!controller->IsInitialized())
{
return;
}
DeviceUpdateLEDs();
}
@@ -0,0 +1,32 @@
/*---------------------------------------------------------*\
| RGBController_AMBX.h |
| |
| RGB Controller for Philips amBX Gaming lights |
| |
| This file is part of the OpenRGB project |
| SPDX-License-Identifier: GPL-2.0-only |
\*---------------------------------------------------------*/
#pragma once
#include "RGBController.h"
#include "AMBXController.h"
class RGBController_AMBX : public RGBController
{
public:
RGBController_AMBX(AMBXController* controller_ptr);
~RGBController_AMBX();
void SetupZones();
void ResizeZone(int zone, int new_size);
void DeviceUpdateLEDs();
void UpdateZoneLEDs(int zone);
void UpdateSingleLED(int led);
void DeviceUpdateMode();
private:
AMBXController* controller;
};
@@ -35,11 +35,12 @@
void DetectAMDWraithPrismControllers(hid_device_info* info, const std::string&)
{
hid_device* dev = hid_open_path(info->path);
if( dev )
if(dev)
{
AMDWraithPrismController* controller = new AMDWraithPrismController(dev, info->path);
RGBController_AMDWraithPrism* rgb_controller = new RGBController_AMDWraithPrism(controller);
// Constructor sets the name
ResourceManager::get()->RegisterRGBController(rgb_controller);
}
}
@@ -17,10 +17,11 @@
using namespace std::chrono_literals;
AOCKeyboardController::AOCKeyboardController(hid_device* dev_handle, const char* path)
AOCKeyboardController::AOCKeyboardController(hid_device* dev_handle, const char* path, std::string dev_name)
{
dev = dev_handle;
location = path;
name = dev_name;
}
AOCKeyboardController::~AOCKeyboardController()
@@ -33,6 +34,11 @@ std::string AOCKeyboardController::GetDeviceLocation()
return("HID " + location);
}
std::string AOCKeyboardController::GetDeviceName()
{
return(name);
}
std::string AOCKeyboardController::GetSerialString()
{
wchar_t serial_string[128];
@@ -64,10 +64,11 @@ enum
class AOCKeyboardController
{
public:
AOCKeyboardController(hid_device* dev_handle, const char* path);
AOCKeyboardController(hid_device* dev_handle, const char* path, std::string dev_name);
~AOCKeyboardController();
std::string GetDeviceLocation();
std::string GetDeviceName();
std::string GetSerialString();
void SetLightingConfig
@@ -88,6 +89,7 @@ public:
private:
hid_device* dev;
std::string location;
std::string name;
void SendStartPacket();
void SendEndPacket();
@@ -34,9 +34,8 @@ void DetectAOCKeyboardControllers(hid_device_info* info, const std::string& name
if(dev)
{
AOCKeyboardController* controller = new AOCKeyboardController(dev, info->path);
AOCKeyboardController* controller = new AOCKeyboardController(dev, info->path, name);
RGBController_AOCKeyboard* rgb_controller = new RGBController_AOCKeyboard(controller);
rgb_controller->name = name;
ResourceManager::get()->RegisterRGBController(rgb_controller);
}
@@ -52,7 +52,7 @@ RGBController_AOCKeyboard::RGBController_AOCKeyboard(AOCKeyboardController* cont
{
controller = controller_ptr;
name = "AOC Keyboard Device";
name = controller->GetDeviceName();
vendor = "AOC";
type = DEVICE_TYPE_KEYBOARD;
description = "AOC Keyboard Device";
@@ -13,10 +13,11 @@
#include "AOCMouseController.h"
#include "StringUtils.h"
AOCMouseController::AOCMouseController(hid_device* dev_handle, const char* path)
AOCMouseController::AOCMouseController(hid_device* dev_handle, const char* path, std::string dev_name)
{
dev = dev_handle;
location = path;
name = dev_name;
}
AOCMouseController::~AOCMouseController()
@@ -29,6 +30,11 @@ std::string AOCMouseController::GetDeviceLocation()
return("HID " + location);
}
std::string AOCMouseController::GetDeviceName()
{
return(name);
}
std::string AOCMouseController::GetSerialString()
{
wchar_t serial_string[128];
@@ -56,10 +56,11 @@ enum
class AOCMouseController
{
public:
AOCMouseController(hid_device* dev_handle, const char* path);
AOCMouseController(hid_device* dev_handle, const char* path, std::string dev_name);
~AOCMouseController();
std::string GetDeviceLocation();
std::string GetDeviceName();
std::string GetSerialString();
void SendDirect
@@ -79,4 +80,5 @@ public:
private:
hid_device* dev;
std::string location;
std::string name;
};
@@ -33,9 +33,8 @@ void DetectAOCMouseControllers(hid_device_info* info, const std::string& name)
if(dev)
{
AOCMouseController* controller = new AOCMouseController(dev, info->path);
AOCMouseController* controller = new AOCMouseController(dev, info->path, name);
RGBController_AOCMouse* rgb_controller = new RGBController_AOCMouse(controller);
rgb_controller->name = name;
ResourceManager::get()->RegisterRGBController(rgb_controller);
}
@@ -26,7 +26,7 @@ RGBController_AOCMouse::RGBController_AOCMouse(AOCMouseController* controller_pt
{
controller = controller_ptr;
name = "AOC Mouse Device";
name = controller->GetDeviceName();
vendor = "AOC";
type = DEVICE_TYPE_MOUSE;
description = "AOC Mouse Device";
@@ -13,10 +13,11 @@
#include "AOCMousematController.h"
#include "StringUtils.h"
AOCMousematController::AOCMousematController(hid_device* dev_handle, const char* path)
AOCMousematController::AOCMousematController(hid_device* dev_handle, const char* path, std::string dev_name)
{
dev = dev_handle;
location = path;
name = dev_name;
}
AOCMousematController::~AOCMousematController()
@@ -29,6 +30,11 @@ std::string AOCMousematController::GetDeviceLocation()
return("HID " + location);
}
std::string AOCMousematController::GetDeviceName()
{
return(name);
}
std::string AOCMousematController::GetSerialString()
{
wchar_t serial_string[128];
@@ -55,10 +55,11 @@ enum
class AOCMousematController
{
public:
AOCMousematController(hid_device* dev_handle, const char* path);
AOCMousematController(hid_device* dev_handle, const char* path, std::string dev_name);
~AOCMousematController();
std::string GetDeviceLocation();
std::string GetDeviceName();
std::string GetSerialString();
void SendDirect
@@ -78,4 +79,5 @@ public:
private:
hid_device* dev;
std::string location;
std::string name;
};
@@ -33,9 +33,8 @@ void DetectAOCMousematControllers(hid_device_info* info, const std::string& name
if(dev)
{
AOCMousematController* controller = new AOCMousematController(dev, info->path);
AOCMousematController* controller = new AOCMousematController(dev, info->path, name);
RGBController_AOCMousemat* rgb_controller = new RGBController_AOCMousemat(controller);
rgb_controller->name = name;
ResourceManager::get()->RegisterRGBController(rgb_controller);
}
@@ -26,7 +26,7 @@ RGBController_AOCMousemat::RGBController_AOCMousemat(AOCMousematController* cont
{
controller = controller_ptr;
name = "AOC Mousemat Device";
name = controller->GetDeviceName();
vendor = "AOC";
type = DEVICE_TYPE_MOUSEMAT;
description = "AOC Mousemat Device";
@@ -14,10 +14,11 @@
#include "AlienwareAW410KController.h"
#include "StringUtils.h"
AlienwareAW410KController::AlienwareAW410KController(hid_device* dev_handle, const char* path)
AlienwareAW410KController::AlienwareAW410KController(hid_device* dev_handle, const char* path, std::string dev_name)
{
dev = dev_handle;
location = path;
name = dev_name;
SendCommit();
}
@@ -32,6 +33,11 @@ std::string AlienwareAW410KController::GetDeviceLocation()
return("HID: " + location);
}
std::string AlienwareAW410KController::GetDeviceName()
{
return(name);
}
std::string AlienwareAW410KController::GetSerialString()
{
wchar_t serial_string[128];
@@ -75,10 +75,11 @@ struct SelectedButtons
class AlienwareAW410KController
{
public:
AlienwareAW410KController(hid_device* dev_handle, const char* path);
AlienwareAW410KController(hid_device* dev_handle, const char* path, std::string dev_name);
~AlienwareAW410KController();
std::string GetDeviceLocation();
std::string GetDeviceName();
std::string GetSerialString();
void SendInitialize();
@@ -140,6 +141,7 @@ public:
private:
hid_device* dev;
std::string location;
std::string name;
void SendMode
(
@@ -176,7 +176,7 @@ RGBController_AlienwareAW410K::RGBController_AlienwareAW410K(AlienwareAW410KCont
{
controller = controller_ptr;
name = "Alienware AW410K Keyboard Device";
name = controller->GetDeviceName();
vendor = "Alienware";
type = DEVICE_TYPE_KEYBOARD;
description = "Alienware AW410K Keyboard Device";
@@ -13,10 +13,11 @@
#include "AlienwareAW510KController.h"
#include "StringUtils.h"
AlienwareAW510KController::AlienwareAW510KController(hid_device* dev_handle, const char* path)
AlienwareAW510KController::AlienwareAW510KController(hid_device* dev_handle, const char* path, std::string dev_name)
{
dev = dev_handle;
location = path;
name = dev_name;
SendCommit();
}
@@ -31,6 +32,11 @@ std::string AlienwareAW510KController::GetDeviceLocation()
return("HID: " + location);
}
std::string AlienwareAW510KController::GetDeviceName()
{
return(name);
}
std::string AlienwareAW510KController::GetSerialString()
{
wchar_t serial_string[128];
@@ -77,10 +77,11 @@ struct SelectedKeys
class AlienwareAW510KController
{
public:
AlienwareAW510KController(hid_device* dev_handle, const char* path);
AlienwareAW510KController(hid_device* dev_handle, const char* path, std::string dev_name);
~AlienwareAW510KController();
std::string GetDeviceLocation();
std::string GetDeviceName();
std::string GetSerialString();
void SendInitialize();
@@ -142,6 +143,7 @@ public:
private:
hid_device* dev;
std::string location;
std::string name;
void SendMode
(
@@ -175,7 +175,7 @@ RGBController_AlienwareAW510K::RGBController_AlienwareAW510K(AlienwareAW510KCont
{
controller = controller_ptr;
name = "Alienware AW510K Keyboard Device";
name = controller->GetDeviceName();
vendor = "Alienware";
type = DEVICE_TYPE_KEYBOARD;
description = "Alienware AW510K Keyboard Device";
@@ -38,9 +38,9 @@ void DetectAlienwareAW510KControllers(hid_device_info* info, const std::string&
hid_device* dev = hid_open_path(info->path);
if( dev )
{
AlienwareAW510KController* controller = new AlienwareAW510KController(dev, info->path);
AlienwareAW510KController* controller = new AlienwareAW510KController(dev, info->path, name);
RGBController_AlienwareAW510K* rgb_controller = new RGBController_AlienwareAW510K(controller);
rgb_controller->name = name;
ResourceManager::get()->RegisterRGBController(rgb_controller);
}
}
@@ -50,9 +50,9 @@ void DetectAlienwareAW410KControllers(hid_device_info* info, const std::string&
hid_device* dev = hid_open_path(info->path);
if( dev )
{
AlienwareAW410KController* controller = new AlienwareAW410KController(dev, info->path);
AlienwareAW410KController* controller = new AlienwareAW410KController(dev, info->path, name);
RGBController_AlienwareAW410K* rgb_controller = new RGBController_AlienwareAW410K(controller);
rgb_controller->name = name;
ResourceManager::get()->RegisterRGBController(rgb_controller);
}
}/* DetectAlienwareKeyboardControllers() */
@@ -127,7 +127,7 @@ std::vector<unsigned char> AlienwareAW3423DWFController::GenerateKey(
if(response.size() > 14)
{
unsigned char idx = response[14] & 0x07;
if((idx + 8) < response.size())
if((idx + 8) < (unsigned char)response.size())
{
out_buffer[idx] ^= response[idx + 8];
}
@@ -28,8 +28,6 @@ public:
private:
hid_device* dev;
std::string location;
unsigned char endpoint_out = 0x02;
unsigned char endpoint_in = 0x81;
static const std::vector<std::vector<unsigned char>> OEM_KEYS;
@@ -15,10 +15,11 @@
#include "AlienwareMonitorController.h"
AlienwareMonitorController::AlienwareMonitorController(hid_device *dev_handle, const char *path)
AlienwareMonitorController::AlienwareMonitorController(hid_device *dev_handle, const char *path, std::string dev_name)
{
dev = dev_handle;
location = path;
name = dev_name;
Initialize();
}
@@ -33,6 +34,11 @@ std::string AlienwareMonitorController::GetLocation()
return("HID: " + location);
}
std::string AlienwareMonitorController::GetName()
{
return(name);
}
std::string AlienwareMonitorController::GetSerialString()
{
return("");
@@ -56,6 +62,7 @@ void AlienwareMonitorController::SendColor(unsigned char led_id, unsigned char r
memset(packet, 0xFF, sizeof(packet));
packet[0] = 0x00;
packet[1] = 0x92;
packet[2] = 0x37;
packet[3] = 0x0a;
@@ -87,6 +94,7 @@ void AlienwareMonitorController::Initialize()
memset(packet, 0xFF, sizeof(packet));
packet[0] = 0x00;
packet[1] = 0x95;
packet[2] = 0x00;
packet[3] = 0x00;
@@ -101,6 +109,7 @@ void AlienwareMonitorController::Initialize()
memset(packet, 0xFF, sizeof(packet));
packet[0] = 0x00;
packet[1] = 0x92;
packet[2] = 0x37;
packet[3] = 0x08;
@@ -123,6 +132,7 @@ void AlienwareMonitorController::Initialize()
memset(packet, 0x00, sizeof(packet));
packet[0] = 0x00;
packet[1] = 0x93;
packet[2] = 0x37;
packet[3] = 0x12;
@@ -18,16 +18,18 @@
class AlienwareMonitorController
{
public:
AlienwareMonitorController(hid_device* dev_handle, const char* path);
AlienwareMonitorController(hid_device* dev_handle, const char* path, std::string dev_name);
~AlienwareMonitorController();
std::string GetLocation();
std::string GetName();
std::string GetSerialString();
void SendColor(unsigned char led_id, unsigned char r, unsigned char g, unsigned char b);
private:
hid_device* dev;
std::string location;
std::string name;
void Initialize();
};
@@ -42,8 +42,9 @@ void DetectAlienwareAW3423DWFControllers(hid_device_info* info, const std::strin
hid_device* dev = hid_open_path(info->path);
if(dev)
{
AlienwareAW3423DWFController* controller = new AlienwareAW3423DWFController(dev, info->path);
AlienwareAW3423DWFController* controller = new AlienwareAW3423DWFController(dev, info->path);
RGBController_AlienwareAW3423DWF* rgb_controller = new RGBController_AlienwareAW3423DWF(controller);
ResourceManager::get()->RegisterRGBController(rgb_controller);
}
}
@@ -54,9 +55,8 @@ void DetectAlienwareMonitorControllers(hid_device_info* info, const std::string&
if(dev)
{
AlienwareMonitorController* controller = new AlienwareMonitorController(dev, info->path);
AlienwareMonitorController* controller = new AlienwareMonitorController(dev, info->path, name);
RGBController_AlienwareMonitor* rgb_controller = new RGBController_AlienwareMonitor(controller);
rgb_controller->name = name;
ResourceManager::get()->RegisterRGBController(rgb_controller);
}
@@ -26,7 +26,7 @@ RGBController_AlienwareMonitor::RGBController_AlienwareMonitor(AlienwareMonitorC
{
controller = controller_ptr;
name = "Alienware Monitor";
name = controller->GetName();
description = "Alienware Monitor";
vendor = "Alienware";
type = DEVICE_TYPE_MONITOR;
@@ -40,11 +40,12 @@
void DetectAnnePro2Controllers(hid_device_info* info, const std::string&)
{
hid_device* dev = hid_open_path(info->path);
if( dev )
if(dev)
{
AnnePro2Controller* controller = new AnnePro2Controller(dev, info->path);
RGBController_AnnePro2* rgb_controller = new RGBController_AnnePro2(controller);
// Constructor sets the name
ResourceManager::get()->RegisterRGBController(rgb_controller);
}
}
@@ -76,9 +76,9 @@ void ArcticController::SetChannels(std::vector<RGBColor> colors)
{
const unsigned int offset = ARCTIC_COMMAND_PAYLOAD_OFFSET + channel * 3;
buffer[offset + 0x00] = std::min<unsigned int>(254, RGBGetRValue(colors[channel]));
buffer[offset + 0x01] = std::min<unsigned int>(254, RGBGetGValue(colors[channel]));
buffer[offset + 0x02] = std::min<unsigned int>(254, RGBGetBValue(colors[channel]));
buffer[offset + 0x00] = (char)std::min<unsigned int>(254, RGBGetRValue(colors[channel]));
buffer[offset + 0x01] = (char)std::min<unsigned int>(254, RGBGetGValue(colors[channel]));
buffer[offset + 0x02] = (char)std::min<unsigned int>(254, RGBGetBValue(colors[channel]));
}
serialport.serial_write(buffer, sizeof(buffer));
@@ -35,7 +35,7 @@ void DetectAsusAuraCoreControllers(hid_device_info* info, const std::string& /*n
{
AuraCoreController* controller = new AuraCoreController(dev, info->path);
RGBController_AuraCore* rgb_controller = new RGBController_AuraCore(controller);
// Constructor sets the name
if(rgb_controller->type != DEVICE_TYPE_UNKNOWN)
{
ResourceManager::get()->RegisterRGBController(rgb_controller);
@@ -55,7 +55,7 @@ void DetectAsusAuraCoreLaptopControllers(hid_device_info* info, const std::strin
{
AsusAuraCoreLaptopController* controller = new AsusAuraCoreLaptopController(dev, info->path);
RGBController_AsusAuraCoreLaptop* rgb_controller = new RGBController_AsusAuraCoreLaptop(controller);
// Constructor sets the name
ResourceManager::get()->RegisterRGBController(rgb_controller);
}
}
@@ -13,12 +13,11 @@
#include "AsusAuraGPUController.h"
#include "pci_ids.h"
AuraGPUController::AuraGPUController(i2c_smbus_interface* bus, aura_gpu_dev_id dev)
AuraGPUController::AuraGPUController(i2c_smbus_interface* bus, aura_gpu_dev_id dev, std::string dev_name)
{
this->bus = bus;
this->dev = dev;
strcpy(device_name, "ASUS Aura GPU"); // Would be nice to get the actual GPU name. Using this as a placeholder.
this->bus = bus;
this->dev = dev;
this->name = dev_name;
}
AuraGPUController::~AuraGPUController()
@@ -28,7 +27,7 @@ AuraGPUController::~AuraGPUController()
std::string AuraGPUController::GetDeviceName()
{
return(device_name);
return(name);
}
std::string AuraGPUController::GetDeviceLocation()
@@ -43,7 +43,7 @@ enum
class AuraGPUController
{
public:
AuraGPUController(i2c_smbus_interface* bus, aura_gpu_dev_id);
AuraGPUController(i2c_smbus_interface* bus, aura_gpu_dev_id, std::string dev_name);
~AuraGPUController();
std::string GetDeviceName();
@@ -62,7 +62,7 @@ public:
bool direct = false; // Temporary solution to check if we are in "Direct" mode
private:
char device_name[16];
i2c_smbus_interface * bus;
aura_gpu_dev_id dev;
std::string name;
};
@@ -56,9 +56,8 @@ void DetectAsusAuraGPUControllers(i2c_smbus_interface* bus, uint8_t i2c_addr, co
{
if(TestForAsusAuraGPUController(bus, i2c_addr))
{
AuraGPUController* controller = new AuraGPUController(bus, i2c_addr);
AuraGPUController* controller = new AuraGPUController(bus, i2c_addr, name);
RGBController_AuraGPU* rgb_controller = new RGBController_AuraGPU(controller);
rgb_controller->name = name;
ResourceManager::get()->RegisterRGBController(rgb_controller);
}
@@ -74,6 +73,7 @@ REGISTER_I2C_PCI_DETECTOR("ASUS ROG STRIX GeForce GTX 1050 Ti Gaming OC",
REGISTER_I2C_PCI_DETECTOR("ASUS ROG STRIX GeForce GTX 1050 Ti Gaming OC", DetectAsusAuraGPUControllers, NVIDIA_VEN, NVIDIA_GTX1050TI_DEV, ASUS_SUB_VEN, ASUS_ROG_STRIX_GTX1050TI_O4G_GAMING_2, 0x29);
REGISTER_I2C_PCI_DETECTOR("ASUS ROG STRIX GeForce GTX 1060 Gaming", DetectAsusAuraGPUControllers, NVIDIA_VEN, NVIDIA_GTX1060_DEV, ASUS_SUB_VEN, ASUS_ROG_STRIX_GTX1060_6G_GAMING, 0x29);
REGISTER_I2C_PCI_DETECTOR("ASUS ROG STRIX GeForce GTX 1060 Gaming", DetectAsusAuraGPUControllers, NVIDIA_VEN, NVIDIA_GTX1060_DEV, ASUS_SUB_VEN, ASUS_ROG_STRIX_GTX1060, 0x29);
REGISTER_I2C_PCI_DETECTOR("ASUS ROG STRIX GeForce GTX 1060 Gaming", DetectAsusAuraGPUControllers, NVIDIA_VEN, NVIDIA_GTX1060_DEV, ASUS_SUB_VEN, ASUS_ROG_STRIX_GTX1060_865B, 0x29);
REGISTER_I2C_PCI_DETECTOR("ASUS ROG STRIX GeForce GTX 1070 Gaming", DetectAsusAuraGPUControllers, NVIDIA_VEN, NVIDIA_GTX1070_DEV, ASUS_SUB_VEN, ASUS_ROG_STRIX_GTX1070_8G_GAMING, 0x29);
REGISTER_I2C_PCI_DETECTOR("ASUS ROG STRIX GeForce GTX 1070 Gaming OC", DetectAsusAuraGPUControllers, NVIDIA_VEN, NVIDIA_GTX1070_DEV, ASUS_SUB_VEN, ASUS_ROG_STRIX_GTX1070_O8G_GAMING, 0x29);
REGISTER_I2C_PCI_DETECTOR("ASUS ROG STRIX GeForce GTX 1070 OC", DetectAsusAuraGPUControllers, NVIDIA_VEN, NVIDIA_GTX1070_DEV, ASUS_SUB_VEN, ASUS_ROG_STRIX_GTX1070_OC, 0x29);
@@ -13,10 +13,11 @@
#include "AsusAuraHeadsetStandController.h"
#include "StringUtils.h"
AuraHeadsetStandController::AuraHeadsetStandController(hid_device* dev_handle, const char* path)
AuraHeadsetStandController::AuraHeadsetStandController(hid_device* dev_handle, const char* path, std::string dev_name)
{
dev = dev_handle;
location = path;
name = dev_name;
}
AuraHeadsetStandController::~AuraHeadsetStandController()
@@ -29,6 +30,11 @@ std::string AuraHeadsetStandController::GetDeviceLocation()
return("HID: " + location);
}
std::string AuraHeadsetStandController::GetName()
{
return(name);
}
std::string AuraHeadsetStandController::GetSerialString()
{
wchar_t serial_string[128];
@@ -33,31 +33,33 @@ enum
class AuraHeadsetStandController
{
public:
AuraHeadsetStandController(hid_device* dev_handle, const char* path);
AuraHeadsetStandController(hid_device* dev_handle, const char* path, std::string dev_name);
virtual ~AuraHeadsetStandController();
std::string GetDeviceLocation();
std::string GetName();
std::string GetSerialString();
std::string GetVersion();
void UpdateLeds
(
std::vector<RGBColor> colors
);
void UpdateLeds
(
std::vector<RGBColor> colors
);
void UpdateDevice
(
unsigned char mode,
unsigned char red,
unsigned char grn,
unsigned char blu,
unsigned char speed,
unsigned char brightness
);
void UpdateDevice
(
unsigned char mode,
unsigned char red,
unsigned char grn,
unsigned char blu,
unsigned char speed,
unsigned char brightness
);
void SaveMode();
void SaveMode();
private:
hid_device* dev;
std::string location;
hid_device* dev;
std::string location;
std::string name;
};
@@ -24,88 +24,88 @@
RGBController_AuraHeadsetStand::RGBController_AuraHeadsetStand(AuraHeadsetStandController* controller_ptr)
{
controller = controller_ptr;
controller = controller_ptr;
name = "ASUS Aura Headset Stand";
vendor = "ASUS";
type = DEVICE_TYPE_HEADSET_STAND;
description = "ASUS Aura Headset Stand Device";
version = controller->GetVersion();
location = controller->GetDeviceLocation();
serial = controller->GetSerialString();
name = controller->GetName();
vendor = "ASUS";
type = DEVICE_TYPE_HEADSET_STAND;
description = "ASUS Aura Headset Stand Device";
version = controller->GetVersion();
location = controller->GetDeviceLocation();
serial = controller->GetSerialString();
mode Direct;
Direct.name = "Direct";
Direct.value = AURA_HEADSET_STAND_MODE_DIRECT;
Direct.flags = MODE_FLAG_HAS_PER_LED_COLOR;
Direct.color_mode = MODE_COLORS_PER_LED;
Direct.name = "Direct";
Direct.value = AURA_HEADSET_STAND_MODE_DIRECT;
Direct.flags = MODE_FLAG_HAS_PER_LED_COLOR;
Direct.color_mode = MODE_COLORS_PER_LED;
modes.push_back(Direct);
mode Static;
Static.name = "Static";
Static.value = AURA_HEADSET_STAND_MODE_STATIC;
Static.flags = MODE_FLAG_HAS_MODE_SPECIFIC_COLOR | MODE_FLAG_HAS_BRIGHTNESS | MODE_FLAG_MANUAL_SAVE;
Static.brightness_min = AURA_HEADSETSTAND_BRIGHTNESS_MIN;
Static.brightness_max = AURA_HEADSETSTAND_BRIGHTNESS_MAX;
Static.brightness = AURA_HEADSETSTAND_BRIGHTNESS_DEFAULT;
Static.color_mode = MODE_COLORS_MODE_SPECIFIC;
Static.colors_min = 1;
Static.colors_max = 1;
Static.name = "Static";
Static.value = AURA_HEADSET_STAND_MODE_STATIC;
Static.flags = MODE_FLAG_HAS_MODE_SPECIFIC_COLOR | MODE_FLAG_HAS_BRIGHTNESS | MODE_FLAG_MANUAL_SAVE;
Static.brightness_min = AURA_HEADSETSTAND_BRIGHTNESS_MIN;
Static.brightness_max = AURA_HEADSETSTAND_BRIGHTNESS_MAX;
Static.brightness = AURA_HEADSETSTAND_BRIGHTNESS_DEFAULT;
Static.color_mode = MODE_COLORS_MODE_SPECIFIC;
Static.colors_min = 1;
Static.colors_max = 1;
Static.colors.resize(1);
modes.push_back(Static);
mode Breathing;
Breathing.name = "Breathing";
Breathing.value = AURA_HEADSET_STAND_MODE_BREATHING;
Breathing.flags = MODE_FLAG_HAS_SPEED | MODE_FLAG_HAS_MODE_SPECIFIC_COLOR | MODE_FLAG_HAS_BRIGHTNESS | MODE_FLAG_MANUAL_SAVE;
Breathing.color_mode = MODE_COLORS_MODE_SPECIFIC;
Breathing.speed_min = AURA_HEADSETSTAND_SPEED_MIN;
Breathing.speed_max = AURA_HEADSETSTAND_SPEED_MAX;
Breathing.speed = AURA_HEADSETSTAND_SPEED_DEFAULT;
Breathing.brightness_min = AURA_HEADSETSTAND_BRIGHTNESS_MIN;
Breathing.brightness_max = AURA_HEADSETSTAND_BRIGHTNESS_MAX;
Breathing.brightness = AURA_HEADSETSTAND_BRIGHTNESS_DEFAULT;
Breathing.colors_min = 1;
Breathing.colors_max = 1;
Breathing.name = "Breathing";
Breathing.value = AURA_HEADSET_STAND_MODE_BREATHING;
Breathing.flags = MODE_FLAG_HAS_SPEED | MODE_FLAG_HAS_MODE_SPECIFIC_COLOR | MODE_FLAG_HAS_BRIGHTNESS | MODE_FLAG_MANUAL_SAVE;
Breathing.color_mode = MODE_COLORS_MODE_SPECIFIC;
Breathing.speed_min = AURA_HEADSETSTAND_SPEED_MIN;
Breathing.speed_max = AURA_HEADSETSTAND_SPEED_MAX;
Breathing.speed = AURA_HEADSETSTAND_SPEED_DEFAULT;
Breathing.brightness_min = AURA_HEADSETSTAND_BRIGHTNESS_MIN;
Breathing.brightness_max = AURA_HEADSETSTAND_BRIGHTNESS_MAX;
Breathing.brightness = AURA_HEADSETSTAND_BRIGHTNESS_DEFAULT;
Breathing.colors_min = 1;
Breathing.colors_max = 1;
Breathing.colors.resize(1);
modes.push_back(Breathing);
mode Strobing;
Strobing.name = "Flashing";
Strobing.value = AURA_HEADSET_STAND_MODE_STROBING;
Strobing.flags = MODE_FLAG_HAS_MODE_SPECIFIC_COLOR | MODE_FLAG_HAS_BRIGHTNESS | MODE_FLAG_MANUAL_SAVE;
Strobing.brightness_min = AURA_HEADSETSTAND_BRIGHTNESS_MIN;
Strobing.brightness_max = AURA_HEADSETSTAND_BRIGHTNESS_MAX;
Strobing.brightness = AURA_HEADSETSTAND_BRIGHTNESS_DEFAULT;
Strobing.color_mode = MODE_COLORS_MODE_SPECIFIC;
Strobing.colors_min = 1;
Strobing.colors_max = 1;
Strobing.name = "Flashing";
Strobing.value = AURA_HEADSET_STAND_MODE_STROBING;
Strobing.flags = MODE_FLAG_HAS_MODE_SPECIFIC_COLOR | MODE_FLAG_HAS_BRIGHTNESS | MODE_FLAG_MANUAL_SAVE;
Strobing.brightness_min = AURA_HEADSETSTAND_BRIGHTNESS_MIN;
Strobing.brightness_max = AURA_HEADSETSTAND_BRIGHTNESS_MAX;
Strobing.brightness = AURA_HEADSETSTAND_BRIGHTNESS_DEFAULT;
Strobing.color_mode = MODE_COLORS_MODE_SPECIFIC;
Strobing.colors_min = 1;
Strobing.colors_max = 1;
Strobing.colors.resize(1);
modes.push_back(Strobing);
mode SpectrumCycle;
SpectrumCycle.name = "Spectrum Cycle";
SpectrumCycle.value = AURA_HEADSET_STAND_MODE_COLOR_CYCLE;
SpectrumCycle.flags = MODE_FLAG_HAS_SPEED | MODE_FLAG_HAS_BRIGHTNESS | MODE_FLAG_MANUAL_SAVE;
SpectrumCycle.speed_min = AURA_HEADSETSTAND_SPEED_MIN;
SpectrumCycle.speed_max = AURA_HEADSETSTAND_SPEED_MAX;
SpectrumCycle.speed = AURA_HEADSETSTAND_SPEED_DEFAULT;
SpectrumCycle.brightness_min = AURA_HEADSETSTAND_BRIGHTNESS_MIN;
SpectrumCycle.brightness_max = AURA_HEADSETSTAND_BRIGHTNESS_MAX;
SpectrumCycle.brightness = AURA_HEADSETSTAND_BRIGHTNESS_DEFAULT;
SpectrumCycle.color_mode = MODE_COLORS_NONE;
SpectrumCycle.name = "Spectrum Cycle";
SpectrumCycle.value = AURA_HEADSET_STAND_MODE_COLOR_CYCLE;
SpectrumCycle.flags = MODE_FLAG_HAS_SPEED | MODE_FLAG_HAS_BRIGHTNESS | MODE_FLAG_MANUAL_SAVE;
SpectrumCycle.speed_min = AURA_HEADSETSTAND_SPEED_MIN;
SpectrumCycle.speed_max = AURA_HEADSETSTAND_SPEED_MAX;
SpectrumCycle.speed = AURA_HEADSETSTAND_SPEED_DEFAULT;
SpectrumCycle.brightness_min = AURA_HEADSETSTAND_BRIGHTNESS_MIN;
SpectrumCycle.brightness_max = AURA_HEADSETSTAND_BRIGHTNESS_MAX;
SpectrumCycle.brightness = AURA_HEADSETSTAND_BRIGHTNESS_DEFAULT;
SpectrumCycle.color_mode = MODE_COLORS_NONE;
modes.push_back(SpectrumCycle);
mode Rainbow;
Rainbow.name = "Rainbow Wave";
Rainbow.value = AURA_HEADSET_STAND_MODE_RAINBOW;
Rainbow.flags = MODE_FLAG_HAS_SPEED | MODE_FLAG_HAS_BRIGHTNESS | MODE_FLAG_MANUAL_SAVE;
Rainbow.speed_min = AURA_HEADSETSTAND_SPEED_MIN;
Rainbow.speed_max = AURA_HEADSETSTAND_SPEED_MAX;
Rainbow.speed = AURA_HEADSETSTAND_SPEED_DEFAULT;
Rainbow.brightness_min = AURA_HEADSETSTAND_BRIGHTNESS_MIN;
Rainbow.brightness_max = AURA_HEADSETSTAND_BRIGHTNESS_MAX;
Rainbow.brightness = AURA_HEADSETSTAND_BRIGHTNESS_DEFAULT;
Rainbow.name = "Rainbow Wave";
Rainbow.value = AURA_HEADSET_STAND_MODE_RAINBOW;
Rainbow.flags = MODE_FLAG_HAS_SPEED | MODE_FLAG_HAS_BRIGHTNESS | MODE_FLAG_MANUAL_SAVE;
Rainbow.speed_min = AURA_HEADSETSTAND_SPEED_MIN;
Rainbow.speed_max = AURA_HEADSETSTAND_SPEED_MAX;
Rainbow.speed = AURA_HEADSETSTAND_SPEED_DEFAULT;
Rainbow.brightness_min = AURA_HEADSETSTAND_BRIGHTNESS_MIN;
Rainbow.brightness_max = AURA_HEADSETSTAND_BRIGHTNESS_MAX;
Rainbow.brightness = AURA_HEADSETSTAND_BRIGHTNESS_DEFAULT;
modes.push_back(Rainbow);
SetupZones();
}
@@ -13,10 +13,11 @@
#include "AsusAuraKeyboardController.h"
#include "StringUtils.h"
AuraKeyboardController::AuraKeyboardController(hid_device* dev_handle, const char* path)
AuraKeyboardController::AuraKeyboardController(hid_device* dev_handle, const char* path, std::string dev_name)
{
dev = dev_handle;
location = path;
name = dev_name;
}
AuraKeyboardController::~AuraKeyboardController()
@@ -29,6 +30,11 @@ std::string AuraKeyboardController::GetDeviceLocation()
return("HID: " + location);
}
std::string AuraKeyboardController::GetNameString()
{
return(name);
}
std::string AuraKeyboardController::GetSerialString()
{
wchar_t serial_string[128];
@@ -19,19 +19,21 @@
class AuraKeyboardController
{
public:
AuraKeyboardController(hid_device* dev_handle, const char* path);
AuraKeyboardController(hid_device* dev_handle, const char* path, std::string dev_name);
virtual ~AuraKeyboardController();
std::string GetDeviceLocation();
std::string GetNameString();
std::string GetSerialString();
void SendDirect
(
unsigned char frame_count,
unsigned char * frame_data
);
void SendDirect
(
unsigned char frame_count,
unsigned char * frame_data
);
private:
hid_device* dev;
std::string location;
hid_device* dev;
std::string location;
std::string name;
};
@@ -358,21 +358,21 @@ static const std::vector<aura_keyboard_led> default_65pct_led_names =
RGBController_AuraKeyboard::RGBController_AuraKeyboard(AuraKeyboardController* controller_ptr, AuraKeyboardMappingLayoutType keyboard_layout)
{
controller = controller_ptr;
layout = keyboard_layout;
controller = controller_ptr;
layout = keyboard_layout;
name = "ASUS Aura Keyboard";
vendor = "ASUS";
type = DEVICE_TYPE_KEYBOARD;
description = "ASUS Aura Keyboard Device";
location = controller->GetDeviceLocation();
serial = controller->GetSerialString();
name = controller->GetNameString();
vendor = "ASUS";
type = DEVICE_TYPE_KEYBOARD;
description = "ASUS Aura Keyboard Device";
location = controller->GetDeviceLocation();
serial = controller->GetSerialString();
mode Direct;
Direct.name = "Direct";
Direct.value = 0;
Direct.flags = MODE_FLAG_HAS_PER_LED_COLOR;
Direct.color_mode = MODE_COLORS_PER_LED;
Direct.name = "Direct";
Direct.value = 0;
Direct.flags = MODE_FLAG_HAS_PER_LED_COLOR;
Direct.color_mode = MODE_COLORS_PER_LED;
modes.push_back(Direct);
SetupZones();
@@ -14,11 +14,12 @@
#include "LogManager.h"
#include "StringUtils.h"
AuraMonitorController::AuraMonitorController(hid_device* dev_handle, const char* path, uint16_t pid)
AuraMonitorController::AuraMonitorController(hid_device* dev_handle, const char* path, uint16_t pid, std::string dev_name)
{
dev = dev_handle;
location = path;
device_pid = pid;
name = dev_name;
}
AuraMonitorController::~AuraMonitorController()
@@ -31,6 +32,11 @@ std::string AuraMonitorController::GetDeviceLocation()
return("HID: " + location);
}
std::string AuraMonitorController::GetNameString()
{
return(name);
}
std::string AuraMonitorController::GetSerialString()
{
wchar_t serial_string[128];
@@ -27,19 +27,21 @@ enum
class AuraMonitorController
{
public:
AuraMonitorController(hid_device* dev_handle, const char* path, uint16_t pid);
AuraMonitorController(hid_device* dev_handle, const char* path, uint16_t pid, std::string dev_name);
virtual ~AuraMonitorController();
std::string GetDeviceLocation();
std::string GetNameString();
std::string GetSerialString();
void BeginUpdate();
void UpdateLed(int led, unsigned char red, unsigned char green, unsigned char blue);
void ApplyChanges();
void BeginUpdate();
void UpdateLed(int led, unsigned char red, unsigned char green, unsigned char blue);
void ApplyChanges();
uint16_t device_pid;
uint16_t device_pid;
private:
hid_device* dev;
std::string location;
hid_device* dev;
std::string location;
std::string name;
};
@@ -24,20 +24,20 @@
RGBController_AuraMonitor::RGBController_AuraMonitor(AuraMonitorController* controller_ptr)
{
controller = controller_ptr;
controller = controller_ptr;
name = "ASUS Aura Monitor";
vendor = "ASUS";
type = DEVICE_TYPE_MONITOR;
description = "ASUS Aura Monitor Device";
location = controller->GetDeviceLocation();
serial = controller->GetSerialString();
name = controller->GetNameString();
vendor = "ASUS";
type = DEVICE_TYPE_MONITOR;
description = "ASUS Aura Monitor Device";
location = controller->GetDeviceLocation();
serial = controller->GetSerialString();
mode Direct;
Direct.name = "Direct";
Direct.value = 0;
Direct.flags = MODE_FLAG_HAS_PER_LED_COLOR;
Direct.color_mode = MODE_COLORS_PER_LED;
Direct.name = "Direct";
Direct.value = 0;
Direct.flags = MODE_FLAG_HAS_PER_LED_COLOR;
Direct.color_mode = MODE_COLORS_PER_LED;
modes.push_back(Direct);
SetupZones();
@@ -13,11 +13,14 @@
#include "AsusAuraMouseController.h"
#include "StringUtils.h"
AuraMouseController::AuraMouseController(hid_device* dev_handle, const char* path, uint16_t pid)
#define HID_MAX_STR 255
AuraMouseController::AuraMouseController(hid_device* dev_handle, const char* path, uint16_t pid, std::string dev_name)
{
dev = dev_handle;
location = path;
device_pid = pid;
name = dev_name;
}
AuraMouseController::~AuraMouseController()
@@ -30,30 +33,9 @@ std::string AuraMouseController::GetDeviceLocation()
return("HID: " + location);
}
std::string AuraMouseController::CleanSerial(const std::wstring& wstr)
std::string AuraMouseController::GetName()
{
/*---------------------------------------------------------------*\
| Cleans garbage at the end of serial numbers |
| (apparently 2 characters too much, but maybe variable) |
| Limited to new devices, old ones don't even have serial numbers |
\*---------------------------------------------------------------*/
std::string result;
for(wchar_t c : wstr)
{
/*-----------------------------------------------------*\
| Forbid anything besides digits and upper case letters |
\*-----------------------------------------------------*/
bool isUpperCaseLetter = (c >= 64 && c <= 90);
bool isDigit = (c >= 48 && c <= 57);
if(!isUpperCaseLetter && !isDigit)
{
break;
}
result += (char)c;
}
return(result);
return(name);
}
std::string AuraMouseController::GetSerialString()
@@ -123,6 +105,32 @@ std::string AuraMouseController::GetVersion(bool wireless, int protocol)
return str;
}
std::string AuraMouseController::CleanSerial(const std::wstring& wstr)
{
/*---------------------------------------------------------------*\
| Cleans garbage at the end of serial numbers |
| (apparently 2 characters too much, but maybe variable) |
| Limited to new devices, old ones don't even have serial numbers |
\*---------------------------------------------------------------*/
std::string result;
for(wchar_t c : wstr)
{
/*-----------------------------------------------------*\
| Forbid anything besides digits and upper case letters |
\*-----------------------------------------------------*/
bool isUpperCaseLetter = (c >= 64 && c <= 90);
bool isDigit = (c >= 48 && c <= 57);
if(!isUpperCaseLetter && !isDigit)
{
break;
}
result += (char)c;
}
return(result);
}
void AuraMouseController::SaveMode()
{
unsigned char usb_save_buf[ASUS_AURA_MOUSE_PACKET_SIZE] = { 0x00, 0x50, 0x03 };
@@ -17,40 +17,42 @@
#include "AsusAuraMouseDevices.h"
#define ASUS_AURA_MOUSE_PACKET_SIZE 65
#define HID_MAX_STR 255
class AuraMouseController
{
public:
AuraMouseController(hid_device* dev_handle, const char* path, uint16_t pid);
AuraMouseController(hid_device* dev_handle, const char* path, uint16_t pid, std::string dev_name);
virtual ~AuraMouseController();
std::string GetDeviceLocation();
std::string CleanSerial(const std::wstring& wstr);
std::string GetName();
std::string GetSerialString();
std::string GetVersion(bool wireless, int protocol);
void SaveMode();
void SendUpdate
(
unsigned char zone,
unsigned char mode,
unsigned char red,
unsigned char grn,
unsigned char blu,
unsigned char dir,
bool random,
unsigned char speed,
unsigned char brightness
);
void SendDirect
(
std::vector<RGBColor> zone_colors
);
std::string CleanSerial(const std::wstring& wstr);
uint16_t device_pid;
void SaveMode();
void SendUpdate
(
unsigned char zone,
unsigned char mode,
unsigned char red,
unsigned char grn,
unsigned char blu,
unsigned char dir,
bool random,
unsigned char speed,
unsigned char brightness
);
void SendDirect
(
std::vector<RGBColor> zone_colors
);
uint16_t device_pid;
private:
hid_device* dev;
std::string location;
hid_device* dev;
std::string location;
std::string name;
};
@@ -33,19 +33,19 @@ static std::string aura_mouse_zone_names[5]
RGBController_AuraMouse::RGBController_AuraMouse(AuraMouseController* controller_ptr)
{
controller = controller_ptr;
controller = controller_ptr;
pid = controller->device_pid;
pid = controller->device_pid;
name = "ASUS Aura Mouse";
vendor = "ASUS";
type = DEVICE_TYPE_MOUSE;
description = "ASUS Aura Mouse Device";
version = controller->GetVersion(aura_mouse_devices[pid].wireless, aura_mouse_devices[pid].version_protocol);
location = controller->GetDeviceLocation();
serial = controller->GetSerialString();
name = controller->GetName();
vendor = "ASUS";
type = DEVICE_TYPE_MOUSE;
description = "ASUS Aura Mouse Device";
version = controller->GetVersion(aura_mouse_devices[pid].wireless, aura_mouse_devices[pid].version_protocol);
location = controller->GetDeviceLocation();
serial = controller->GetSerialString();
std::vector<uint8_t> mm = aura_mouse_devices[pid].mouse_modes;
std::vector<uint8_t> mm = aura_mouse_devices[pid].mouse_modes;
if(aura_mouse_devices[pid].direct)
{
@@ -57,7 +57,7 @@ RGBController_AuraMouse::RGBController_AuraMouse(AuraMouseController* controller
modes.push_back(Direct);
}
int mode_value = 0;
int mode_value = 0;
for(std::vector<uint8_t>::iterator it = mm.begin(); it != mm.end(); it++)
{
@@ -15,11 +15,12 @@
#include "AsusAuraMouseGen1Controller.h"
#include "StringUtils.h"
AsusAuraMouseGen1Controller::AsusAuraMouseGen1Controller(hid_device* dev_handle, const char* path, uint16_t pid)
AsusAuraMouseGen1Controller::AsusAuraMouseGen1Controller(hid_device* dev_handle, const char* path, uint16_t pid, std::string dev_name)
{
dev = dev_handle;
location = path;
device_pid = pid;
name = dev_name;
}
AsusAuraMouseGen1Controller::~AsusAuraMouseGen1Controller()
@@ -32,6 +33,11 @@ std::string AsusAuraMouseGen1Controller::GetDeviceLocation()
return("HID: " + location);
}
std::string AsusAuraMouseGen1Controller::GetName()
{
return(name);
}
std::string AsusAuraMouseGen1Controller::GetSerialString()
{
wchar_t serial_string[HID_MAX_STR];
@@ -21,33 +21,37 @@
class AsusAuraMouseGen1Controller
{
public:
AsusAuraMouseGen1Controller(hid_device* dev_handle, const char* path, uint16_t pid);
AsusAuraMouseGen1Controller(hid_device* dev_handle, const char* path, uint16_t pid, std::string dev_name);
virtual ~AsusAuraMouseGen1Controller();
std::string GetDeviceLocation();
std::string GetName();
std::string GetSerialString();
std::string GetVersion();
int GetActiveProfile();
void SendUpdate
(
unsigned char key,
unsigned char value
);
int GetActiveProfile();
void UpdateProfile
(
unsigned char key,
unsigned char profile,
unsigned char value
);
void SendDirectSpatha(std::vector<RGBColor> colors);
void SendUpdate
(
unsigned char key,
unsigned char value
);
void ResetToSavedLighting();
void UpdateProfile
(
unsigned char key,
unsigned char profile,
unsigned char value
);
uint16_t device_pid;
void SendDirectSpatha(std::vector<RGBColor> colors);
void ResetToSavedLighting();
uint16_t device_pid;
private:
hid_device* dev;
std::string location;
hid_device* dev;
std::string location;
std::string name;
};
@@ -30,7 +30,7 @@ RGBController_AsusROGSpatha::RGBController_AsusROGSpatha(AsusAuraMouseGen1Contro
{
controller = controller_ptr;
name = "ASUS ROG Spatha";
name = controller->GetName();
vendor = "ASUS";
type = DEVICE_TYPE_MOUSE;
description = "ASUS Aura Mouse Device";
@@ -26,7 +26,7 @@ RGBController_AsusROGStrixEvolve::RGBController_AsusROGStrixEvolve(AsusAuraMouse
{
controller = controller_ptr;
name = "ASUS ROG Strix Evolve";
name = controller->GetName();
vendor = "ASUS";
type = DEVICE_TYPE_MOUSE;
description = "ASUS Aura Mouse Device";
@@ -13,10 +13,11 @@
#include "AsusAuraMousematController.h"
#include "StringUtils.h"
AuraMousematController::AuraMousematController(hid_device* dev_handle, const char* path)
AuraMousematController::AuraMousematController(hid_device* dev_handle, const char* path, std::string dev_name)
{
dev = dev_handle;
location = path;
name = dev_name;
}
AuraMousematController::~AuraMousematController()
@@ -29,6 +30,11 @@ std::string AuraMousematController::GetDeviceLocation()
return("HID: " + location);
}
std::string AuraMousematController::GetName()
{
return(name);
}
std::string AuraMousematController::GetSerialString()
{
wchar_t serial_string[128];
@@ -31,30 +31,32 @@ enum
class AuraMousematController
{
public:
AuraMousematController(hid_device* dev_handle, const char* path);
AuraMousematController(hid_device* dev_handle, const char* path, std::string dev_name);
virtual ~AuraMousematController();
std::string GetDeviceLocation();
std::string GetName();
std::string GetSerialString();
std::string GetVersion();
void UpdateLeds
(
std::vector<RGBColor> colors
);
void UpdateLeds
(
std::vector<RGBColor> colors
);
void UpdateDevice
(
unsigned char mode,
std::vector<RGBColor> colors,
unsigned char speed,
unsigned char brightness,
unsigned char pattern
);
void UpdateDevice
(
unsigned char mode,
std::vector<RGBColor> colors,
unsigned char speed,
unsigned char brightness,
unsigned char pattern
);
void SaveMode();
void SaveMode();
private:
hid_device* dev;
std::string location;
hid_device* dev;
std::string location;
std::string name;
};
@@ -26,7 +26,7 @@ RGBController_AuraMousemat::RGBController_AuraMousemat(AuraMousematController* c
{
controller = controller_ptr;
name = "ASUS Aura Mousemat";
name = controller->GetName();
vendor = "ASUS";
type = DEVICE_TYPE_MOUSEMAT;
description = "ASUS Aura Mousemat Device";
@@ -12,7 +12,7 @@
#include "AsusAuraRyuoAIOController.h"
AsusAuraRyuoAIOController::AsusAuraRyuoAIOController(hid_device* dev_handle, const char* path) : AuraUSBController(dev_handle, path)
AsusAuraRyuoAIOController::AsusAuraRyuoAIOController(hid_device* dev_handle, const char* path, std::string dev_name) : AuraUSBController(dev_handle, path, dev_name)
{
/*-----------------------------------------------------*\
| Add addressable devices |
@@ -60,7 +60,7 @@ public:
SPEED_FASTEST = 0x00, // Fastest speed
};
AsusAuraRyuoAIOController(hid_device* dev_handle, const char* path);
AsusAuraRyuoAIOController(hid_device* dev_handle, const char* path, std::string dev_name);
~AsusAuraRyuoAIOController();
std::string GetLocation();
@@ -29,7 +29,7 @@ RGBController_AsusAuraRyuoAIO::RGBController_AsusAuraRyuoAIO(AsusAuraRyuoAIOCont
controller = controller_ptr;
uint8_t speed = controller->SPEED_NORMAL;
name = "ROG Ryuo AIO";
name = controller->GetDeviceName();
vendor = "ASUS";
type = DEVICE_TYPE_COOLER;
description = "ASUS Liquid Cooler with 120mm and 240mm radiators.";
@@ -19,10 +19,13 @@
#include "AsusAuraTUFKeyboardController.h"
#include "StringUtils.h"
AuraTUFKeyboardController::AuraTUFKeyboardController(hid_device* dev_handle, const char* path, uint16_t pid, unsigned short version)
#define HID_MAX_STR 128
AuraTUFKeyboardController::AuraTUFKeyboardController(hid_device* dev_handle, const char* path, uint16_t pid, unsigned short version, std::string dev_name)
{
dev = dev_handle;
location = path;
name = dev_name;
device_pid = pid;
rev_version = version;
@@ -39,6 +42,11 @@ std::string AuraTUFKeyboardController::GetDeviceLocation()
return("HID: " + location);
}
std::string AuraTUFKeyboardController::GetName()
{
return(name);
}
std::string AuraTUFKeyboardController::GetSerialString()
{
wchar_t serial_string[HID_MAX_STR];
@@ -17,8 +17,6 @@
#include "RGBController.h"
#include "AsusAuraTUFKeyboardLayouts.h"
#define HID_MAX_STR 128
enum
{
AURA_KEYBOARD_MODE_STATIC = 0,
@@ -69,77 +67,81 @@ struct led_color
class AuraTUFKeyboardController
{
public:
AuraTUFKeyboardController(hid_device* dev_handle, const char* path, uint16_t pid, unsigned short version);
AuraTUFKeyboardController(hid_device* dev_handle, const char* path, uint16_t pid, unsigned short version, std::string dev_name);
~AuraTUFKeyboardController();
std::string GetDeviceLocation();
std::string GetName();
std::string GetSerialString();
std::string GetVersion();
int GetLayout();
int GetNumpadLocation();
void SaveMode();
void AllowRemoteControl(unsigned char type);
void UpdateSingleLed
(
int led,
unsigned char red,
unsigned char green,
unsigned char blue
);
void UpdateSingleLed
(
int led,
unsigned char red,
unsigned char green,
unsigned char blue
);
void UpdateLeds
(
std::vector<led_color> colors
);
void UpdateLeds
(
std::vector<led_color> colors
);
void UpdateK1Wave
(
std::vector<RGBColor> colors,
unsigned char direction,
unsigned char speed,
unsigned char brightness
);
void UpdateK1Wave
(
std::vector<RGBColor> colors,
unsigned char direction,
unsigned char speed,
unsigned char brightness
);
void UpdateScopeIIRainbowRipple
(
unsigned char mode,
std::vector<RGBColor> colors,
unsigned char direction,
unsigned char color_mode,
unsigned char speed,
unsigned char brightness
);
void UpdateScopeIIRainbowRipple
(
unsigned char mode,
std::vector<RGBColor> colors,
unsigned char direction,
unsigned char color_mode,
unsigned char speed,
unsigned char brightness
);
void UpdateScopeIIQuicksand
(
std::vector<RGBColor> colors,
unsigned char direction,
unsigned char color_mode,
unsigned char speed,
unsigned char brightness
);
void UpdateScopeIIQuicksand
(
std::vector<RGBColor> colors,
unsigned char direction,
unsigned char color_mode,
unsigned char speed,
unsigned char brightness
);
void UpdateDevice
(
unsigned char mode,
std::vector<RGBColor> colors,
unsigned char direction,
unsigned char color_mode,
unsigned char speed,
unsigned char brightness
);
void UpdateQuicksandColors(std::vector<RGBColor> colors);
void UpdateMode(unsigned char mode);
void AwaitResponse(int ms);
void ClearResponses();
void UpdateDevice
(
unsigned char mode,
std::vector<RGBColor> colors,
unsigned char direction,
unsigned char color_mode,
unsigned char speed,
unsigned char brightness
);
uint16_t device_pid;
bool is_per_led_keyboard;
void UpdateQuicksandColors(std::vector<RGBColor> colors);
void UpdateMode(unsigned char mode);
void AwaitResponse(int ms);
void ClearResponses();
uint16_t device_pid;
bool is_per_led_keyboard;
private:
hid_device* dev;
std::string location;
unsigned short rev_version;
hid_device* dev;
std::string location;
std::string name;
unsigned short rev_version;
};
@@ -26,19 +26,19 @@
RGBController_AuraTUFKeyboard::RGBController_AuraTUFKeyboard(AuraTUFKeyboardController* controller_ptr)
{
controller = controller_ptr;
controller = controller_ptr;
pid = controller->device_pid;
pid = controller->device_pid;
if(pid != AURA_ROG_CLAYMORE_PID)
{
name = "ASUS Aura Keyboard";
vendor = "ASUS";
type = DEVICE_TYPE_KEYBOARD;
description = "ASUS Aura Keyboard Device";
version = controller->GetVersion();
location = controller->GetDeviceLocation();
serial = controller->GetSerialString();
name = controller->GetName();
vendor = "ASUS";
type = DEVICE_TYPE_KEYBOARD;
description = "ASUS Aura Keyboard Device";
version = controller->GetVersion();
location = controller->GetDeviceLocation();
serial = controller->GetSerialString();
unsigned char AURA_KEYBOARD_SPEED_MIN = 0;
unsigned char AURA_KEYBOARD_SPEED_MAX = 0;
@@ -51,6 +51,7 @@ RGBController_AuraTUFKeyboard::RGBController_AuraTUFKeyboard(AuraTUFKeyboardCont
AURA_KEYBOARD_SPEED_MAX = 2;
AURA_KEYBOARD_SPEED_DEFAULT = 1;
break;
case AURA_ROG_STRIX_FLARE_PID:
case AURA_ROG_STRIX_FLARE_PNK_LTD_PID:
case AURA_ROG_STRIX_FLARE_COD_BO4_PID:
@@ -60,6 +61,7 @@ RGBController_AuraTUFKeyboard::RGBController_AuraTUFKeyboard(AuraTUFKeyboardCont
AURA_KEYBOARD_SPEED_MAX = 0;
AURA_KEYBOARD_SPEED_DEFAULT = 8;
break;
case AURA_ROG_AZOTH_USB_PID:
case AURA_ROG_AZOTH_2_4_PID:
case AURA_ROG_FALCHION_WIRED_PID:
@@ -79,77 +81,83 @@ RGBController_AuraTUFKeyboard::RGBController_AuraTUFKeyboard(AuraTUFKeyboardCont
AURA_KEYBOARD_SPEED_MAX = 0;
AURA_KEYBOARD_SPEED_DEFAULT = 30;
break;
default:
AURA_KEYBOARD_SPEED_MIN = 15;
AURA_KEYBOARD_SPEED_MAX = 0;
AURA_KEYBOARD_SPEED_DEFAULT = 8;
break;
}
mode Direct;
Direct.name = "Direct";
Direct.value = AURA_KEYBOARD_MODE_DIRECT;
Direct.flags = MODE_FLAG_HAS_PER_LED_COLOR;
Direct.color_mode = MODE_COLORS_PER_LED;
Direct.name = "Direct";
Direct.value = AURA_KEYBOARD_MODE_DIRECT;
Direct.flags = MODE_FLAG_HAS_PER_LED_COLOR;
Direct.color_mode = MODE_COLORS_PER_LED;
modes.push_back(Direct);
mode Static;
Static.name = "Static";
Static.value = AURA_KEYBOARD_MODE_STATIC;
Static.flags = MODE_FLAG_HAS_MODE_SPECIFIC_COLOR | MODE_FLAG_MANUAL_SAVE | MODE_FLAG_HAS_BRIGHTNESS;
Static.brightness_min = AURA_KEYBOARD_BRIGHTNESS_MIN;
Static.brightness_max = AURA_KEYBOARD_BRIGHTNESS_MAX;
Static.brightness = AURA_KEYBOARD_BRIGHTNESS_DEFAULT;
Static.color_mode = MODE_COLORS_MODE_SPECIFIC;
Static.colors_min = 1;
Static.colors_max = 1;
Static.name = "Static";
Static.value = AURA_KEYBOARD_MODE_STATIC;
Static.flags = MODE_FLAG_HAS_MODE_SPECIFIC_COLOR | MODE_FLAG_MANUAL_SAVE | MODE_FLAG_HAS_BRIGHTNESS;
Static.brightness_min = AURA_KEYBOARD_BRIGHTNESS_MIN;
Static.brightness_max = AURA_KEYBOARD_BRIGHTNESS_MAX;
Static.brightness = AURA_KEYBOARD_BRIGHTNESS_DEFAULT;
Static.color_mode = MODE_COLORS_MODE_SPECIFIC;
Static.colors_min = 1;
Static.colors_max = 1;
Static.colors.resize(1);
modes.push_back(Static);
mode Breathing;
Breathing.name = "Breathing";
Breathing.value = AURA_KEYBOARD_MODE_BREATHING;
Breathing.flags = MODE_FLAG_HAS_MODE_SPECIFIC_COLOR | MODE_FLAG_HAS_SPEED | MODE_FLAG_MANUAL_SAVE | MODE_FLAG_HAS_BRIGHTNESS;
if(controller->is_per_led_keyboard) Breathing.flags |= MODE_FLAG_HAS_RANDOM_COLOR;
Breathing.speed_min = AURA_KEYBOARD_SPEED_MIN;
Breathing.speed_max = AURA_KEYBOARD_SPEED_MAX;
Breathing.speed = AURA_KEYBOARD_SPEED_DEFAULT;
Breathing.brightness_min = AURA_KEYBOARD_BRIGHTNESS_MIN;
Breathing.brightness_max = AURA_KEYBOARD_BRIGHTNESS_MAX;
Breathing.brightness = AURA_KEYBOARD_BRIGHTNESS_DEFAULT;
Breathing.color_mode = MODE_COLORS_MODE_SPECIFIC;
Breathing.colors_min = 1;
Breathing.colors_max = 2;
Breathing.name = "Breathing";
Breathing.value = AURA_KEYBOARD_MODE_BREATHING;
Breathing.flags = MODE_FLAG_HAS_MODE_SPECIFIC_COLOR | MODE_FLAG_HAS_SPEED | MODE_FLAG_MANUAL_SAVE | MODE_FLAG_HAS_BRIGHTNESS;
if(controller->is_per_led_keyboard)
{
Breathing.flags |= MODE_FLAG_HAS_RANDOM_COLOR;
}
Breathing.speed_min = AURA_KEYBOARD_SPEED_MIN;
Breathing.speed_max = AURA_KEYBOARD_SPEED_MAX;
Breathing.speed = AURA_KEYBOARD_SPEED_DEFAULT;
Breathing.brightness_min = AURA_KEYBOARD_BRIGHTNESS_MIN;
Breathing.brightness_max = AURA_KEYBOARD_BRIGHTNESS_MAX;
Breathing.brightness = AURA_KEYBOARD_BRIGHTNESS_DEFAULT;
Breathing.color_mode = MODE_COLORS_MODE_SPECIFIC;
Breathing.colors_min = 1;
Breathing.colors_max = 2;
Breathing.colors.resize(1);
modes.push_back(Breathing);
mode Color_Cycle;
Color_Cycle.name = "Spectrum Cycle";
Color_Cycle.value = AURA_KEYBOARD_MODE_COLOR_CYCLE;
Color_Cycle.flags = MODE_FLAG_HAS_SPEED | MODE_FLAG_MANUAL_SAVE | MODE_FLAG_HAS_BRIGHTNESS;
Color_Cycle.speed_min = AURA_KEYBOARD_SPEED_MIN;
Color_Cycle.speed_max = AURA_KEYBOARD_SPEED_MAX;
Color_Cycle.speed = AURA_KEYBOARD_SPEED_DEFAULT;
Color_Cycle.brightness_min = AURA_KEYBOARD_BRIGHTNESS_MIN;
Color_Cycle.brightness_max = AURA_KEYBOARD_BRIGHTNESS_MAX;
Color_Cycle.brightness = AURA_KEYBOARD_BRIGHTNESS_DEFAULT;
Color_Cycle.color_mode = MODE_COLORS_NONE;
Color_Cycle.name = "Spectrum Cycle";
Color_Cycle.value = AURA_KEYBOARD_MODE_COLOR_CYCLE;
Color_Cycle.flags = MODE_FLAG_HAS_SPEED | MODE_FLAG_MANUAL_SAVE | MODE_FLAG_HAS_BRIGHTNESS;
Color_Cycle.speed_min = AURA_KEYBOARD_SPEED_MIN;
Color_Cycle.speed_max = AURA_KEYBOARD_SPEED_MAX;
Color_Cycle.speed = AURA_KEYBOARD_SPEED_DEFAULT;
Color_Cycle.brightness_min = AURA_KEYBOARD_BRIGHTNESS_MIN;
Color_Cycle.brightness_max = AURA_KEYBOARD_BRIGHTNESS_MAX;
Color_Cycle.brightness = AURA_KEYBOARD_BRIGHTNESS_DEFAULT;
Color_Cycle.color_mode = MODE_COLORS_NONE;
modes.push_back(Color_Cycle);
mode Wave;
Wave.name = "Rainbow Wave";
Wave.value = AURA_KEYBOARD_MODE_WAVE;
Wave.flags = MODE_FLAG_HAS_MODE_SPECIFIC_COLOR | MODE_FLAG_HAS_SPEED | MODE_FLAG_HAS_DIRECTION_LR | MODE_FLAG_HAS_DIRECTION_HV | MODE_FLAG_MANUAL_SAVE | MODE_FLAG_HAS_BRIGHTNESS;
if(controller->is_per_led_keyboard) Wave.flags |= MODE_FLAG_HAS_DIRECTION_UD;
Wave.speed_min = AURA_KEYBOARD_SPEED_MIN;
Wave.speed_max = AURA_KEYBOARD_SPEED_MAX;
Wave.speed = AURA_KEYBOARD_SPEED_DEFAULT;
Wave.brightness_min = AURA_KEYBOARD_BRIGHTNESS_MIN;
Wave.brightness_max = AURA_KEYBOARD_BRIGHTNESS_MAX;
Wave.brightness = AURA_KEYBOARD_BRIGHTNESS_DEFAULT;
Wave.direction = MODE_DIRECTION_LEFT;
Wave.color_mode = MODE_COLORS_MODE_SPECIFIC;
Wave.name = "Rainbow Wave";
Wave.value = AURA_KEYBOARD_MODE_WAVE;
Wave.flags = MODE_FLAG_HAS_MODE_SPECIFIC_COLOR | MODE_FLAG_HAS_SPEED | MODE_FLAG_HAS_DIRECTION_LR | MODE_FLAG_HAS_DIRECTION_HV | MODE_FLAG_MANUAL_SAVE | MODE_FLAG_HAS_BRIGHTNESS;
if(controller->is_per_led_keyboard)
{
Wave.flags |= MODE_FLAG_HAS_DIRECTION_UD;
}
Wave.speed_min = AURA_KEYBOARD_SPEED_MIN;
Wave.speed_max = AURA_KEYBOARD_SPEED_MAX;
Wave.speed = AURA_KEYBOARD_SPEED_DEFAULT;
Wave.brightness_min = AURA_KEYBOARD_BRIGHTNESS_MIN;
Wave.brightness_max = AURA_KEYBOARD_BRIGHTNESS_MAX;
Wave.brightness = AURA_KEYBOARD_BRIGHTNESS_DEFAULT;
Wave.direction = MODE_DIRECTION_LEFT;
Wave.color_mode = MODE_COLORS_MODE_SPECIFIC;
if(!controller->is_per_led_keyboard)
{
@@ -268,129 +276,129 @@ RGBController_AuraTUFKeyboard::RGBController_AuraTUFKeyboard(AuraTUFKeyboardCont
else
{
name = "ASUS ROG Claymore";
vendor = "ASUS";
type = DEVICE_TYPE_KEYBOARD;
description = "ASUS Aura Keyboard Device";
version = controller->GetVersion();
location = controller->GetDeviceLocation();
serial = controller->GetSerialString();
name = controller->GetName();
vendor = "ASUS";
type = DEVICE_TYPE_KEYBOARD;
description = "ASUS Aura Keyboard Device";
version = controller->GetVersion();
location = controller->GetDeviceLocation();
serial = controller->GetSerialString();
mode Direct;
Direct.name = "Direct";
Direct.value = AURA_KEYBOARD_MODE_DIRECT;
Direct.flags = MODE_FLAG_HAS_PER_LED_COLOR;
Direct.color_mode = MODE_COLORS_PER_LED;
Direct.name = "Direct";
Direct.value = AURA_KEYBOARD_MODE_DIRECT;
Direct.flags = MODE_FLAG_HAS_PER_LED_COLOR;
Direct.color_mode = MODE_COLORS_PER_LED;
modes.push_back(Direct);
mode Static;
Static.name = "Static";
Static.value = AURA_KEYBOARD_MODE_STATIC;
Static.flags = MODE_FLAG_HAS_MODE_SPECIFIC_COLOR | MODE_FLAG_AUTOMATIC_SAVE;
Static.color_mode = MODE_COLORS_MODE_SPECIFIC;
Static.colors_min = 1;
Static.colors_max = 1;
Static.name = "Static";
Static.value = AURA_KEYBOARD_MODE_STATIC;
Static.flags = MODE_FLAG_HAS_MODE_SPECIFIC_COLOR | MODE_FLAG_AUTOMATIC_SAVE;
Static.color_mode = MODE_COLORS_MODE_SPECIFIC;
Static.colors_min = 1;
Static.colors_max = 1;
Static.colors.resize(1);
modes.push_back(Static);
mode Breathing;
Breathing.name = "Breathing";
Breathing.value = AURA_KEYBOARD_MODE_BREATHING;
Breathing.flags = MODE_FLAG_HAS_MODE_SPECIFIC_COLOR | MODE_FLAG_HAS_SPEED | MODE_FLAG_AUTOMATIC_SAVE;
Breathing.speed_min = AURA_CLAYMORE_SPEED_MIN;
Breathing.speed_max = AURA_CLAYMORE_SPEED_MAX;
Breathing.speed = AURA_CLAYMORE_SPEED_DEFAULT_BREATHING;
Breathing.color_mode = MODE_COLORS_MODE_SPECIFIC;
Breathing.colors_min = 1;
Breathing.colors_max = 2;
Breathing.name = "Breathing";
Breathing.value = AURA_KEYBOARD_MODE_BREATHING;
Breathing.flags = MODE_FLAG_HAS_MODE_SPECIFIC_COLOR | MODE_FLAG_HAS_SPEED | MODE_FLAG_AUTOMATIC_SAVE;
Breathing.speed_min = AURA_CLAYMORE_SPEED_MIN;
Breathing.speed_max = AURA_CLAYMORE_SPEED_MAX;
Breathing.speed = AURA_CLAYMORE_SPEED_DEFAULT_BREATHING;
Breathing.color_mode = MODE_COLORS_MODE_SPECIFIC;
Breathing.colors_min = 1;
Breathing.colors_max = 2;
Breathing.colors.resize(2);
modes.push_back(Breathing);
mode Color_Cycle;
Color_Cycle.name = "Spectrum Cycle";
Color_Cycle.value = AURA_KEYBOARD_MODE_COLOR_CYCLE;
Color_Cycle.flags = MODE_FLAG_HAS_SPEED | MODE_FLAG_AUTOMATIC_SAVE;
Color_Cycle.speed_min = AURA_CLAYMORE_SPEED_MIN;
Color_Cycle.speed_max = AURA_CLAYMORE_SPEED_MAX;
Color_Cycle.speed = AURA_CLAYMORE_SPEED_DEFAULT_COLOR_CYCLE;
Color_Cycle.color_mode = MODE_COLORS_NONE;
Color_Cycle.name = "Spectrum Cycle";
Color_Cycle.value = AURA_KEYBOARD_MODE_COLOR_CYCLE;
Color_Cycle.flags = MODE_FLAG_HAS_SPEED | MODE_FLAG_AUTOMATIC_SAVE;
Color_Cycle.speed_min = AURA_CLAYMORE_SPEED_MIN;
Color_Cycle.speed_max = AURA_CLAYMORE_SPEED_MAX;
Color_Cycle.speed = AURA_CLAYMORE_SPEED_DEFAULT_COLOR_CYCLE;
Color_Cycle.color_mode = MODE_COLORS_NONE;
modes.push_back(Color_Cycle);
mode Reactive;
Reactive.name = "Reactive";
Reactive.value = AURA_KEYBOARD_MODE_REACTIVE;
Reactive.flags = MODE_FLAG_HAS_MODE_SPECIFIC_COLOR | MODE_FLAG_HAS_RANDOM_COLOR | MODE_FLAG_HAS_SPEED | MODE_FLAG_AUTOMATIC_SAVE;
Reactive.speed_min = AURA_CLAYMORE_SPEED_MIN;
Reactive.speed_max = AURA_CLAYMORE_SPEED_MAX;
Reactive.speed = AURA_CLAYMORE_SPEED_DEFAULT_REACTIVE;
Reactive.color_mode = MODE_COLORS_MODE_SPECIFIC;
Reactive.colors_min = 1;
Reactive.colors_max = 2;
Reactive.name = "Reactive";
Reactive.value = AURA_KEYBOARD_MODE_REACTIVE;
Reactive.flags = MODE_FLAG_HAS_MODE_SPECIFIC_COLOR | MODE_FLAG_HAS_RANDOM_COLOR | MODE_FLAG_HAS_SPEED | MODE_FLAG_AUTOMATIC_SAVE;
Reactive.speed_min = AURA_CLAYMORE_SPEED_MIN;
Reactive.speed_max = AURA_CLAYMORE_SPEED_MAX;
Reactive.speed = AURA_CLAYMORE_SPEED_DEFAULT_REACTIVE;
Reactive.color_mode = MODE_COLORS_MODE_SPECIFIC;
Reactive.colors_min = 1;
Reactive.colors_max = 2;
Reactive.colors.resize(2);
modes.push_back(Reactive);
mode Wave;
Wave.name = "Rainbow Wave";
Wave.value = AURA_KEYBOARD_MODE_WAVE;
Wave.flags = MODE_COLORS_NONE | MODE_FLAG_HAS_SPEED | MODE_FLAG_HAS_DIRECTION_LR | MODE_FLAG_HAS_DIRECTION_UD | MODE_FLAG_AUTOMATIC_SAVE;
Wave.speed_min = AURA_CLAYMORE_SPEED_MIN;
Wave.speed_max = AURA_CLAYMORE_SPEED_MAX;
Wave.speed = AURA_CLAYMORE_SPEED_DEFAULT_WAVE;
Wave.direction = MODE_DIRECTION_LEFT;
Wave.color_mode = MODE_COLORS_NONE;
Wave.name = "Rainbow Wave";
Wave.value = AURA_KEYBOARD_MODE_WAVE;
Wave.flags = MODE_COLORS_NONE | MODE_FLAG_HAS_SPEED | MODE_FLAG_HAS_DIRECTION_LR | MODE_FLAG_HAS_DIRECTION_UD | MODE_FLAG_AUTOMATIC_SAVE;
Wave.speed_min = AURA_CLAYMORE_SPEED_MIN;
Wave.speed_max = AURA_CLAYMORE_SPEED_MAX;
Wave.speed = AURA_CLAYMORE_SPEED_DEFAULT_WAVE;
Wave.direction = MODE_DIRECTION_LEFT;
Wave.color_mode = MODE_COLORS_NONE;
modes.push_back(Wave);
mode Color_Wave;
Color_Wave.name = "Color Wave";
Color_Wave.value = AURA_KEYBOARD_MODE_WAVE;
Color_Wave.flags = MODE_FLAG_HAS_MODE_SPECIFIC_COLOR | MODE_FLAG_HAS_SPEED | MODE_FLAG_HAS_DIRECTION_LR | MODE_FLAG_HAS_DIRECTION_UD | MODE_FLAG_AUTOMATIC_SAVE;
Color_Wave.speed_min = AURA_CLAYMORE_SPEED_MIN;
Color_Wave.speed_max = AURA_CLAYMORE_SPEED_MAX;
Color_Wave.speed = AURA_CLAYMORE_SPEED_DEFAULT_WAVE;
Color_Wave.direction = MODE_DIRECTION_LEFT;
Color_Wave.color_mode = MODE_COLORS_MODE_SPECIFIC;
Color_Wave.colors_min = 1;
Color_Wave.colors_max = 2;
Color_Wave.name = "Color Wave";
Color_Wave.value = AURA_KEYBOARD_MODE_WAVE;
Color_Wave.flags = MODE_FLAG_HAS_MODE_SPECIFIC_COLOR | MODE_FLAG_HAS_SPEED | MODE_FLAG_HAS_DIRECTION_LR | MODE_FLAG_HAS_DIRECTION_UD | MODE_FLAG_AUTOMATIC_SAVE;
Color_Wave.speed_min = AURA_CLAYMORE_SPEED_MIN;
Color_Wave.speed_max = AURA_CLAYMORE_SPEED_MAX;
Color_Wave.speed = AURA_CLAYMORE_SPEED_DEFAULT_WAVE;
Color_Wave.direction = MODE_DIRECTION_LEFT;
Color_Wave.color_mode = MODE_COLORS_MODE_SPECIFIC;
Color_Wave.colors_min = 1;
Color_Wave.colors_max = 2;
Color_Wave.colors.resize(2);
modes.push_back(Color_Wave);
mode Ripple;
Ripple.name = "Ripple";
Ripple.value = AURA_KEYBOARD_MODE_RIPPLE;
Ripple.flags = MODE_FLAG_HAS_MODE_SPECIFIC_COLOR | MODE_FLAG_HAS_RANDOM_COLOR | MODE_FLAG_HAS_SPEED | MODE_FLAG_AUTOMATIC_SAVE;
Ripple.speed_min = AURA_CLAYMORE_SPEED_MIN;
Ripple.speed_max = AURA_CLAYMORE_SPEED_MAX;
Ripple.speed = AURA_CLAYMORE_SPEED_DEFAULT_RIPPLE;
Ripple.color_mode = MODE_COLORS_MODE_SPECIFIC;
Ripple.colors_min = 1;
Ripple.colors_max = 2;
Ripple.name = "Ripple";
Ripple.value = AURA_KEYBOARD_MODE_RIPPLE;
Ripple.flags = MODE_FLAG_HAS_MODE_SPECIFIC_COLOR | MODE_FLAG_HAS_RANDOM_COLOR | MODE_FLAG_HAS_SPEED | MODE_FLAG_AUTOMATIC_SAVE;
Ripple.speed_min = AURA_CLAYMORE_SPEED_MIN;
Ripple.speed_max = AURA_CLAYMORE_SPEED_MAX;
Ripple.speed = AURA_CLAYMORE_SPEED_DEFAULT_RIPPLE;
Ripple.color_mode = MODE_COLORS_MODE_SPECIFIC;
Ripple.colors_min = 1;
Ripple.colors_max = 2;
Ripple.colors.resize(2);
modes.push_back(Ripple);
mode Starry_Night;
Starry_Night.name = "Starry Night";
Starry_Night.value = AURA_KEYBOARD_MODE_STARRY_NIGHT;
Starry_Night.flags = MODE_FLAG_HAS_MODE_SPECIFIC_COLOR | MODE_FLAG_HAS_RANDOM_COLOR | MODE_FLAG_HAS_SPEED | MODE_FLAG_AUTOMATIC_SAVE;
Starry_Night.speed_min = AURA_CLAYMORE_SPEED_MIN;
Starry_Night.speed_max = AURA_CLAYMORE_SPEED_MAX;
Starry_Night.speed = AURA_CLAYMORE_SPEED_DEFAULT_STARRY_NIGHT;
Starry_Night.color_mode = MODE_COLORS_MODE_SPECIFIC;
Starry_Night.colors_min = 1;
Starry_Night.colors_max = 2;
Starry_Night.name = "Starry Night";
Starry_Night.value = AURA_KEYBOARD_MODE_STARRY_NIGHT;
Starry_Night.flags = MODE_FLAG_HAS_MODE_SPECIFIC_COLOR | MODE_FLAG_HAS_RANDOM_COLOR | MODE_FLAG_HAS_SPEED | MODE_FLAG_AUTOMATIC_SAVE;
Starry_Night.speed_min = AURA_CLAYMORE_SPEED_MIN;
Starry_Night.speed_max = AURA_CLAYMORE_SPEED_MAX;
Starry_Night.speed = AURA_CLAYMORE_SPEED_DEFAULT_STARRY_NIGHT;
Starry_Night.color_mode = MODE_COLORS_MODE_SPECIFIC;
Starry_Night.colors_min = 1;
Starry_Night.colors_max = 2;
Starry_Night.colors.resize(2);
modes.push_back(Starry_Night);
mode Quicksand;
Quicksand.name = "Quicksand";
Quicksand.value = AURA_KEYBOARD_MODE_QUICKSAND;
Quicksand.flags = MODE_FLAG_HAS_MODE_SPECIFIC_COLOR | MODE_FLAG_HAS_RANDOM_COLOR | MODE_FLAG_HAS_SPEED | MODE_FLAG_AUTOMATIC_SAVE;
Quicksand.direction = MODE_DIRECTION_DOWN;
Quicksand.speed_min = AURA_CLAYMORE_SPEED_MIN;
Quicksand.speed_max = AURA_CLAYMORE_SPEED_MAX;
Quicksand.speed = AURA_CLAYMORE_SPEED_DEFAULT_QUICKSAND;
Quicksand.color_mode = MODE_COLORS_MODE_SPECIFIC;
Quicksand.colors_min = 6;
Quicksand.colors_max = 6;
Quicksand.name = "Quicksand";
Quicksand.value = AURA_KEYBOARD_MODE_QUICKSAND;
Quicksand.flags = MODE_FLAG_HAS_MODE_SPECIFIC_COLOR | MODE_FLAG_HAS_RANDOM_COLOR | MODE_FLAG_HAS_SPEED | MODE_FLAG_AUTOMATIC_SAVE;
Quicksand.direction = MODE_DIRECTION_DOWN;
Quicksand.speed_min = AURA_CLAYMORE_SPEED_MIN;
Quicksand.speed_max = AURA_CLAYMORE_SPEED_MAX;
Quicksand.speed = AURA_CLAYMORE_SPEED_DEFAULT_QUICKSAND;
Quicksand.color_mode = MODE_COLORS_MODE_SPECIFIC;
Quicksand.colors_min = 6;
Quicksand.colors_max = 6;
Quicksand.colors.resize(6);
modes.push_back(Quicksand);
}
@@ -12,7 +12,7 @@
#include <cstring>
#include "AsusAuraAddressableController.h"
AuraAddressableController::AuraAddressableController(hid_device* dev_handle, const char* path) : AuraUSBController(dev_handle, path)
AuraAddressableController::AuraAddressableController(hid_device* dev_handle, const char* path, std::string dev_name) : AuraUSBController(dev_handle, path, dev_name)
{
/*-----------------------------------------------------*\
| Add addressable devices |
@@ -24,7 +24,7 @@ enum
class AuraAddressableController : public AuraUSBController
{
public:
AuraAddressableController(hid_device* dev_handle, const char* path);
AuraAddressableController(hid_device* dev_handle, const char* path, std::string dev_name);
~AuraAddressableController();
void SetChannelLEDs
@@ -12,7 +12,7 @@
#include <cstring>
#include "AsusAuraMainboardController.h"
AuraMainboardController::AuraMainboardController(hid_device* dev_handle, const char* path) : AuraUSBController(dev_handle, path), mode(AURA_MODE_DIRECT)
AuraMainboardController::AuraMainboardController(hid_device* dev_handle, const char* path, std::string dev_name) : AuraUSBController(dev_handle, path, dev_name), mode(AURA_MODE_DIRECT)
{
unsigned char num_total_mainboard_leds = config_table[0x1B];
unsigned char num_rgb_headers = config_table[0x1D];
@@ -26,7 +26,7 @@ enum
class AuraMainboardController : public AuraUSBController
{
public:
AuraMainboardController(hid_device* dev_handle, const char* path);
AuraMainboardController(hid_device* dev_handle, const char* path, std::string dev_name);
~AuraMainboardController();
void SetChannelLEDs
@@ -14,10 +14,11 @@
#include "LogManager.h"
#include "StringUtils.h"
AuraUSBController::AuraUSBController(hid_device* dev_handle, const char* path)
AuraUSBController::AuraUSBController(hid_device* dev_handle, const char* path, std::string dev_name)
{
dev = dev_handle;
location = path;
name = dev_name;
GetFirmwareVersion();
GetConfigTable();
@@ -40,7 +41,7 @@ std::string AuraUSBController::GetDeviceLocation()
std::string AuraUSBController::GetDeviceName()
{
return(device_name);
return(name);
}
std::string AuraUSBController::GetSerialString()
@@ -56,6 +57,11 @@ std::string AuraUSBController::GetSerialString()
return(StringUtils::wstring_to_string(serial_string));
}
std::string AuraUSBController::GetDeviceVersion()
{
return(std::string(version));
}
const std::vector<AuraDeviceInfo>& AuraUSBController::GetAuraDevices() const
{
return(device_info);
@@ -89,11 +95,11 @@ void AuraUSBController::GetConfigTable()
{
memcpy(config_table, &usb_buf[4], 60);
LOG_DEBUG("[%s] ASUS Aura USB config table:", device_name);
LOG_DEBUG("[%s] ASUS Aura USB config table:", version);
for(int i = 0; i < 60; i+=6)
{
LOG_DEBUG("[%s] %02X %02X %02X %02X %02X %02X", device_name,
LOG_DEBUG("[%s] %02X %02X %02X %02X %02X %02X", version,
config_table[i + 0],
config_table[i + 1],
config_table[i + 2],
@@ -104,7 +110,7 @@ void AuraUSBController::GetConfigTable()
}
else
{
LOG_INFO("[%s] Could not read config table, can not add device", device_name);
LOG_INFO("[%s] Could not read config table, can not add device", version);
delete this;
}
}
@@ -135,7 +141,7 @@ void AuraUSBController::GetFirmwareVersion()
\*-----------------------------------------------------*/
if(usb_buf[1] == 0x02)
{
memcpy(device_name, &usb_buf[2], 16);
memcpy(version, &usb_buf[2], 16);
}
}
@@ -54,17 +54,17 @@ enum class AuraDeviceType
struct AuraDeviceInfo
{
unsigned char effect_channel;
unsigned char direct_channel;
unsigned char num_leds;
unsigned char num_headers;
AuraDeviceType device_type;
unsigned char effect_channel;
unsigned char direct_channel;
unsigned char num_leds;
unsigned char num_headers;
AuraDeviceType device_type;
};
class AuraUSBController
{
public:
AuraUSBController(hid_device* dev_handle, const char* path);
AuraUSBController(hid_device* dev_handle, const char* path, std::string dev_name);
virtual ~AuraUSBController();
unsigned int GetChannelCount();
@@ -72,6 +72,7 @@ public:
std::string GetDeviceLocation();
std::string GetDeviceName();
std::string GetSerialString();
std::string GetDeviceVersion();
const std::vector<AuraDeviceInfo>& GetAuraDevices() const;
@@ -96,6 +97,8 @@ protected:
unsigned char config_table[60];
std::vector<AuraDeviceInfo> device_info;
std::string location;
std::string name;
char version[16];
void SendDirect
(
@@ -103,10 +106,8 @@ protected:
unsigned char led_count,
RGBColor * colors
);
private:
char device_name[16];
void GetConfigTable();
void GetFirmwareVersion();
};
@@ -26,7 +26,6 @@
RGBController_AuraMainboard::RGBController_AuraMainboard(AuraMainboardController* controller_ptr) :
RGBController_AuraUSB(controller_ptr)
{
name = "ASUS Aura USB Mainboard";
description = "ASUS Aura USB Mainboard Device";
/*-------------------------------------------------------*\
@@ -26,91 +26,91 @@
RGBController_AuraUSB::RGBController_AuraUSB(AuraUSBController* controller_ptr) :
initializedMode(false)
{
controller = controller_ptr;
controller = controller_ptr;
name = "ASUS Aura USB";
vendor = "ASUS";
version = controller->GetDeviceName();
type = DEVICE_TYPE_MOTHERBOARD;
description = "ASUS Aura USB Device";
location = controller->GetDeviceLocation();
serial = controller->GetSerialString();
name = controller->GetDeviceName();
vendor = "ASUS";
type = DEVICE_TYPE_MOTHERBOARD;
description = "ASUS Aura USB Device";
location = controller->GetDeviceLocation();
serial = controller->GetSerialString();
version = controller->GetDeviceVersion();
mode Direct;
Direct.name = "Direct";
Direct.value = AURA_MODE_DIRECT;
Direct.flags = MODE_FLAG_HAS_PER_LED_COLOR;
Direct.color_mode = MODE_COLORS_PER_LED;
Direct.name = "Direct";
Direct.value = AURA_MODE_DIRECT;
Direct.flags = MODE_FLAG_HAS_PER_LED_COLOR;
Direct.color_mode = MODE_COLORS_PER_LED;
modes.push_back(Direct);
mode Off;
Off.name = "Off";
Off.value = AURA_MODE_OFF;
Off.flags = 0;
Off.color_mode = MODE_COLORS_NONE;
Off.name = "Off";
Off.value = AURA_MODE_OFF;
Off.flags = 0;
Off.color_mode = MODE_COLORS_NONE;
modes.push_back(Off);
mode Static;
Static.name = "Static";
Static.value = AURA_MODE_STATIC;
Static.flags = MODE_FLAG_HAS_MODE_SPECIFIC_COLOR;
Static.colors_min = 1;
Static.colors_max = 1;
Static.color_mode = MODE_COLORS_MODE_SPECIFIC;
Static.name = "Static";
Static.value = AURA_MODE_STATIC;
Static.flags = MODE_FLAG_HAS_MODE_SPECIFIC_COLOR;
Static.colors_min = 1;
Static.colors_max = 1;
Static.color_mode = MODE_COLORS_MODE_SPECIFIC;
Static.colors.resize(1);
modes.push_back(Static);
mode Breathing;
Breathing.name = "Breathing";
Breathing.value = AURA_MODE_BREATHING;
Breathing.flags = MODE_FLAG_HAS_MODE_SPECIFIC_COLOR;
Breathing.colors_min = 1;
Breathing.colors_max = 1;
Breathing.color_mode = MODE_COLORS_MODE_SPECIFIC;
Breathing.name = "Breathing";
Breathing.value = AURA_MODE_BREATHING;
Breathing.flags = MODE_FLAG_HAS_MODE_SPECIFIC_COLOR;
Breathing.colors_min = 1;
Breathing.colors_max = 1;
Breathing.color_mode = MODE_COLORS_MODE_SPECIFIC;
Breathing.colors.resize(1);
modes.push_back(Breathing);
mode Flashing;
Flashing.name = "Flashing";
Flashing.value = AURA_MODE_FLASHING;
Flashing.flags = MODE_FLAG_HAS_MODE_SPECIFIC_COLOR;
Flashing.colors_min = 1;
Flashing.colors_max = 1;
Flashing.color_mode = MODE_COLORS_MODE_SPECIFIC;
Flashing.name = "Flashing";
Flashing.value = AURA_MODE_FLASHING;
Flashing.flags = MODE_FLAG_HAS_MODE_SPECIFIC_COLOR;
Flashing.colors_min = 1;
Flashing.colors_max = 1;
Flashing.color_mode = MODE_COLORS_MODE_SPECIFIC;
Flashing.colors.resize(1);
modes.push_back(Flashing);
mode SpectrumCycle;
SpectrumCycle.name = "Spectrum Cycle";
SpectrumCycle.value = AURA_MODE_SPECTRUM_CYCLE;
SpectrumCycle.flags = 0;
SpectrumCycle.color_mode = MODE_COLORS_NONE;
SpectrumCycle.name = "Spectrum Cycle";
SpectrumCycle.value = AURA_MODE_SPECTRUM_CYCLE;
SpectrumCycle.flags = 0;
SpectrumCycle.color_mode = MODE_COLORS_NONE;
modes.push_back(SpectrumCycle);
mode Rainbow;
Rainbow.name = "Rainbow";
Rainbow.value = AURA_MODE_RAINBOW;
Rainbow.flags = 0;
Rainbow.color_mode = MODE_COLORS_NONE;
Rainbow.name = "Rainbow";
Rainbow.value = AURA_MODE_RAINBOW;
Rainbow.flags = 0;
Rainbow.color_mode = MODE_COLORS_NONE;
modes.push_back(Rainbow);
mode ChaseFade;
ChaseFade.name = "Chase Fade";
ChaseFade.value = AURA_MODE_CHASE_FADE;
ChaseFade.flags = MODE_FLAG_HAS_MODE_SPECIFIC_COLOR;
ChaseFade.colors_min = 1;
ChaseFade.colors_max = 1;
ChaseFade.color_mode = MODE_COLORS_MODE_SPECIFIC;
ChaseFade.name = "Chase Fade";
ChaseFade.value = AURA_MODE_CHASE_FADE;
ChaseFade.flags = MODE_FLAG_HAS_MODE_SPECIFIC_COLOR;
ChaseFade.colors_min = 1;
ChaseFade.colors_max = 1;
ChaseFade.color_mode = MODE_COLORS_MODE_SPECIFIC;
ChaseFade.colors.resize(1);
modes.push_back(ChaseFade);
mode Chase;
Chase.name = "Chase";
Chase.value = AURA_MODE_CHASE;
Chase.flags = MODE_FLAG_HAS_MODE_SPECIFIC_COLOR;
Chase.colors_min = 1;
Chase.colors_max = 1;
Chase.color_mode = MODE_COLORS_MODE_SPECIFIC;
Chase.name = "Chase";
Chase.value = AURA_MODE_CHASE;
Chase.flags = MODE_FLAG_HAS_MODE_SPECIFIC_COLOR;
Chase.colors_min = 1;
Chase.colors_max = 1;
Chase.color_mode = MODE_COLORS_MODE_SPECIFIC;
Chase.colors.resize(1);
modes.push_back(Chase);
@@ -37,19 +37,19 @@
#include "RGBController_AsusAuraRyuoAIO.h"
#include "dmiinfo.h"
#define AURA_USB_VID 0x0B05
#define AURA_USB_VID 0x0B05
/*-----------------------------------------------------------------*\
| MOTHERBOARDS |
\*-----------------------------------------------------------------*/
#define AURA_ADDRESSABLE_1_PID 0x1867
#define AURA_ADDRESSABLE_2_PID 0x1872
#define AURA_ADDRESSABLE_3_PID 0x18A3
#define AURA_ADDRESSABLE_4_PID 0x18A5
#define AURA_MOTHERBOARD_1_PID 0x18F3
#define AURA_MOTHERBOARD_2_PID 0x1939
#define AURA_MOTHERBOARD_3_PID 0x19AF
#define AURA_MOTHERBOARD_4_PID 0x1AA6
#define AURA_ADDRESSABLE_1_PID 0x1867
#define AURA_ADDRESSABLE_2_PID 0x1872
#define AURA_ADDRESSABLE_3_PID 0x18A3
#define AURA_ADDRESSABLE_4_PID 0x18A5
#define AURA_MOTHERBOARD_1_PID 0x18F3
#define AURA_MOTHERBOARD_2_PID 0x1939
#define AURA_MOTHERBOARD_3_PID 0x19AF
#define AURA_MOTHERBOARD_4_PID 0x1AA6
/*-----------------------------------------------------------------*\
| KEYBOARDS |
@@ -83,44 +83,41 @@
/*-----------------------------------------------------------------*\
| MICE - defined in AsusAuraMouseDevices.h |
\*-----------------------------------------------------------------*/
#define AURA_ROG_STRIX_EVOLVE_PID 0x185B
#define AURA_ROG_SPATHA_WIRED_PID 0x181C
#define AURA_ROG_SPATHA_WIRELESS_PID 0x1824
#define AURA_ROG_STRIX_EVOLVE_PID 0x185B
#define AURA_ROG_SPATHA_WIRED_PID 0x181C
#define AURA_ROG_SPATHA_WIRELESS_PID 0x1824
/*-----------------------------------------------------------------*\
| MOUSEMATS |
\*-----------------------------------------------------------------*/
#define AURA_ROG_BALTEUS_PID 0x1891
#define AURA_ROG_BALTEUS_QI_PID 0x1890
#define AURA_ROG_BALTEUS_PID 0x1891
#define AURA_ROG_BALTEUS_QI_PID 0x1890
/*-----------------------------------------------------------------*\
| MONITORS |
\*-----------------------------------------------------------------*/
#define AURA_ROG_STRIX_XG27AQ_PID 0x198C
#define AURA_ROG_STRIX_XG27AQM_PID 0x19BB
#define AURA_ROG_STRIX_XG279Q_PID 0x1919
#define AURA_ROG_STRIX_XG27W_PID 0x1933
#define AURA_ROG_STRIX_XG32VC_PID 0x1968
#define AURA_ROG_PG32UQ_PID 0x19B9
#define AURA_ROG_STRIX_XG27AQ_PID 0x198C
#define AURA_ROG_STRIX_XG27AQM_PID 0x19BB
#define AURA_ROG_STRIX_XG279Q_PID 0x1919
#define AURA_ROG_STRIX_XG27W_PID 0x1933
#define AURA_ROG_STRIX_XG32VC_PID 0x1968
#define AURA_ROG_PG32UQ_PID 0x19B9
/*-----------------------------------------------------------------*\
| HEADSETSTANDS |
| HEADSET STANDS |
\*-----------------------------------------------------------------*/
#define AURA_ROG_THRONE_PID 0x18D9
#define AURA_ROG_THRONE_QI_PID 0x18C5
#define AURA_ROG_THRONE_QI_GUNDAM_PID 0x1994
#define AURA_ROG_THRONE_PID 0x18D9
#define AURA_ROG_THRONE_QI_PID 0x18C5
#define AURA_ROG_THRONE_QI_GUNDAM_PID 0x1994
/*-----------------------------------------------------------------*\
| OTHER |
\*-----------------------------------------------------------------*/
#define AURA_TERMINAL_PID 0x1889
#define ROG_STRIX_LC120_PID 0x879E
#define AURA_RYUO_AIO_PID 0x1887
#define ASUS_ROG_ALLY_PID 0x1ABE
#define ASUS_ROG_ALLY_X_PID 0x1B4C
#define AURA_TERMINAL_PID 0x1889
#define ROG_STRIX_LC120_PID 0x879E
#define AURA_RYUO_AIO_PID 0x1887
#define ASUS_ROG_ALLY_PID 0x1ABE
#define ASUS_ROG_ALLY_X_PID 0x1B4C
AuraKeyboardMappingLayoutType GetKeyboardMappingLayoutType(int pid)
{
@@ -148,9 +145,9 @@ void DetectAsusAuraUSBTerminal(hid_device_info* info, const std::string& name)
if(dev)
{
AuraAddressableController* controller = new AuraAddressableController(dev, info->path);
AuraAddressableController* controller = new AuraAddressableController(dev, info->path, name);
RGBController_AuraUSB* rgb_controller = new RGBController_AuraUSB(controller);
rgb_controller->name = name;
ResourceManager::get()->RegisterRGBController(rgb_controller);
}
}
@@ -161,10 +158,10 @@ void DetectAsusAuraUSBAddressable(hid_device_info* info, const std::string& /*na
if(dev)
{
DMIInfo dmi;
AuraAddressableController* controller = new AuraAddressableController(dev, info->path);
DMIInfo dmi;
AuraAddressableController* controller = new AuraAddressableController(dev, info->path, "ASUS " + dmi.getMainboard() + " Addressable");
RGBController_AuraUSB* rgb_controller = new RGBController_AuraUSB(controller);
rgb_controller->name = "ASUS " + dmi.getMainboard() + " Addressable";
ResourceManager::get()->RegisterRGBController(rgb_controller);
}
}
@@ -177,10 +174,10 @@ void DetectAsusAuraUSBMotherboards(hid_device_info* info, const std::string& /*n
{
try
{
DMIInfo dmi;
AuraMainboardController* controller = new AuraMainboardController(dev, info->path);
RGBController_AuraMainboard* rgb_controller = new RGBController_AuraMainboard(controller);
rgb_controller->name = "ASUS " + dmi.getMainboard();
DMIInfo dmi;
AuraMainboardController* controller = new AuraMainboardController(dev, info->path, "ASUS " + dmi.getMainboard());
RGBController_AuraMainboard* rgb_controller = new RGBController_AuraMainboard(controller);
ResourceManager::get()->RegisterRGBController(rgb_controller);
}
catch(const std::runtime_error& ex)
@@ -197,10 +194,10 @@ void DetectAsusAuraUSBKeyboards(hid_device_info* info, const std::string& name)
if(dev)
{
AuraKeyboardController* controller = new AuraKeyboardController(dev, info->path);
AuraKeyboardController* controller = new AuraKeyboardController(dev, info->path, name);
AuraKeyboardMappingLayoutType layout = GetKeyboardMappingLayoutType(info->product_id);
RGBController_AuraKeyboard* rgb_controller = new RGBController_AuraKeyboard(controller, layout);
rgb_controller->name = name;
ResourceManager::get()->RegisterRGBController(rgb_controller);
}
}
@@ -212,9 +209,9 @@ void DetectAsusAuraUSBMice(hid_device_info* info, const std::string& name)
if(dev)
{
uint16_t pid = (name == "Asus ROG Spatha X Dock") ? AURA_ROG_SPATHA_X_DOCK_FAKE_PID : info->product_id;
AuraMouseController* controller = new AuraMouseController(dev, info->path, pid);
AuraMouseController* controller = new AuraMouseController(dev, info->path, pid, name);
RGBController_AuraMouse* rgb_controller = new RGBController_AuraMouse(controller);
rgb_controller->name = name;
ResourceManager::get()->RegisterRGBController(rgb_controller);
}
}
@@ -225,9 +222,9 @@ void DetectAsusAuraUSBMousemats(hid_device_info* info, const std::string& name)
if(dev)
{
AuraMousematController* controller = new AuraMousematController(dev, info->path);
AuraMousematController* controller = new AuraMousematController(dev, info->path, name);
RGBController_AuraMousemat* rgb_controller = new RGBController_AuraMousemat(controller);
rgb_controller->name = name;
ResourceManager::get()->RegisterRGBController(rgb_controller);
}
}
@@ -238,9 +235,9 @@ void DetectAsusAuraUSBROGStrixLC(hid_device_info* info, const std::string& name)
if(dev)
{
AsusROGStrixLCController* controller = new AsusROGStrixLCController(dev, info->path);
AsusROGStrixLCController* controller = new AsusROGStrixLCController(dev, info->path, name);
RGBController_AsusROGStrixLC* rgb_controller = new RGBController_AsusROGStrixLC(controller);
rgb_controller->name = name;
ResourceManager::get()->RegisterRGBController(rgb_controller);
}
}
@@ -251,9 +248,9 @@ void DetectAsusAuraUSBRyuoAIO(hid_device_info* info, const std::string& name)
if(dev)
{
AsusAuraRyuoAIOController* controller = new AsusAuraRyuoAIOController(dev, info->path);
AsusAuraRyuoAIOController* controller = new AsusAuraRyuoAIOController(dev, info->path, name);
RGBController_AsusAuraRyuoAIO* rgb_controller = new RGBController_AsusAuraRyuoAIO(controller);
rgb_controller->name = name;
ResourceManager::get()->RegisterRGBController(rgb_controller);
}
}
@@ -264,9 +261,9 @@ void DetectAsusAuraUSBStrixEvolve(hid_device_info* info, const std::string& name
if(dev)
{
AsusAuraMouseGen1Controller* controller = new AsusAuraMouseGen1Controller(dev, info->path, info->product_id);
AsusAuraMouseGen1Controller* controller = new AsusAuraMouseGen1Controller(dev, info->path, info->product_id, name);
RGBController_AsusROGStrixEvolve* rgb_controller = new RGBController_AsusROGStrixEvolve(controller);
rgb_controller->name = name;
ResourceManager::get()->RegisterRGBController(rgb_controller);
}
}
@@ -277,9 +274,9 @@ void DetectAsusAuraUSBSpatha(hid_device_info* info, const std::string& name)
if(dev)
{
AsusAuraMouseGen1Controller* controller = new AsusAuraMouseGen1Controller(dev, info->path, info->product_id);
AsusAuraMouseGen1Controller* controller = new AsusAuraMouseGen1Controller(dev, info->path, info->product_id, name);
RGBController_AsusROGSpatha* rgb_controller = new RGBController_AsusROGSpatha(controller);
rgb_controller->name = name;
ResourceManager::get()->RegisterRGBController(rgb_controller);
}
}
@@ -290,9 +287,9 @@ void DetectAsusAuraUSBHeadsetStand(hid_device_info* info, const std::string& nam
if(dev)
{
AuraHeadsetStandController* controller = new AuraHeadsetStandController(dev, info->path);
AuraHeadsetStandController* controller = new AuraHeadsetStandController(dev, info->path, name);
RGBController_AuraHeadsetStand* rgb_controller = new RGBController_AuraHeadsetStand(controller);
rgb_controller->name = name;
ResourceManager::get()->RegisterRGBController(rgb_controller);
}
}
@@ -303,9 +300,9 @@ void DetectAsusAuraTUFUSBKeyboard(hid_device_info* info, const std::string& name
if(dev)
{
AuraTUFKeyboardController* controller = new AuraTUFKeyboardController(dev, info->path, info->product_id, info->release_number);
AuraTUFKeyboardController* controller = new AuraTUFKeyboardController(dev, info->path, info->product_id, info->release_number, name);
RGBController_AuraTUFKeyboard* rgb_controller = new RGBController_AuraTUFKeyboard(controller);
rgb_controller->name = name;
ResourceManager::get()->RegisterRGBController(rgb_controller);
}
}
@@ -316,9 +313,9 @@ void DetectAsusAuraUSBMonitor(hid_device_info* info, const std::string& name)
if(dev)
{
AuraMonitorController* controller = new AuraMonitorController(dev, info->path, info->product_id);
AuraMonitorController* controller = new AuraMonitorController(dev, info->path, info->product_id, name);
RGBController_AuraMonitor* rgb_controller = new RGBController_AuraMonitor(controller);
rgb_controller->name = name;
ResourceManager::get()->RegisterRGBController(rgb_controller);
}
}
@@ -329,9 +326,9 @@ void DetectAsusROGAlly(hid_device_info* info, const std::string& name)
if(dev)
{
ROGAllyController* controller = new ROGAllyController(dev, info->path);
ROGAllyController* controller = new ROGAllyController(dev, info->path, name);
RGBController_AsusROGAlly* rgb_controller = new RGBController_AsusROGAlly(controller);
rgb_controller->name = name;
ResourceManager::get()->RegisterRGBController(rgb_controller);
}
}
@@ -13,10 +13,11 @@
#include "AsusROGAllyController.h"
#include "StringUtils.h"
ROGAllyController::ROGAllyController(hid_device* dev_handle, const char* path)
ROGAllyController::ROGAllyController(hid_device* dev_handle, const char* path, std::string dev_name)
{
dev = dev_handle;
location = path;
name = dev_name;
SendInitialization();
}
@@ -31,6 +32,11 @@ std::string ROGAllyController::GetDeviceLocation()
return("HID: " + location);
}
std::string ROGAllyController::GetName()
{
return(name);
}
std::string ROGAllyController::GetSerialString()
{
wchar_t serial_string[128];
@@ -40,36 +40,38 @@ enum
class ROGAllyController
{
public:
ROGAllyController(hid_device* dev_handle, const char* path);
ROGAllyController(hid_device* dev_handle, const char* path, std::string dev_name);
virtual ~ROGAllyController();
std::string GetDeviceLocation();
std::string GetName();
std::string GetSerialString();
std::string GetVersion();
void SendInitialization();
void SendInitialization();
void UpdateBrightness
(
unsigned char brightness
);
void UpdateBrightness
(
unsigned char brightness
);
void UpdateLeds
(
std::vector<RGBColor> colors
);
void UpdateLeds
(
std::vector<RGBColor> colors
);
void UpdateDevice
(
unsigned char mode,
std::vector<RGBColor> colors,
unsigned char speed,
unsigned char direction
);
void UpdateDevice
(
unsigned char mode,
std::vector<RGBColor> colors,
unsigned char speed,
unsigned char direction
);
void SaveMode();
void SaveMode();
private:
hid_device* dev;
std::string location;
hid_device* dev;
std::string location;
std::string name;
};
@@ -26,7 +26,7 @@ RGBController_AsusROGAlly::RGBController_AsusROGAlly(ROGAllyController* controll
{
controller = controller_ptr;
name = "ASUS ROG Ally";
name = controller->GetName();
vendor = "ASUS";
type = DEVICE_TYPE_GAMEPAD;
description = "ASUS ROG Ally Device";
@@ -11,7 +11,7 @@
#include "AsusROGStrixLCController.h"
AsusROGStrixLCController::AsusROGStrixLCController(hid_device* dev_handle, const char* path) : AuraUSBController(dev_handle, path)
AsusROGStrixLCController::AsusROGStrixLCController(hid_device* dev_handle, const char* path, std::string dev_name) : AuraUSBController(dev_handle, path, dev_name)
{
/*-----------------------------------------------------*\
| Add addressable devices |
@@ -58,7 +58,7 @@ enum
class AsusROGStrixLCController : public AuraUSBController
{
public:
AsusROGStrixLCController(hid_device* dev_handle, const char* path);
AsusROGStrixLCController(hid_device* dev_handle, const char* path, std::string dev_name);
~AsusROGStrixLCController();
std::string GetLocation();
@@ -28,7 +28,7 @@ RGBController_AsusROGStrixLC::RGBController_AsusROGStrixLC(AsusROGStrixLCControl
controller = controller_ptr;
uint8_t speed = ROGSTRIXLC_CONTROLLER_SPEED_NORMAL;
name = "ROG Strix LC";
name = controller->GetDeviceName();
vendor = "ASUS";
type = DEVICE_TYPE_COOLER;
description = "ASUS Liquid Cooler including 120mm, 140mm, 240mm, 280mm and 360mm radiators.";
@@ -21,10 +21,11 @@
#define ASUS_CERBERUS_KB_PACKET_SIZE 8
AsusCerberusKeyboardController::AsusCerberusKeyboardController(hid_device* dev_handle, const char* path, unsigned short rev_version)
AsusCerberusKeyboardController::AsusCerberusKeyboardController(hid_device* dev_handle, const char* path, unsigned short rev_version, std::string dev_name)
{
dev = dev_handle;
location = path;
name = dev_name;
version = rev_version;
}
@@ -38,6 +39,11 @@ std::string AsusCerberusKeyboardController::GetDeviceLocation()
return("HID: " + location);
}
std::string AsusCerberusKeyboardController::GetDeviceName()
{
return(name);
}
std::string AsusCerberusKeyboardController::GetSerialString()
{
wchar_t serial_string[128];
@@ -30,10 +30,11 @@ enum
class AsusCerberusKeyboardController
{
public:
AsusCerberusKeyboardController(hid_device* dev_handle, const char* path, unsigned short rev_version);
AsusCerberusKeyboardController(hid_device* dev_handle, const char* path, unsigned short rev_version, std::string dev_name);
~AsusCerberusKeyboardController();
std::string GetDeviceLocation();
std::string GetDeviceName();
std::string GetSerialString();
std::string GetVersion();
@@ -47,5 +48,6 @@ public:
private:
hid_device* dev;
std::string location;
std::string name;
unsigned short version;
};
@@ -176,7 +176,7 @@ static const std::vector<led_value> led_names =
RGBController_AsusCerberusKeyboard::RGBController_AsusCerberusKeyboard(AsusCerberusKeyboardController* controller_ptr)
{
controller = controller_ptr;
controller = controller_ptr;
/*------------------------------------------------------------------------------------------------------*\
| this device has 6 different profiles, but there is no way to fetch them from the device, |
@@ -185,13 +185,13 @@ RGBController_AsusCerberusKeyboard::RGBController_AsusCerberusKeyboard(AsusCerbe
controller->SetProfile(1);
name = "ASUS Cerberus Keyboard";
vendor = "ASUS";
type = DEVICE_TYPE_KEYBOARD;
description = "ASUS Cerberus Keyboard Device";
location = controller->GetDeviceLocation();
serial = controller->GetSerialString();
version = controller->GetVersion();
name = controller->GetDeviceName();
vendor = "ASUS";
type = DEVICE_TYPE_KEYBOARD;
description = "ASUS Cerberus Keyboard Device";
location = controller->GetDeviceLocation();
serial = controller->GetSerialString();
version = controller->GetVersion();
mode Custom;
Custom.name = "Custom";
@@ -29,9 +29,9 @@ void DetectAsusCerberusMech(hid_device_info* info, const std::string& name)
if(dev)
{
AsusCerberusKeyboardController* controller = new AsusCerberusKeyboardController(dev, info->path, info->release_number);
AsusCerberusKeyboardController* controller = new AsusCerberusKeyboardController(dev, info->path, info->release_number, name);
RGBController_AsusCerberusKeyboard* rgb_controller = new RGBController_AsusCerberusKeyboard(controller);
rgb_controller->name = name;
ResourceManager::get()->RegisterRGBController(rgb_controller);
}
}
@@ -42,9 +42,9 @@ void DetectAsusSagarisKeyboard(hid_device_info* info, const std::string& name)
if(dev)
{
AsusSagarisKeyboardController* controller = new AsusSagarisKeyboardController(dev, info->path, info->release_number);
AsusSagarisKeyboardController* controller = new AsusSagarisKeyboardController(dev, info->path, info->release_number, name);
RGBController_AsusSagarisKeyboard* rgb_controller = new RGBController_AsusSagarisKeyboard(controller);
rgb_controller->name = name;
ResourceManager::get()->RegisterRGBController(rgb_controller);
}
}
@@ -55,9 +55,9 @@ void DetectAsusStrixClaw(hid_device_info* info, const std::string& name)
if(dev)
{
StrixClawController* controller = new StrixClawController(dev, info->path);
StrixClawController* controller = new StrixClawController(dev, info->path, name);
RGBController_StrixClaw* rgb_controller = new RGBController_StrixClaw(controller);
rgb_controller->name = name;
ResourceManager::get()->RegisterRGBController(rgb_controller);
}
}
@@ -20,10 +20,11 @@
#define ASUS_SAGARIS_KB_PACKET_SIZE 65
AsusSagarisKeyboardController::AsusSagarisKeyboardController(hid_device* dev_handle, const char* path, unsigned short rev_version)
AsusSagarisKeyboardController::AsusSagarisKeyboardController(hid_device* dev_handle, const char* path, unsigned short rev_version, std::string dev_name)
{
dev = dev_handle;
location = path;
name = dev_name;
version = rev_version;
}
@@ -42,6 +43,11 @@ std::string AsusSagarisKeyboardController::GetDeviceLocation()
return("HID: " + location);
}
std::string AsusSagarisKeyboardController::GetDeviceName()
{
return(name);
}
std::string AsusSagarisKeyboardController::GetSerialString()
{
wchar_t serial_string[128];
@@ -54,11 +54,12 @@ typedef struct
class AsusSagarisKeyboardController
{
public:
AsusSagarisKeyboardController(hid_device* dev_handle, const char* path, unsigned short rev_version);
AsusSagarisKeyboardController(hid_device* dev_handle, const char* path, unsigned short rev_version, std::string dev_name);
~AsusSagarisKeyboardController();
std::string GetVersion();
std::string GetDeviceLocation();
std::string GetDeviceName();
std::string GetSerialString();
sagaris_mode GetMode();
@@ -73,5 +74,6 @@ public:
private:
hid_device* dev;
std::string location;
std::string name;
unsigned short version;
};
@@ -28,7 +28,7 @@ RGBController_AsusSagarisKeyboard::RGBController_AsusSagarisKeyboard(AsusSagaris
{
controller = controller_ptr;
name = "ASUS Sagaris Keyboard";
name = controller->GetDeviceName();
vendor = "ASUS";
type = DEVICE_TYPE_KEYBOARD;
description = "ASUS Sagaris Keyboard Device";

Some files were not shown because too many files have changed in this diff Show More