refactor variable (static)

This commit is contained in:
2026-05-24 12:51:47 +02:00
parent 000b0bd543
commit 542bd6f36c
2 changed files with 5 additions and 5 deletions

View File

@@ -3,8 +3,8 @@
#include <libusb-1.0/libusb.h>
#define CORSAIR_VID 0x1b1c
#define AIO_PID 0x0c13
#define AIO_USB_VID 0x1b1c
#define AIO_USB_PID 0x0c13
enum aio_pump_mode_t : uint8_t {
QUIET,

View File

@@ -41,9 +41,9 @@ static void aio_get_fan_speed(libusb_device_handle* aio, uint16_t *speeds) {
void aio_detect(struct aio_t *aio) {
libusb_init(NULL);
aio->handle = libusb_open_device_with_vid_pid(NULL, CORSAIR_VID, AIO_PID);
aio->handle = libusb_open_device_with_vid_pid(NULL, AIO_USB_VID, AIO_USB_PID);
if (aio->handle == NULL) {
applog(LOG_ERR, "Can't open AIO USB device %x:%x", CORSAIR_VID, AIO_PID);
applog(LOG_ERR, "Can't open AIO USB device %x:%x", AIO_USB_VID, AIO_USB_PID);
return;
}
@@ -53,7 +53,7 @@ void aio_detect(struct aio_t *aio) {
const int ret = libusb_claim_interface(aio->handle, 0);
if (ret == 0)
applog(LOG_INF, "found Corsair AIO device at %04x:%04x", CORSAIR_VID, AIO_PID);
applog(LOG_INF, "found Corsair AIO device at %04x:%04x", AIO_USB_VID, AIO_USB_PID);
else
applog(LOG_ERR, "failed to claim AIO device");
}