/*---------------------------------------------------------*\ | HIDLampArrayControllerDetect.cpp | | | | Detector for HID LampArray Devices | | | | Adam Honse (calcprogrammer1@gmail.com) 26 Mar 2024 | | | | This file is part of the OpenRGB project | | SPDX-License-Identifier: GPL-2.0-only | \*---------------------------------------------------------*/ #include "DetectionManager.h" #include "HIDLampArrayController.h" #include "RGBController.h" #include "RGBController_HIDLampArray.h" #include #include DetectedControllers DetectHIDLampArrayControllers(hid_device_info* info, const std::string& /*name*/) { DetectedControllers detected_controllers; hid_device* dev; dev = hid_open_path(info->path); if(dev) { HIDLampArrayController* controller = new HIDLampArrayController(dev, info->path); RGBController_HIDLampArray* rgb_controller = new RGBController_HIDLampArray(controller); detected_controllers.push_back(rgb_controller); } return(detected_controllers); } REGISTER_HID_DETECTOR_PU_ONLY("HID LampArray Device", DetectHIDLampArrayControllers, 0x59, 0x01);