Publish LumaOps source

This commit is contained in:
LumaOps release export
2026-09-03 01:18:36 +02:00
commit 7f1c0e5f71
2363 changed files with 501543 additions and 0 deletions
@@ -0,0 +1,242 @@
/*---------------------------------------------------------*\
| NZXTHuePlusController.cpp |
| |
| Driver for NZXT Hue Plus |
| |
| Adam Honse (calcprogrammer1@gmail.com) 27 Aug 2019 |
| |
| This file is part of the OpenRGB project |
| SPDX-License-Identifier: GPL-2.0-or-later |
\*---------------------------------------------------------*/
#include <cstring>
#include <fstream>
#include <iostream>
#include <string>
#include "NZXTHuePlusController.h"
using namespace std::chrono_literals;
HuePlusController::HuePlusController()
{
}
HuePlusController::~HuePlusController()
{
delete serialport;
}
void HuePlusController::Initialize(char* port)
{
port_name = port;
serialport = new serial_port(port_name.c_str(), HUE_PLUS_BAUD);
channel_leds[HUE_PLUS_CHANNEL_1_IDX] = GetLEDsOnChannel(HUE_PLUS_CHANNEL_1);
channel_leds[HUE_PLUS_CHANNEL_2_IDX] = GetLEDsOnChannel(HUE_PLUS_CHANNEL_2);
}
std::string HuePlusController::GetLocation()
{
return("COM: " + port_name);
}
unsigned int HuePlusController::GetLEDsOnChannel(unsigned int channel)
{
unsigned char serial_buf[] =
{
0x8D, 0x00, 0x00, 0x00, 0x00
};
unsigned int ret_val = 0;
/*-----------------------------------------------------*\
| Set channel in serial packet |
\*-----------------------------------------------------*/
serial_buf[0x01] = channel;
serialport->serial_flush_rx();
serialport->serial_write((char *)serial_buf, 2);
std::this_thread::sleep_for(50ms);
int bytes_read = serialport->serial_read((char *)serial_buf, 5);
if(bytes_read == 5)
{
if(serial_buf[3] == 0x01)
{
ret_val = serial_buf[4] * 8;
}
else
{
ret_val += serial_buf[4] * 10;
}
}
return(ret_val);
}
void HuePlusController::SetChannelEffect
(
unsigned char channel,
unsigned char mode,
unsigned char speed,
bool direction,
RGBColor * colors,
unsigned int num_colors
)
{
unsigned char color_data[120];
/*-----------------------------------------------------*\
| If mode requires no colors, send packet |
\*-----------------------------------------------------*/
if(num_colors == 0)
{
/*-----------------------------------------------------*\
| Send mode without color data |
\*-----------------------------------------------------*/
SendPacket(channel, mode, direction, 0, speed, 0, NULL);
}
/*-----------------------------------------------------*\
| If mode requires indexed colors, send color index |
| packets for each mode color |
\*-----------------------------------------------------*/
else if(num_colors <= 8)
{
for(std::size_t color_idx = 0; color_idx < num_colors; color_idx++)
{
/*-----------------------------------------------------*\
| Fill in color data (40 entries per color) |
\*-----------------------------------------------------*/
for (std::size_t idx = 0; idx < 40; idx++)
{
int pixel_idx = (int)idx * 3;
RGBColor color = colors[color_idx];
color_data[pixel_idx + 0x00] = RGBGetGValue(color);
color_data[pixel_idx + 0x01] = RGBGetRValue(color);
color_data[pixel_idx + 0x02] = RGBGetBValue(color);
}
/*-----------------------------------------------------*\
| Send mode and color data |
\*-----------------------------------------------------*/
SendPacket(channel, mode, direction, (unsigned char)color_idx, speed, 40, &color_data[0]);
}
}
/*-----------------------------------------------------*\
| If mode requires per-LED colors, fill colors array |
\*-----------------------------------------------------*/
else
{
/*-----------------------------------------------------*\
| Fill in color data (up to 40 colors) |
\*-----------------------------------------------------*/
for (std::size_t idx = 0; idx < num_colors; idx++)
{
int pixel_idx = (int)idx * 3;
RGBColor color = colors[idx];
color_data[pixel_idx + 0x00] = RGBGetGValue(color);
color_data[pixel_idx + 0x01] = RGBGetRValue(color);
color_data[pixel_idx + 0x02] = RGBGetBValue(color);
}
/*-----------------------------------------------------*\
| Send mode and color data |
\*-----------------------------------------------------*/
SendPacket(channel, mode, direction, 0, speed, num_colors, &color_data[0]);
}
}
void HuePlusController::SetChannelLEDs
(
unsigned char channel,
RGBColor * colors,
unsigned int num_colors
)
{
unsigned char color_data[120];
/*-----------------------------------------------------*\
| Fill in color data (up to 40 colors) |
\*-----------------------------------------------------*/
for (std::size_t idx = 0; idx < num_colors; idx++)
{
int pixel_idx = (int)idx * 3;
RGBColor color = colors[idx];
color_data[pixel_idx + 0x00] = RGBGetGValue(color);
color_data[pixel_idx + 0x01] = RGBGetRValue(color);
color_data[pixel_idx + 0x02] = RGBGetBValue(color);
}
/*-----------------------------------------------------*\
| Send color data |
\*-----------------------------------------------------*/
SendPacket(channel, HUE_PLUS_MODE_DIRECT, false, 0, 0, num_colors, &color_data[0]);
}
/*-------------------------------------------------------------------------------------------------*\
| Private packet sending functions. |
\*-------------------------------------------------------------------------------------------------*/
void HuePlusController::SendPacket
(
unsigned char channel,
unsigned char mode,
bool direction,
unsigned char color_idx,
unsigned char speed,
unsigned char color_count,
unsigned char* color_data
)
{
unsigned char serial_buf[HUE_PLUS_PACKET_SIZE];
/*-----------------------------------------------------*\
| Zero out buffer |
\*-----------------------------------------------------*/
memset(serial_buf, 0x00, sizeof(serial_buf));
/*-----------------------------------------------------*\
| Set up Direct packet |
\*-----------------------------------------------------*/
serial_buf[0x00] = 0x4B;
/*-----------------------------------------------------*\
| Set channel in serial packet |
\*-----------------------------------------------------*/
serial_buf[0x01] = channel + 1;
/*-----------------------------------------------------*\
| Set mode in serial packet |
\*-----------------------------------------------------*/
serial_buf[0x02] = mode;
/*-----------------------------------------------------*\
| Set options bitfield in serial packet |
\*-----------------------------------------------------*/
serial_buf[0x03] = 0;
serial_buf[0x03] |= direction ? ( 1 << 4 ) : 0;
/*-----------------------------------------------------*\
| Set color index and speed in serial packet |
\*-----------------------------------------------------*/
serial_buf[0x04] = ( color_idx << 5 ) | speed;
/*-----------------------------------------------------*\
| Copy in color data bytes |
\*-----------------------------------------------------*/
memcpy(&serial_buf[0x05], color_data, color_count * 3);
/*-----------------------------------------------------*\
| Send packet |
\*-----------------------------------------------------*/
serialport->serial_write((char *)serial_buf, HUE_PLUS_PACKET_SIZE);
/*-----------------------------------------------------*\
| Delay to allow Hue+ device to ready for next packet |
\*-----------------------------------------------------*/
std::this_thread::sleep_for(5ms);
}
@@ -0,0 +1,114 @@
/*---------------------------------------------------------*\
| NZXTHuePlusController.h |
| |
| Driver for NZXT Hue Plus |
| |
| Adam Honse (calcprogrammer1@gmail.com) 27 Aug 2019 |
| |
| This file is part of the OpenRGB project |
| SPDX-License-Identifier: GPL-2.0-or-later |
\*---------------------------------------------------------*/
#pragma once
#include <vector>
#include "RGBController.h"
#include "serial_port.h"
#ifndef TRUE
#define TRUE true
#define FALSE false
#endif
#ifndef WIN32
#define LPSTR char *
#define strtok_s strtok_r
#endif
#define HUE_PLUS_BAUD 256000
#define HUE_PLUS_PACKET_SIZE 125
enum
{
HUE_PLUS_CHANNEL_BOTH = 0x00, /* Both channels */
HUE_PLUS_CHANNEL_1 = 0x01, /* Channel 1 */
HUE_PLUS_CHANNEL_2 = 0x02, /* Channel 2 */
HUE_PLUS_NUM_CHANNELS = 0x02 /* Number of channels */
};
enum
{
HUE_PLUS_CHANNEL_1_IDX = 0x00, /* Channel 1 array index */
HUE_PLUS_CHANNEL_2_IDX = 0x01, /* Channel 2 array index */
};
enum
{
HUE_PLUS_SPEED_SLOWEST = 0x00, /* Slowest speed */
HUE_PLUS_SPEED_SLOW = 0x01, /* Slow speed */
HUE_PLUS_SPEED_NORMAL = 0x02, /* Normal speed */
HUE_PLUS_SPEED_FAST = 0x03, /* Fast speed */
HUE_PLUS_SPEED_FASTEST = 0x04, /* Fastest speed */
};
enum
{
HUE_PLUS_MODE_FIXED = 0x00, /* Fixed colors mode */
HUE_PLUS_MODE_FADING = 0x01, /* Fading mode */
HUE_PLUS_MODE_SPECTRUM = 0x02, /* Spectrum cycle mode */
HUE_PLUS_MODE_MARQUEE = 0x03, /* Marquee mode */
HUE_PLUS_MODE_COVER_MARQUEE = 0x04, /* Cover marquee mode */
HUE_PLUS_MODE_ALTERNATING = 0x05, /* Alternating mode */
HUE_PLUS_MODE_PULSING = 0x06, /* Pulsing mode */
HUE_PLUS_MODE_BREATHING = 0x07, /* Breathing mode */
HUE_PLUS_MODE_ALERT = 0x08, /* Alert mode */
HUE_PLUS_MODE_CANDLELIGHT = 0x09, /* Candlelight mode */
HUE_PLUS_MODE_WINGS = 0x0C, /* Wings mode */
HUE_PLUS_MODE_WAVE = 0x0D, /* Wave mode */
HUE_PLUS_MODE_DIRECT = 0x0E, /* Direct mode */
};
class HuePlusController
{
public:
HuePlusController();
~HuePlusController();
void Initialize(char* port);
std::string GetLocation();
unsigned int GetLEDsOnChannel(unsigned int channel);
void SetChannelEffect
(
unsigned char channel,
unsigned char mode,
unsigned char speed,
bool direction,
RGBColor * colors,
unsigned int num_colors
);
void SetChannelLEDs
(
unsigned char channel,
RGBColor * colors,
unsigned int num_colors
);
unsigned int channel_leds[HUE_PLUS_NUM_CHANNELS];
private:
std::string port_name;
serial_port *serialport = nullptr;
void SendPacket
(
unsigned char channel,
unsigned char mode,
bool direction,
unsigned char color_idx,
unsigned char speed,
unsigned char color_count,
unsigned char* color_data
);
};
@@ -0,0 +1,51 @@
/*---------------------------------------------------------*\
| NZXTHuePlusControllerDetect.cpp |
| |
| Detector for NZXT Hue Plus |
| |
| Adam Honse (calcprogrammer1@gmail.com) 27 Aug 2019 |
| |
| This file is part of the OpenRGB project |
| SPDX-License-Identifier: GPL-2.0-or-later |
\*---------------------------------------------------------*/
#include <vector>
#include "Detector.h"
#include "NZXTHuePlusController.h"
#include "RGBController_NZXTHuePlus.h"
#include "find_usb_serial_port.h"
#define NZXT_HUE_PLUS_VID 0x04D8
#define NZXT_HUE_PLUS_PID 0x00DF
/******************************************************************************************\
* *
* DetectNZXTHuePlusControllers *
* *
* Detect devices supported by the NZXTHuePlus driver *
* *
\******************************************************************************************/
void DetectNZXTHuePlusControllers()
{
std::vector<std::string *> ports = find_usb_serial_port(NZXT_HUE_PLUS_VID, NZXT_HUE_PLUS_PID);
for(unsigned int i = 0; i < ports.size(); i++)
{
if(*ports[i] != "")
{
HuePlusController* controller = new HuePlusController();
controller->Initialize((char *)ports[i]->c_str());
RGBController_HuePlus* rgb_controller = new RGBController_HuePlus(controller);
ResourceManager::get()->RegisterRGBController(rgb_controller);
}
}
} /* DetectHuePlusControllers() */
REGISTER_DETECTOR("NZXT Hue+", DetectNZXTHuePlusControllers);
/*---------------------------------------------------------------------------------------------------------*\
| Entries for dynamic UDEV rules |
| |
| DUMMY_DEVICE_DETECTOR("NZXT Hue+", DetectNZXTHuePlusControllers, 0x04D8, 0x00DF ) |
\*---------------------------------------------------------------------------------------------------------*/
@@ -0,0 +1,309 @@
/*---------------------------------------------------------*\
| RGBController_NZXTHuePlus.cpp |
| |
| RGBController for NZXT Hue Plus |
| |
| Adam Honse (calcprogrammer1@gmail.com) 20 Jun 2019 |
| |
| This file is part of the OpenRGB project |
| SPDX-License-Identifier: GPL-2.0-or-later |
\*---------------------------------------------------------*/
#include "RGBController_NZXTHuePlus.h"
/**------------------------------------------------------------------*\
@name NZXT Hue+
@category LEDStrip
@type Serial
@save :robot:
@direct :white_check_mark:
@effects :white_check_mark:
@detectors DetectNZXTHuePlusControllers
@comment
\*-------------------------------------------------------------------*/
RGBController_HuePlus::RGBController_HuePlus(HuePlusController* controller_ptr)
{
controller = controller_ptr;
name = "NZXT Hue+";
vendor = "NZXT";
type = DEVICE_TYPE_LEDSTRIP;
description = "NZXT Hue+ Device";
location = controller->GetLocation();
mode Direct;
Direct.name = "Direct";
Direct.value = HUE_PLUS_MODE_DIRECT;
Direct.flags = MODE_FLAG_HAS_PER_LED_COLOR;
Direct.color_mode = MODE_COLORS_PER_LED;
modes.push_back(Direct);
mode Fading;
Fading.name = "Fading";
Fading.value = HUE_PLUS_MODE_FADING;
Fading.flags = MODE_FLAG_HAS_SPEED | MODE_FLAG_HAS_MODE_SPECIFIC_COLOR;
Fading.speed_min = HUE_PLUS_SPEED_SLOWEST;
Fading.speed_max = HUE_PLUS_SPEED_FASTEST;
Fading.colors_min = 1;
Fading.colors_max = 8;
Fading.speed = HUE_PLUS_SPEED_NORMAL;
Fading.color_mode = MODE_COLORS_MODE_SPECIFIC;
Fading.colors.resize(2);
modes.push_back(Fading);
mode SpectrumCycle;
SpectrumCycle.name = "Spectrum Cycle";
SpectrumCycle.value = HUE_PLUS_MODE_SPECTRUM;
SpectrumCycle.flags = MODE_FLAG_HAS_SPEED | MODE_FLAG_HAS_DIRECTION_LR;
SpectrumCycle.speed_min = HUE_PLUS_SPEED_SLOWEST;
SpectrumCycle.speed_max = HUE_PLUS_SPEED_FASTEST;
SpectrumCycle.speed = HUE_PLUS_SPEED_NORMAL;
SpectrumCycle.direction = MODE_DIRECTION_RIGHT;
SpectrumCycle.color_mode = MODE_COLORS_NONE;
modes.push_back(SpectrumCycle);
mode Marquee;
Marquee.name = "Marquee";
Marquee.value = HUE_PLUS_MODE_MARQUEE;
Marquee.flags = MODE_FLAG_HAS_SPEED | MODE_FLAG_HAS_DIRECTION_LR | MODE_FLAG_HAS_MODE_SPECIFIC_COLOR;
Marquee.speed_min = HUE_PLUS_SPEED_SLOWEST;
Marquee.speed_max = HUE_PLUS_SPEED_FASTEST;
Marquee.colors_min = 1;
Marquee.colors_max = 1;
Marquee.speed = HUE_PLUS_SPEED_NORMAL;
Marquee.direction = MODE_DIRECTION_RIGHT;
Marquee.color_mode = MODE_COLORS_MODE_SPECIFIC;
Marquee.colors.resize(1);
modes.push_back(Marquee);
mode CoverMarquee;
CoverMarquee.name = "Cover Marquee";
CoverMarquee.value = HUE_PLUS_MODE_COVER_MARQUEE;
CoverMarquee.flags = MODE_FLAG_HAS_SPEED | MODE_FLAG_HAS_DIRECTION_LR | MODE_FLAG_HAS_MODE_SPECIFIC_COLOR;
CoverMarquee.speed_min = HUE_PLUS_SPEED_SLOWEST;
CoverMarquee.speed_max = HUE_PLUS_SPEED_FASTEST;
CoverMarquee.colors_min = 1;
CoverMarquee.colors_max = 8;
CoverMarquee.speed = HUE_PLUS_SPEED_NORMAL;
CoverMarquee.direction = MODE_DIRECTION_RIGHT;
CoverMarquee.color_mode = MODE_COLORS_MODE_SPECIFIC;
CoverMarquee.colors.resize(2);
modes.push_back(CoverMarquee);
mode Alternating;
Alternating.name = "Alternating";
Alternating.value = HUE_PLUS_MODE_ALTERNATING;
Alternating.flags = MODE_FLAG_HAS_SPEED | MODE_FLAG_HAS_DIRECTION_LR | MODE_FLAG_HAS_MODE_SPECIFIC_COLOR;
Alternating.speed_min = HUE_PLUS_SPEED_SLOWEST;
Alternating.speed_max = HUE_PLUS_SPEED_FASTEST;
Alternating.colors_min = 1;
Alternating.colors_max = 2;
Alternating.speed = HUE_PLUS_SPEED_NORMAL;
Alternating.direction = MODE_DIRECTION_RIGHT;
Alternating.color_mode = MODE_COLORS_MODE_SPECIFIC;
Alternating.colors.resize(2);
modes.push_back(Alternating);
mode Pulsing;
Pulsing.name = "Pulsing";
Pulsing.value = HUE_PLUS_MODE_PULSING;
Pulsing.flags = MODE_FLAG_HAS_SPEED | MODE_FLAG_HAS_MODE_SPECIFIC_COLOR;
Pulsing.speed_min = HUE_PLUS_SPEED_SLOWEST;
Pulsing.speed_max = HUE_PLUS_SPEED_FASTEST;
Pulsing.colors_min = 1;
Pulsing.colors_max = 8;
Pulsing.speed = HUE_PLUS_SPEED_NORMAL;
Pulsing.color_mode = MODE_COLORS_MODE_SPECIFIC;
Pulsing.colors.resize(2);
modes.push_back(Pulsing);
mode Breathing;
Breathing.name = "Breathing";
Breathing.value = HUE_PLUS_MODE_BREATHING;
Breathing.flags = MODE_FLAG_HAS_SPEED | MODE_FLAG_HAS_MODE_SPECIFIC_COLOR | MODE_FLAG_HAS_PER_LED_COLOR;
Breathing.speed_min = HUE_PLUS_SPEED_SLOWEST;
Breathing.speed_max = HUE_PLUS_SPEED_FASTEST;
Breathing.colors_min = 1;
Breathing.colors_max = 8;
Breathing.speed = HUE_PLUS_SPEED_NORMAL;
Breathing.color_mode = MODE_COLORS_MODE_SPECIFIC;
Breathing.colors.resize(2);
modes.push_back(Breathing);
mode Alert;
Alert.name = "Alert";
Alert.value = HUE_PLUS_MODE_ALERT;
Alert.flags = 0;
Alert.color_mode = MODE_COLORS_NONE;
modes.push_back(Alert);
mode Candlelight;
Candlelight.name = "Candlelight";
Candlelight.value = HUE_PLUS_MODE_CANDLELIGHT;
Candlelight.flags = MODE_FLAG_HAS_MODE_SPECIFIC_COLOR;
Candlelight.colors_min = 1;
Candlelight.colors_max = 1;
Candlelight.color_mode = MODE_COLORS_MODE_SPECIFIC;
Candlelight.colors.resize(1);
modes.push_back(Candlelight);
mode Wings;
Wings.name = "Wings";
Wings.value = HUE_PLUS_MODE_WINGS;
Wings.flags = MODE_FLAG_HAS_SPEED | MODE_FLAG_HAS_MODE_SPECIFIC_COLOR;
Wings.speed_min = HUE_PLUS_SPEED_SLOWEST;
Wings.speed_max = HUE_PLUS_SPEED_FASTEST;
Wings.colors_min = 1;
Wings.colors_max = 1;
Wings.speed = HUE_PLUS_SPEED_NORMAL;
Wings.color_mode = MODE_COLORS_MODE_SPECIFIC;
Wings.colors.resize(1);
modes.push_back(Wings);
mode Wave;
Wave.name = "Wave";
Wave.value = HUE_PLUS_MODE_WAVE;
Wave.flags = MODE_FLAG_HAS_SPEED | MODE_FLAG_HAS_PER_LED_COLOR;
Wave.speed_min = HUE_PLUS_SPEED_SLOWEST;
Wave.speed_max = HUE_PLUS_SPEED_FASTEST;
Wave.speed = HUE_PLUS_SPEED_NORMAL;
Wave.color_mode = MODE_COLORS_PER_LED;
modes.push_back(Wave);
SetupZones();
}
RGBController_HuePlus::~RGBController_HuePlus()
{
delete controller;
}
void RGBController_HuePlus::SetupZones()
{
/*-------------------------------------------------*\
| Only set LED count on the first run |
\*-------------------------------------------------*/
bool first_run = false;
if(zones.size() == 0)
{
first_run = true;
}
/*-------------------------------------------------*\
| Clear any existing color/LED configuration |
\*-------------------------------------------------*/
leds.clear();
colors.clear();
zones.resize(HUE_PLUS_NUM_CHANNELS);
/*-------------------------------------------------*\
| Set up zones |
\*-------------------------------------------------*/
for(unsigned int zone_idx = 0; zone_idx < HUE_PLUS_NUM_CHANNELS; zone_idx++)
{
zones[zone_idx].name = "Hue+ Channel ";
zones[zone_idx].name.append(std::to_string(zone_idx + 1));
zones[zone_idx].type = ZONE_TYPE_LINEAR;
zones[zone_idx].leds_min = 0;
zones[zone_idx].leds_max = 40;
zones[zone_idx].matrix_map = NULL;
if(first_run)
{
zones[zone_idx].leds_count = controller->channel_leds[zone_idx];
}
}
/*-------------------------------------------------*\
| Set up LEDs |
\*-------------------------------------------------*/
for(unsigned int zone_idx = 0; zone_idx < zones.size(); zone_idx++)
{
for(unsigned int led_idx = 0; led_idx < zones[zone_idx].leds_count; led_idx++)
{
led new_led;
new_led.name = "Hue+ Channel ";
new_led.name.append(std::to_string(zone_idx + 1));
new_led.name.append(", LED ");
new_led.name.append(std::to_string(led_idx + 1));
new_led.value = zone_idx;
leds.push_back(new_led);
}
}
SetupColors();
}
void RGBController_HuePlus::ResizeZone(int zone, int new_size)
{
if((size_t) zone >= zones.size())
{
return;
}
if(((unsigned int)new_size >= zones[zone].leds_min) && ((unsigned int)new_size <= zones[zone].leds_max))
{
zones[zone].leds_count = new_size;
SetupZones();
}
}
void RGBController_HuePlus::DeviceUpdateLEDs()
{
for(std::size_t zone_idx = 0; zone_idx < zones.size(); zone_idx++)
{
controller->SetChannelLEDs((unsigned char)zone_idx, zones[zone_idx].colors, zones[zone_idx].leds_count);
}
}
void RGBController_HuePlus::UpdateZoneLEDs(int zone)
{
controller->SetChannelLEDs(zone, zones[zone].colors, zones[zone].leds_count);
}
void RGBController_HuePlus::UpdateSingleLED(int led)
{
unsigned int zone_idx = leds[led].value;
controller->SetChannelLEDs(zone_idx, zones[zone_idx].colors, zones[zone_idx].leds_count);
}
void RGBController_HuePlus::DeviceUpdateMode()
{
if(modes[active_mode].value == HUE_PLUS_MODE_FIXED)
{
DeviceUpdateLEDs();
}
else
{
for(std::size_t zone_idx = 0; zone_idx < zones.size(); zone_idx++)
{
RGBColor* colors = NULL;
bool direction = false;
if(modes[active_mode].direction == MODE_DIRECTION_LEFT)
{
direction = true;
}
if(modes[active_mode].colors.size() > 0)
{
colors = &modes[active_mode].colors[0];
}
controller->SetChannelEffect
(
(unsigned char)zone_idx,
modes[active_mode].value,
modes[active_mode].speed,
direction,
colors,
(unsigned int)modes[active_mode].colors.size()
);
}
}
}
@@ -0,0 +1,37 @@
/*---------------------------------------------------------*\
| RGBController_NZXTHuePlus.h |
| |
| RGBController for NZXT Hue Plus |
| |
| Adam Honse (calcprogrammer1@gmail.com) 20 Jun 2019 |
| |
| This file is part of the OpenRGB project |
| SPDX-License-Identifier: GPL-2.0-or-later |
\*---------------------------------------------------------*/
#pragma once
#include "RGBController.h"
#include "serial_port.h"
#include "NZXTHuePlusController.h"
class RGBController_HuePlus : public RGBController
{
public:
RGBController_HuePlus(HuePlusController* controller_ptr);
~RGBController_HuePlus();
void SetupZones();
void ResizeZone(int zone, int new_size);
void DeviceUpdateLEDs();
void UpdateZoneLEDs(int zone);
void UpdateSingleLED(int led);
void DeviceUpdateMode();
private:
HuePlusController* controller;
std::vector<unsigned int> leds_channel;
std::vector<unsigned int> zones_channel;
};