mirror of
https://github.com/CalcProgrammer1/OpenRGB.git
synced 2026-05-24 06:25:01 -04:00
Address most of original review comments
This commit is contained in:
@@ -10,12 +10,8 @@
|
||||
\*---------------------------------------------------------*/
|
||||
|
||||
#include <cstring>
|
||||
#include <iomanip>
|
||||
#include <iostream>
|
||||
#include "AirgooLustrousCommanderController.h"
|
||||
|
||||
using namespace std::chrono_literals;
|
||||
|
||||
AirgooLustrousCommanderController::AirgooLustrousCommanderController(hid_device* dev_handle, const char* path)
|
||||
{
|
||||
dev = dev_handle;
|
||||
@@ -71,11 +67,6 @@ std::string AirgooLustrousCommanderController::GetLocationString()
|
||||
return("HID: " + location);
|
||||
}
|
||||
|
||||
void AirgooLustrousCommanderController::SetMode(unsigned char mode)
|
||||
{
|
||||
active_mode = mode;
|
||||
}
|
||||
|
||||
void AirgooLustrousCommanderController::UpdateDevice
|
||||
(
|
||||
unsigned char mode,
|
||||
@@ -96,18 +87,6 @@ void AirgooLustrousCommanderController::UpdateDevice
|
||||
|
||||
switch(mode)
|
||||
{
|
||||
case 0: //off
|
||||
usb_buf[0x01] = 0x09; //number of bytes in package
|
||||
usb_buf[0x02] = 0xFF;
|
||||
usb_buf[0x03] = 0x00;
|
||||
usb_buf[0x04] = 0xF0;
|
||||
usb_buf[0x05] = 0x00; //Red
|
||||
usb_buf[0x06] = 0x00; //Green
|
||||
usb_buf[0x07] = 0x00; //Blue
|
||||
usb_buf[0x08] = 0x05;
|
||||
usb_buf[0x09] = 0x05;
|
||||
usb_buf[0x0A] = 0xFE;
|
||||
break;
|
||||
case 1: //static
|
||||
usb_buf[0x01] = 0x09; //number of bytes in package
|
||||
usb_buf[0x02] = 0xFF;
|
||||
|
||||
@@ -11,7 +11,6 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <chrono>
|
||||
#include <vector>
|
||||
#include <hidapi.h>
|
||||
#include "RGBController.h"
|
||||
@@ -29,7 +28,6 @@ public:
|
||||
std::string GetLocationString();
|
||||
|
||||
void SetFanMode();
|
||||
void SetMode(unsigned char mode);
|
||||
void UpdateDevice
|
||||
(
|
||||
unsigned char mode,
|
||||
@@ -41,7 +39,6 @@ public:
|
||||
|
||||
private:
|
||||
hid_device* dev;
|
||||
unsigned char active_mode;
|
||||
std::string location;
|
||||
|
||||
void InitController();
|
||||
|
||||
@@ -15,18 +15,11 @@ RGBController_AirgooLustrousCommander::RGBController_AirgooLustrousCommander(Air
|
||||
{
|
||||
controller = controller_ptr;
|
||||
|
||||
vendor = "Aurgoo";
|
||||
vendor = "Airgoo";
|
||||
description = "Lustrous Commander";
|
||||
type = DEVICE_TYPE_LEDSTRIP;
|
||||
location = controller->GetLocationString();
|
||||
|
||||
mode Off;
|
||||
Off.name = "Off";
|
||||
Off.value = 0;
|
||||
Off.flags = 0;
|
||||
Off.color_mode = MODE_COLORS_NONE;
|
||||
modes.push_back(Off);
|
||||
|
||||
mode Static;
|
||||
Static.name = "Static";
|
||||
Static.value = 1;
|
||||
@@ -184,11 +177,6 @@ void RGBController_AirgooLustrousCommander::UpdateSingleLED(int /*led*/)
|
||||
DeviceUpdateLEDs();
|
||||
}
|
||||
|
||||
void RGBController_AirgooLustrousCommander::SetCustomMode()
|
||||
{
|
||||
active_mode = 0;
|
||||
}
|
||||
|
||||
void RGBController_AirgooLustrousCommander::DeviceUpdateMode()
|
||||
{
|
||||
unsigned char red = 0;
|
||||
|
||||
@@ -27,7 +27,6 @@ public:
|
||||
void UpdateZoneLEDs(int zone);
|
||||
void UpdateSingleLED(int led);
|
||||
|
||||
void SetCustomMode();
|
||||
void DeviceUpdateMode();
|
||||
|
||||
private:
|
||||
|
||||
Reference in New Issue
Block a user