mirror of
https://github.com/CalcProgrammer1/OpenRGB.git
synced 2026-01-19 04:27:51 -05:00
95 lines
2.4 KiB
C++
95 lines
2.4 KiB
C++
/*-----------------------------------------*\
|
|
| RGBController_Seagate.cpp |
|
|
| |
|
|
| Generic RGB Interface for Seagate |
|
|
| |
|
|
| Adam Honse (CalcProgrammer1) 11/8/2022 |
|
|
\*-----------------------------------------*/
|
|
|
|
#include "RGBController_Seagate.h"
|
|
|
|
/**------------------------------------------------------------------*\
|
|
@name Seagate
|
|
@category Storage
|
|
@type USB
|
|
@save :x:
|
|
@direct :x:
|
|
@effects :x:
|
|
@detectors DetectSeagateControllers
|
|
@comment
|
|
\*-------------------------------------------------------------------*/
|
|
|
|
RGBController_Seagate::RGBController_Seagate(SeagateController* controller_ptr)
|
|
{
|
|
controller = controller_ptr;
|
|
|
|
name = "Seagate";
|
|
type = DEVICE_TYPE_STORAGE;
|
|
description = "Seagate Device";
|
|
location = controller->GetLocation();
|
|
|
|
mode Direct;
|
|
Direct.name = "Direct";
|
|
Direct.value = 0;
|
|
Direct.flags = MODE_FLAG_HAS_PER_LED_COLOR;
|
|
Direct.color_mode = MODE_COLORS_PER_LED;
|
|
modes.push_back(Direct);
|
|
|
|
SetupZones();
|
|
}
|
|
|
|
RGBController_Seagate::~RGBController_Seagate()
|
|
{
|
|
delete controller;
|
|
}
|
|
|
|
void RGBController_Seagate::SetupZones()
|
|
{
|
|
zone led_zone;
|
|
led_zone.name = "RGB Light";
|
|
led_zone.type = ZONE_TYPE_SINGLE;
|
|
led_zone.leds_min = 1;
|
|
led_zone.leds_max = 1;
|
|
led_zone.leds_count = 1;
|
|
led_zone.matrix_map = NULL;
|
|
zones.push_back(led_zone);
|
|
|
|
led new_led;
|
|
new_led.name = "RGB Light";
|
|
|
|
leds.push_back(new_led);
|
|
|
|
SetupColors();
|
|
}
|
|
|
|
void RGBController_Seagate::ResizeZone(int /*zone*/, int /*new_size*/)
|
|
{
|
|
/*---------------------------------------------------------*\
|
|
| This device does not support resizing zones |
|
|
\*---------------------------------------------------------*/
|
|
}
|
|
|
|
void RGBController_Seagate::DeviceUpdateLEDs()
|
|
{
|
|
unsigned char red = RGBGetRValue(colors[0]);
|
|
unsigned char grn = RGBGetGValue(colors[0]);
|
|
unsigned char blu = RGBGetBValue(colors[0]);
|
|
|
|
//controller->SetRGB(red, grn, blu);
|
|
}
|
|
|
|
void RGBController_Seagate::UpdateZoneLEDs(int /*zone*/)
|
|
{
|
|
DeviceUpdateLEDs();
|
|
}
|
|
|
|
void RGBController_Seagate::UpdateSingleLED(int /*led*/)
|
|
{
|
|
DeviceUpdateLEDs();
|
|
}
|
|
|
|
void RGBController_Seagate::DeviceUpdateMode()
|
|
{
|
|
|
|
}
|