mirror of
https://github.com/CalcProgrammer1/OpenRGB.git
synced 2026-05-19 12:06:37 -04:00
add DRGB E8
This commit is contained in:
@@ -44,11 +44,11 @@ void DRGBController::KeepaliveThread()
|
||||
sleep_buf[0] = 0x65;
|
||||
while(keepalive_thread_run.load())
|
||||
{
|
||||
if((std::chrono::steady_clock::now() - last_commit_time) > std::chrono::seconds(1))
|
||||
if((std::chrono::steady_clock::now() - last_commit_time) > std::chrono::milliseconds(500))
|
||||
{
|
||||
SendPacketFS(sleep_buf, 1, 0);
|
||||
}
|
||||
std::this_thread::sleep_for(500ms);
|
||||
std::this_thread::sleep_for(300ms);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -96,6 +96,12 @@ void DRGBController::SendPacket(unsigned char* colors, unsigned int buf_packets
|
||||
unsigned int buf_idx = 0;
|
||||
memset(usb_buf, 0x00, sizeof(usb_buf));
|
||||
usb_buf[0x00] = 0x00;
|
||||
|
||||
/*-----------------------------------------------------*\
|
||||
| Update last commit time |
|
||||
\*-----------------------------------------------------*/
|
||||
last_commit_time = std::chrono::steady_clock::now();
|
||||
|
||||
unsigned int HigCount = LEDtotal / 256 >= 1 ? 1 : 0;
|
||||
unsigned int LowCount = LEDtotal >= DRGB_V4_ONE_PACKAGE_SIZE ? 60 : (LEDtotal % 256) ;
|
||||
LEDtotal = LEDtotal <= DRGB_V4_ONE_PACKAGE_SIZE ? 0 : (LEDtotal-DRGB_V4_ONE_PACKAGE_SIZE);
|
||||
@@ -122,6 +128,11 @@ void DRGBController::SendPacketFS(unsigned char* colors, unsigned int buf_packet
|
||||
unsigned char usb_buf[65] = {0};
|
||||
unsigned int current_index = 0;
|
||||
|
||||
/*-----------------------------------------------------*\
|
||||
| Update last commit time |
|
||||
\*-----------------------------------------------------*/
|
||||
last_commit_time = std::chrono::steady_clock::now();
|
||||
|
||||
if(Array == 0x64 || Array == 0x47)
|
||||
{
|
||||
const unsigned int offset = (Array == 0x64) ? 100 : 92;
|
||||
|
||||
@@ -50,6 +50,7 @@ REGISTER_HID_DETECTOR("DeepRGB LED", DetectDRGBControllers, DRGBV
|
||||
REGISTER_HID_DETECTOR("DeepRGB Ultra V3", DetectDRGBControllers, DRGBV3_VID, DRGB_Ultra_V3_PID);
|
||||
REGISTER_HID_DETECTOR("DeepRGB CORE V3", DetectDRGBControllers, DRGBV3_VID, DRGB_CORE_V3_PID);
|
||||
REGISTER_HID_DETECTOR("DeepRGB E8 F", DetectDRGBControllers, DRGBV3_VID, DRGB_E8_F_PID);
|
||||
REGISTER_HID_DETECTOR("DeepRGB E8", DetectDRGBControllers, DRGBV3_VID, DRGB_E8_PID);
|
||||
REGISTER_HID_DETECTOR("DeepRGB E16", DetectDRGBControllers, DRGBV3_VID, DRGB_E16_PID);
|
||||
REGISTER_HID_DETECTOR("NEEDMAX 10 ELITE", DetectDRGBControllers, DRGBV3_VID, DM_10_PID);
|
||||
REGISTER_HID_DETECTOR("JPU ELITE", DetectDRGBControllers, DRGBV3_VID, JPU_12_PID);
|
||||
|
||||
@@ -150,6 +150,11 @@ void RGBController_DRGB::SetupZones()
|
||||
NUM_Channel_led = 132;
|
||||
Version = 1;
|
||||
break;
|
||||
case DRGB_E8_PID:
|
||||
NUM_CHANNELS = 8;
|
||||
NUM_Channel_led = 132;
|
||||
Version = 1;
|
||||
break;
|
||||
case DRGB_E16_PID:
|
||||
NUM_CHANNELS = 16;
|
||||
NUM_Channel_led = 132;
|
||||
|
||||
@@ -34,6 +34,7 @@
|
||||
#define DRGB_Ultra_V3_PID 0x1221
|
||||
#define DRGB_CORE_V3_PID 0x1226
|
||||
#define DRGB_E8_F_PID 0x1408
|
||||
#define DRGB_E8_PID 0x1407
|
||||
#define DRGB_E16_PID 0x1416
|
||||
#define DM_10_PID 0x1410
|
||||
#define JPU_12_PID 0x1412
|
||||
|
||||
Reference in New Issue
Block a user