Address most of original review comments

This commit is contained in:
Adam Honse
2024-09-22 21:20:05 -05:00
parent 57060577bf
commit e95334a216
4 changed files with 1 additions and 38 deletions

View File

@@ -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;

View File

@@ -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();

View File

@@ -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;

View File

@@ -27,7 +27,6 @@ public:
void UpdateZoneLEDs(int zone);
void UpdateSingleLED(int led);
void SetCustomMode();
void DeviceUpdateMode();
private: