mirror of
https://github.com/CalcProgrammer1/OpenRGB.git
synced 2025-12-31 11:17:52 -05:00
* Reorganize and clean up RGBController API functions
* Add functions to get protected RGBController member values
* Make NetworkClient, ProfileManager, and ResourceManager friend classes so they can access protected members
* Protected previously-public RGBController members
* Information strings (name, vendor, description, version, serial location)
* Device type
* Active mode
* Flags
* LEDs vector
* LED alternate names vector
* Modes vector
* Colors vector
* Zones vector
* Add CONTROLLER_FLAG_HIDDEN to allow plugins to hide controllers from control GUI
* Add update reason codes to RGBController update callback and signal updates on more RGBController events
* Add loop zone types and segmented zone type
* Add matrix map field to segments
69 lines
3.3 KiB
C++
69 lines
3.3 KiB
C++
/*---------------------------------------------------------*\
|
|
| AsusAuraCoreControllerDetect.cpp |
|
|
| |
|
|
| Detector for ASUS ROG Aura Core |
|
|
| |
|
|
| Adam Honse (CalcProgrammer1) 13 Apr 2020 |
|
|
| Chris M (Dr_No) 28 Jul 2022 |
|
|
| |
|
|
| This file is part of the OpenRGB project |
|
|
| SPDX-License-Identifier: GPL-2.0-or-later |
|
|
\*---------------------------------------------------------*/
|
|
|
|
#include "Detector.h"
|
|
#include "AsusAuraCoreController.h"
|
|
#include "RGBController.h"
|
|
#include "RGBController_AsusAuraCore.h"
|
|
#include "RGBController_AsusAuraCoreLaptop.h"
|
|
#include <hidapi.h>
|
|
|
|
#define AURA_CORE_VID 0x0B05
|
|
|
|
/******************************************************************************************\
|
|
* *
|
|
* DetectAuraCoreControllers *
|
|
* *
|
|
* Tests the USB address to see if an Asus ROG Aura Core controller exists there *
|
|
* *
|
|
\******************************************************************************************/
|
|
|
|
void DetectAsusAuraCoreControllers(hid_device_info* info, const std::string& /*name*/)
|
|
{
|
|
hid_device* dev = hid_open_path(info->path);
|
|
|
|
if(dev)
|
|
{
|
|
AuraCoreController* controller = new AuraCoreController(dev, info->path);
|
|
RGBController_AuraCore* rgb_controller = new RGBController_AuraCore(controller);
|
|
|
|
if(rgb_controller->GetDeviceType() != DEVICE_TYPE_UNKNOWN)
|
|
{
|
|
ResourceManager::get()->RegisterRGBController(rgb_controller);
|
|
}
|
|
else
|
|
{
|
|
delete rgb_controller;
|
|
}
|
|
}
|
|
}
|
|
|
|
void DetectAsusAuraCoreLaptopControllers(hid_device_info* info, const std::string& /*name*/)
|
|
{
|
|
hid_device* dev = hid_open_path(info->path);
|
|
|
|
if(dev)
|
|
{
|
|
AsusAuraCoreLaptopController* controller = new AsusAuraCoreLaptopController(dev, info->path);
|
|
RGBController_AsusAuraCoreLaptop* rgb_controller = new RGBController_AsusAuraCoreLaptop(controller);
|
|
|
|
ResourceManager::get()->RegisterRGBController(rgb_controller);
|
|
}
|
|
}
|
|
|
|
|
|
REGISTER_HID_DETECTOR ("ASUS Aura Core", DetectAsusAuraCoreControllers, AURA_CORE_VID, 0x1854);
|
|
REGISTER_HID_DETECTOR ("ASUS Aura Core", DetectAsusAuraCoreControllers, AURA_CORE_VID, 0x1866);
|
|
REGISTER_HID_DETECTOR ("ASUS Aura Core", DetectAsusAuraCoreControllers, AURA_CORE_VID, 0x1869);
|
|
REGISTER_HID_DETECTOR_PU("ASUS ROG Strix SCAR 15", DetectAsusAuraCoreLaptopControllers, AURA_CORE_VID, AURA_STRIX_SCAR_15_PID, 0xFF31, 0x79);
|
|
REGISTER_HID_DETECTOR_PU("ASUS ROG Strix SCAR 17", DetectAsusAuraCoreLaptopControllers, AURA_CORE_VID, 0x1866, 0xFF31, 0x79);
|