From efe6021e76c3b0d35de351c5120fa09dda7ec7ca Mon Sep 17 00:00:00 2001 From: Thomas Hindoe Paaboel Andersen Date: Sat, 2 Sep 2017 00:33:13 +0200 Subject: [PATCH] G300: fix profile switching The profile ID's used are: profile 0: 0x80 profile 1: 0x90 profile 2: 0xA0 These were miscalculated as 0x80, 0x81, and 0x82. --- src/driver-logitech-g300.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/driver-logitech-g300.c b/src/driver-logitech-g300.c index f0c3c719..5bc3e744 100644 --- a/src/driver-logitech-g300.c +++ b/src/driver-logitech-g300.c @@ -228,7 +228,7 @@ logitech_g300_current_profile(struct ratbag_device *device) static int logitech_g300_set_current_profile(struct ratbag_device *device, unsigned int index) { - uint8_t buf[] = {LOGITECH_G300_REPORT_ID_SET_ACTIVE_PROFILE, 0x80 + index, 0x00, 0x00}; + uint8_t buf[] = {LOGITECH_G300_REPORT_ID_SET_ACTIVE_PROFILE, 0x80 | (index << 4), 0x00, 0x00}; int ret; if (index > LOGITECH_G300_PROFILE_MAX)