Fix error

This commit is contained in:
Adam Honse 2022-08-31 19:55:33 -05:00
parent 9fe664ee72
commit 8dd50f4cd7
4 changed files with 15 additions and 13 deletions

View file

@ -20,6 +20,18 @@
#define POLYCHROME_USB_INIT 0xA4
#define POLYCHROME_USB_COMMIT 0x12
const char* polychrome_USB_zone_names[] =
{
"RGB LED 1 Header",
"RGB LED 2 Header",
"Addressable Header 1",
"Addressable Header 2",
"PCH",
"IO Cover",
"PCB",
"Audio",
};
PolychromeUSBController::PolychromeUSBController(hid_device* dev_handle, const char* path)
{
DMIInfo dmi;

View file

@ -58,17 +58,7 @@ enum
POLYCHROME_USB_ZONE_UNAVAILABLE = 0x1E, // Value from LEDCOUNT CFG if zone not present
};
const char* polychrome_USB_zone_names[] =
{
"RGB LED 1 Header",
"RGB LED 2 Header",
"Addressable Header 1",
"Addressable Header 2",
"PCH",
"IO Cover",
"PCB",
"Audio",
};
extern const char* polychrome_USB_zone_names[];
enum
{

View file

@ -395,7 +395,7 @@ void RGBController_AlienwareAW510K::DeviceUpdateLEDs()
void RGBController_AlienwareAW510K::UpdateZoneLEDs(int zone)
{
controller->SetDirect( RGBGetRValue(zones[zone].colors[0]), RGBGetGValue(zones[zone].colors[0]), RGBGetBValue(zones[zone].colors[0]));
controller->SetDirect((unsigned char) zone, RGBGetRValue(zones[zone].colors[0]), RGBGetGValue(zones[zone].colors[0]), RGBGetBValue(zones[zone].colors[0]));
}
void RGBController_AlienwareAW510K::UpdateSingleLED(int led)

View file

@ -113,7 +113,7 @@ int superio_inb(int ioreg, int reg)
lseek(dev_port_fd, ioreg, SEEK_SET);
if(write(dev_port_fd, &reg, 1) == -1)
{
return;
return -1;
}
if(read(dev_port_fd, &temp, 1) == -1)