mirror of
https://github.com/CalcProgrammer1/OpenRGB.git
synced 2025-12-26 16:57:51 -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
46 lines
1.9 KiB
C++
46 lines
1.9 KiB
C++
/*---------------------------------------------------------*\
|
|
| IonicoControllerDetect.cpp |
|
|
| |
|
|
| Detector for Ionico-II-17 |
|
|
| |
|
|
| Lucas Strafe 31 Dec 2022 |
|
|
| |
|
|
| This file is part of the OpenRGB project |
|
|
| SPDX-License-Identifier: GPL-2.0-or-later |
|
|
\*---------------------------------------------------------*/
|
|
|
|
#include "Detector.h"
|
|
#include "RGBController.h"
|
|
#include "hidapi.h"
|
|
#include "IonicoController.h"
|
|
#include "RGBController_Ionico.h"
|
|
|
|
/*-----------------------------------------------------*\
|
|
| FRONT BAR |
|
|
\*-----------------------------------------------------*/
|
|
#define IONICO_FB_VID 0x048D
|
|
#define IONICO_FB_PID 0x6005
|
|
|
|
/*-----------------------------------------------------*\
|
|
| KEYBOARD |
|
|
\*-----------------------------------------------------*/
|
|
#define IONICO_KB_VID 0x048D
|
|
#define IONICO_KB_PID 0xCE00
|
|
|
|
|
|
void DetectIonicoControllers(hid_device_info* info, const std::string& name)
|
|
{
|
|
hid_device* dev = hid_open_path(info->path);
|
|
|
|
if(dev)
|
|
{
|
|
IonicoController* controller = new IonicoController(dev, *info, info->product_id, name);
|
|
RGBController_Ionico* rgb_controller = new RGBController_Ionico(controller);
|
|
|
|
ResourceManager::get()->RegisterRGBController(rgb_controller);
|
|
}
|
|
}
|
|
|
|
REGISTER_HID_DETECTOR_PU("Ionico Light Bar", DetectIonicoControllers, IONICO_FB_VID, IONICO_FB_PID, 0xFF03, 0x01);
|
|
REGISTER_HID_DETECTOR_PU("Ionico Keyboard", DetectIonicoControllers, IONICO_KB_VID, IONICO_KB_PID, 0xFF12, 0x01);
|